Merge remote-tracking branch 'origin/v2.x' into v2.x

pull/79/head
猿小天 2022-11-16 22:09:39 +08:00
commit d407e9f1ef
1 changed files with 2 additions and 2 deletions

View File

@ -53,7 +53,7 @@ export const checkRouter = function (menuData) {
for (const item of menuData) {
try {
if (item.path !== '' && item.component) {
(item.component && item.component.indexOf('@great-dream/') !== -1) ? pluginImport(item.component.replace('@great-dream/', '')) : _import(item.component)
(item.component && item.component.substr(0, 8) === 'plugins/') ? pluginImport(item.component.replace('plugins/', '')) : _import(item.component)
}
result.push(item)
} catch (err) {
@ -72,7 +72,7 @@ export const handleRouter = function (menuData) {
const obj = {
path: item.path,
name: item.component_name,
component: (item.component && item.component.indexOf('@great-dream/') !== -1) ? pluginImport(item.component.replace('@great-dream/', '')) : _import(item.component),
component: (item.component && item.component.substr(0, 8) === 'plugins/') ? pluginImport(item.component.replace('plugins/', '')) : _import(item.component),
meta: {
title: item.name,
auth: true,