解决权限空的问题

This commit is contained in:
神仙都没用 2025-01-07 20:06:13 +08:00
parent 6ba514dbc3
commit 3aeccff7b2
6 changed files with 230 additions and 298 deletions

View File

@ -39,7 +39,7 @@
"xlsx": "^0.18.5"
},
"devDependencies": {
"@cool-vue/vite-plugin": "^7.2.6",
"@cool-vue/vite-plugin": "^7.2.7",
"@rushstack/eslint-patch": "^1.10.4",
"@tsconfig/node20": "^20.1.4",
"@types/file-saver": "^2.0.7",

View File

@ -476,13 +476,6 @@
if (!d[k].namespace) {
d[k].namespace = path;
}
// 创建权限
if (d[k].namespace) {
getNames(d[k]).forEach((i) => {
d[k].permission[i] =
`${d[k].namespace.replace(`${id}/`, "")}/${i}`.replace(/\//g, ":");
});
}
// 创建方法
e.api.forEach((a) => {
// 方法名
@ -491,6 +484,13 @@
d[k][n] = a;
}
});
// 创建权限
if (d[k].namespace) {
getNames(d[k]).forEach((i) => {
d[k].permission[i] =
`${d[k].namespace.replace(`${id}/`, "")}/${i}`.replace(/\//g, ":");
});
}
}
}
}

View File

@ -1,6 +1,6 @@
{
"name": "@cool-vue/vite-plugin",
"version": "7.2.6",
"version": "7.2.7",
"description": "cool-admin、cool-uni builder",
"main": "/dist/index.js",
"scripts": {

View File

@ -437,14 +437,6 @@ function createService() {
d[k].namespace = path;
}
// 创建权限
if (d[k].namespace) {
getNames(d[k]).forEach((i) => {
d[k].permission[i] =
`${d[k].namespace.replace(`${id}/`, "")}/${i}`.replace(/\//g, ":");
});
}
// 创建方法
e.api.forEach((a) => {
// 方法名
@ -454,6 +446,14 @@ function createService() {
d[k][n] = a;
}
});
// 创建权限
if (d[k].namespace) {
getNames(d[k]).forEach((i) => {
d[k].permission[i] =
`${d[k].namespace.replace(`${id}/`, "")}/${i}`.replace(/\//g, ":");
});
}
}
}
}

492
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long