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) => {
|
||||
const d = list.find((a) => e.prefix === a.prefix);
|
||||
|
||||
if (!d) {
|
||||
if (d) {
|
||||
Object.assign(d, e);
|
||||
} else {
|
||||
list.push(e);
|
||||
}
|
||||
});
|
||||
|
@ -36,7 +36,7 @@ export function createEps(modules: Module[]) {
|
||||
.filter((e) => !["constructor", "namespace"].includes(e))
|
||||
.map((e) => {
|
||||
return {
|
||||
path: e
|
||||
path: `/${e}`
|
||||
};
|
||||
});
|
||||
|
||||
@ -44,7 +44,7 @@ export function createEps(modules: Module[]) {
|
||||
api,
|
||||
module: s.namespace.split("/")[0],
|
||||
name: s.constructor.name,
|
||||
prefix: s.namespace
|
||||
prefix: `/admin/${s.namespace}`
|
||||
});
|
||||
} else {
|
||||
for (const i in s) {
|
||||
|
Loading…
Reference in New Issue
Block a user