S4() {
return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1);
},
guid() {
return (this.S4() + this.S4() +'-' + this.S4() +'-' + this.S4() +'-' + this.S4() +'-' + this.S4() + this.S4() + this.S4())
},
console.log(this.guid())
S4() {
return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1);
},
guid() {
return (this.S4() + this.S4() +'-' + this.S4() +'-' + this.S4() +'-' + this.S4() +'-' + this.S4() + this.S4() + this.S4())
},
console.log(this.guid())
本文标题:vue手动生成唯一id标识码
本文链接:https://www.haomeiwen.com/subject/ohzvsdtx.html
网友评论