1
0
mirror of https://github.com/ialley-workshop-open/uni-halo.git synced 2026-06-12 05:09:29 +08:00

v1.0.0-beta 源码正式开源

This commit is contained in:
小莫唐尼
2022-12-06 15:08:29 +08:00
commit 636ae7b169
461 changed files with 116817 additions and 0 deletions
+7
View File
@@ -0,0 +1,7 @@
// 打乱数组
function randomArray(array = []) {
// 原理是sort排序,Math.random()产生0<= x < 1之间的数,会导致x-0.05大于或者小于0
return array.sort(() => Math.random() - 0.5);
}
export default randomArray