生成UUID

生成UUID

ts生成UUID

ts
1
2
3
4
5
6
const getUUID = (): string => {
const TEMP_URL = URL.createObjectURL(new Blob())
const UUID = TEMP_URL.toString()
URL.revokeObjectURL(TEMP_URL) //释放这个url
return UUID.substring(UUID.lastIndexOf('/') + 1)
}

评论