@clownlee/rbac 1.0.6 → 1.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +9 -8
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -25721,17 +25721,18 @@ function usePermissionCheck(permission, logic = "OR", matchMode = "exact", permi
|
|
|
25721
25721
|
try {
|
|
25722
25722
|
const store = permissionStore;
|
|
25723
25723
|
let permissions = [];
|
|
25724
|
-
|
|
25725
|
-
|
|
25724
|
+
const storeValue = (store == null ? void 0 : store.value) !== void 0 ? store.value : store;
|
|
25725
|
+
if (storeValue[permissionKey]) {
|
|
25726
|
+
const value = storeValue[permissionKey];
|
|
25726
25727
|
permissions = Array.isArray(value == null ? void 0 : value.value) ? value.value : Array.isArray(value) ? value : [];
|
|
25727
|
-
} else if (
|
|
25728
|
-
const value =
|
|
25728
|
+
} else if (storeValue.$state && storeValue.$state[permissionKey]) {
|
|
25729
|
+
const value = storeValue.$state[permissionKey];
|
|
25729
25730
|
permissions = Array.isArray(value) ? value : [];
|
|
25730
|
-
} else if (
|
|
25731
|
-
const value =
|
|
25731
|
+
} else if (storeValue.state && storeValue.state[permissionKey]) {
|
|
25732
|
+
const value = storeValue.state[permissionKey];
|
|
25732
25733
|
permissions = Array.isArray(value) ? value : [];
|
|
25733
|
-
} else if (
|
|
25734
|
-
const value =
|
|
25734
|
+
} else if (storeValue.permissions) {
|
|
25735
|
+
const value = storeValue.permissions;
|
|
25735
25736
|
permissions = Array.isArray(value == null ? void 0 : value.value) ? value.value : Array.isArray(value) ? value : [];
|
|
25736
25737
|
}
|
|
25737
25738
|
permissions = flattenPermissions(permissions);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@clownlee/rbac",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.7",
|
|
4
4
|
"description": "权限管理能力,提供角色、权限、资源等 RBAC 权限管理功能",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"@element-plus/icons-vue": "^2.3.1",
|
|
33
33
|
"element-plus": "^2.12.0",
|
|
34
34
|
"pinia": "^2.1.7",
|
|
35
|
-
"@clownlee/cores": "^1.0.
|
|
35
|
+
"@clownlee/cores": "^1.0.7",
|
|
36
36
|
"crypto-js": "^4.2.0"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|