You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
pingAnQiYeWeb/src/loveflow/util.js

19 lines
458 B

10 months ago
/* 数组一维转二维 */
export function arrayResolve(n, arr) {
let result = []
for (let i = 0, len = arr.length; i < len; i += n) {
result.push(arr.slice(i, i + n))
}
return result
}
export function importAll(r, arr, needModuleName) {
r.keys().forEach((key) => {
if (!r(key).default.module_name && needModuleName) {
const module_name = key
r(key).default.module_name = module_name
}
arr.push(r(key).default)
})
}