added ESlint 语法检测

This commit is contained in:
何秀钢
2021-06-02 14:11:45 +08:00
parent 3932a8fbf3
commit 2f0465a1a1
94 changed files with 5031 additions and 4790 deletions

View File

@@ -1,13 +1,13 @@
const _import = require('./_import') //获取组件的方法
const _import = require('./_import') // 获取组件的方法
export const asyncRouterHandle = (asyncRouter) => {
asyncRouter.map(item => {
if (item.component) {
item.component = _import(item.component)
} else {
delete item['component']
}
if (item.children) {
asyncRouterHandle(item.children)
}
})
}
asyncRouter.map(item => {
if (item.component) {
item.component = _import(item.component)
} else {
delete item['component']
}
if (item.children) {
asyncRouterHandle(item.children)
}
})
}