yshop1.7发布,后台升級eladmin2.4(前端,后台权限,代码生成器等重构),修复商品分类等一些问题

This commit is contained in:
hupeng
2020-01-07 23:32:27 +08:00
parent 24753759f4
commit b6cc8046db
451 changed files with 13868 additions and 8883 deletions

View File

@ -1,5 +1,5 @@
import { constantRouterMap } from '@/router/routers'
import Layout from '@/layout/Layout'
import Layout from '@/layout/index'
const permission = {
state: {
@ -20,7 +20,7 @@ const permission = {
}
export const filterAsyncRouter = (routers) => { // 遍历后台传来的路由字符串,转换为组件对象
const accessedRouters = routers.filter(router => {
return routers.filter(router => {
if (router.component) {
if (router.component === 'Layout') { // Layout组件特殊处理
router.component = Layout
@ -34,10 +34,9 @@ export const filterAsyncRouter = (routers) => { // 遍历后台传来的路由
}
return true
})
return accessedRouters
}
export const loadView = (view) => { // 路由懒加载
export const loadView = (view) => {
return () => import(`@/views/${view}`)
}