mirror of
https://github.com/cool-team-official/cool-admin-vue.git
synced 2024-11-01 14:10:27 +08:00
优化
This commit is contained in:
parent
2f820e2972
commit
cf1a0dd90d
@ -84,7 +84,9 @@ async function getData(temps: any[]) {
|
|||||||
temps.forEach((e) => {
|
temps.forEach((e) => {
|
||||||
const d = list.find((a) => e.prefix === a.prefix);
|
const d = list.find((a) => e.prefix === a.prefix);
|
||||||
|
|
||||||
if (!d) {
|
if (d) {
|
||||||
|
Object.assign(d, e);
|
||||||
|
} else {
|
||||||
list.push(e);
|
list.push(e);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -36,7 +36,7 @@ export function createEps(modules: Module[]) {
|
|||||||
.filter((e) => !["constructor", "namespace"].includes(e))
|
.filter((e) => !["constructor", "namespace"].includes(e))
|
||||||
.map((e) => {
|
.map((e) => {
|
||||||
return {
|
return {
|
||||||
path: e
|
path: `/${e}`
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -44,7 +44,7 @@ export function createEps(modules: Module[]) {
|
|||||||
api,
|
api,
|
||||||
module: s.namespace.split("/")[0],
|
module: s.namespace.split("/")[0],
|
||||||
name: s.constructor.name,
|
name: s.constructor.name,
|
||||||
prefix: s.namespace
|
prefix: `/admin/${s.namespace}`
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
for (const i in s) {
|
for (const i in s) {
|
||||||
|
Loading…
Reference in New Issue
Block a user