Vue中使⽤uuidv1根据时间戳和MAC地址⽣成唯⼀标识(获取客户端唯一标识)
1.安装
npm install uuid --save
2.引入
- import uuidv1 from'uuid/v1'
- const uuid = require('uuid')
3.获取
- let uuidStr = uuidv1()
- let uuidStr = uuid.v1()
//79317370-d0fd-11ec-88ef-a1ffef45e64f
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)