|
@@ -27,6 +27,7 @@ function getc(obj) {
|
|
|
return getc(obj.children[0])
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
router.beforeEach(async (to, from, next) => {
|
|
|
NProgress.start()
|
|
|
document.title = getPageTitle(to.meta.title)
|
|
@@ -124,6 +125,7 @@ function buildRoute(route, parentUrl = '', bool = true) {
|
|
|
|
|
|
try {
|
|
|
item.component = _import(`${fullUrl}/index`)
|
|
|
+ item.component.name = item.name
|
|
|
} catch (e) {
|
|
|
console.log(e)
|
|
|
}
|
|
@@ -161,7 +163,7 @@ function buildRoute(route, parentUrl = '', bool = true) {
|
|
|
} else if (type == 2) {
|
|
|
try {
|
|
|
item.component = _import(`${fullUrl}/index`)
|
|
|
-
|
|
|
+ item.component.name = item.name
|
|
|
if (!pages.find(ite => ite.path === item.path)) {
|
|
|
item.path = `${item.path}${bool ? '' : ''}`
|
|
|
pages.push(item)
|