1
0
mirror of https://github.com/ialley-workshop-open/uni-halo.git synced 2026-06-11 04:39:35 +08:00

fix: 修复瞬间视频可同时播放多个视频bug、优化列表加载

This commit is contained in:
小莫唐尼
2025-07-21 17:53:36 +08:00
parent 409be28deb
commit 7daf93d51f
3 changed files with 370 additions and 325 deletions
View File
+16
View File
@@ -0,0 +1,16 @@
/**
* 生成指定长度的uuid
* @param {number} = 长度
*/
export function generateUUID(length = 36) {
const characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
let result = '';
const validLength = Math.max(1, Math.floor(Number(length)) || 36);
for (let i = 0; i < validLength; i++) {
result += characters.charAt(Math.floor(Math.random() * characters.length));
}
return result;
}