dashboard
repositories
filestore
activity
search
login
main
/
Inspection-uniapp
巡检系统app
summary
reflog
commits
tree
docs
forks
compare
blame
|
history
|
raw
维修列表若为未开始时间显示为创建时间,其他显示为更新时间
guoshilong
2022-10-14
d8e0af2ce345f3b40581ad05c596f965ae729c01
[Inspection-uniapp.git]
/
uview-ui
/
libs
/
function
/
randomArray.js
1
2
3
4
5
6
7
// 打乱数组
function randomArray(array = []) {
// 原理是sort排序,Math.random()产生0<= x < 1之间的数,会导致x-0.05大于或者小于0
return array.sort(() => Math.random() - 0.5);
}
export default randomArray