说明
目前全部上传到npm的工具包utilsgrow和ys-tools,yarn add || npm i使用
数组根据某项的某个值去重复
unique (arr, key) {
const res = new Map()
return arr.filter(a => !res.has(a[key]) && res.set(a[key], 1))
},
样式居中
.g-g-c {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
margin: auto;
}