功能变化: 插件配置优化
parent
90e47bdee5
commit
6a5cacb8d8
|
@ -53,7 +53,7 @@ export const checkRouter = function (menuData) {
|
||||||
for (const item of menuData) {
|
for (const item of menuData) {
|
||||||
try {
|
try {
|
||||||
if (item.path !== '' && item.component) {
|
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)
|
result.push(item)
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
@ -72,7 +72,7 @@ export const handleRouter = function (menuData) {
|
||||||
const obj = {
|
const obj = {
|
||||||
path: item.path,
|
path: item.path,
|
||||||
name: item.component_name,
|
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: {
|
meta: {
|
||||||
title: item.name,
|
title: item.name,
|
||||||
auth: true,
|
auth: true,
|
||||||
|
|
Loading…
Reference in New Issue