vue前端生成UUID

//用于生成uuid
function S4() {
    return (((1+Math.random())*0x10000)|0).toString(16).substring(1);
}
function guid() {
    return (S4()+S4()+"-"+S4()+"-"+S4()+"-"+S4()+"-"+S4()+S4()+S4());
}

  

posted @ 2020-03-31 15:22  凌枫恋  阅读(13864)  评论(0编辑  收藏  举报