@pubinfo/module-rbac 2.0.0-beta.27 → 2.0.0-beta.29
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/{animation_item.vue_vue_type_script_setup_true_lang-CwdV9u0c.js → animation_item.vue_vue_type_script_setup_true_lang-efL_vjfY.js} +303 -303
- package/dist/{cloneDeep-DlhYgmRW.js → cloneDeep-B4Rj61s4.js} +1 -1
- package/dist/components/GroupSelector/index.vue.d.ts +4 -4
- package/dist/components/OrgTree/index.vue.d.ts +1 -1
- package/dist/components/OrgUserSelector/OrgSelector.vue.d.ts +4 -4
- package/dist/components/OrgUserSelector/UserSelector.vue.d.ts +4 -4
- package/dist/components/ResourceSelector/index.vue.d.ts +4 -4
- package/dist/composables/useLottie.d.ts +1 -1
- package/dist/{gangweijiekou-CV3_VBHJ.js → gangweijiekou-CV7cIo_W.js} +1 -1
- package/dist/{index-sjcUdYzd.js → index-B6A3qFeU.js} +27 -27
- package/dist/{index-C18K1WpL.js → index-BChMrCkZ.js} +23 -23
- package/dist/{index-ClL_cMSm.js → index-BIUkDwk2.js} +26 -26
- package/dist/{index-BmWUEWpu.js → index-BOEO9CRp.js} +191 -196
- package/dist/{index-Y5TuBpcT.js → index-BgdW__IO.js} +2 -2
- package/dist/{index-mOx8bkh9.js → index-Bi0fucZj.js} +80 -80
- package/dist/{index-CW6W1HIo.js → index-Bj3Ee1l-.js} +3 -3
- package/dist/{index-ChpaG3ZQ.js → index-Bzjxdd-F.js} +7 -7
- package/dist/{index-l8BP3b8K.js → index-CF4XGkrK.js} +5 -5
- package/dist/{index-9u9IWKhc.js → index-CGAa6YPO.js} +16 -16
- package/dist/{index-BnxPrpkn.js → index-CK582XAz.js} +9 -9
- package/dist/{index-CLxuFFEj.js → index-Ce9x4LEV.js} +13 -13
- package/dist/{index-CzUo66L_.js → index-CkVgkVvC.js} +24 -24
- package/dist/{index-MFdCOOEW.js → index-D4uw6wJ9.js} +3 -3
- package/dist/{index-D1jFxfsG.js → index-DFrT08M4.js} +24 -24
- package/dist/{index-CrW31P7w.js → index-Dju21Cnm.js} +2 -2
- package/dist/{index-ATlaXzm9.js → index-Dmg39liA.js} +3 -3
- package/dist/{index-LnUQwTXy.js → index-DvE43Xkt.js} +26 -26
- package/dist/{index-D5LKfALd.js → index-Dx3ZDeWT.js} +42 -42
- package/dist/{index-DX9fHWEY.js → index-MmfEJgmm.js} +18 -18
- package/dist/{index-REH4HEOg.js → index-RBHLCaQ9.js} +28 -28
- package/dist/{index-BAQqP93G.js → index-Y2jyqjVz.js} +7 -7
- package/dist/{index-B8DDuLgv.js → index-b_92Syzh.js} +3 -3
- package/dist/{index-Dnp04_5x.js → index-g5Fyla0r.js} +3 -3
- package/dist/{index-YkF83QOR.js → index-qdAiA-PA.js} +2 -2
- package/dist/index.js +1 -1
- package/dist/interface.d.ts +3 -1
- package/dist/{itemlist-sHSMCsLr.js → itemlist-Og2t8W5R.js} +24 -24
- package/dist/{jiaosejiekou-DvfMUYAa.js → jiaosejiekou-0xZkLzL_.js} +1 -1
- package/dist/{login_history-P_GmktRF.js → login_history-BJWFChQ3.js} +1 -1
- package/dist/{operate_history-CqOswIe4.js → operate_history-C1NKnoB5.js} +1 -1
- package/dist/{pubJiaosezukongzhiqi-DHx7MsUe.js → pubJiaosezukongzhiqi-BlLcThHi.js} +1 -1
- package/dist/routes/index.d.ts +1 -1
- package/dist/routes/modules/authority.manage.menu.d.ts +1 -1
- package/dist/routes/modules/log.manage.menu.d.ts +1 -1
- package/dist/routes/modules/safe.manage.menu.d.ts +1 -1
- package/dist/routes/modules/stylesetting.manage.menu.d.ts +1 -1
- package/dist/routes/modules/system.manage.menu.d.ts +1 -1
- package/dist/{setItem-DkuSrCm8.js → setItem-BRseSui6.js} +1 -1
- package/dist/{shujuquanxianzhubiaokongzhiqi-fpMYehpC.js → shujuquanxianzhubiaokongzhiqi-3CpYi1Zo.js} +1 -1
- package/dist/{useAppAndResource-BH_Fl_gK.js → useAppAndResource-BF7jQTCi.js} +2 -2
- package/dist/views/blackWhiteList/components/drawerBlackWhiteList.vue.d.ts +4 -4
- package/dist/views/blackWhiteList/index.vue.d.ts +319 -319
- package/dist/views/breadcrumb_setting/index.vue.d.ts +1 -1
- package/dist/views/components/HCheckList.vue.d.ts +3 -3
- package/dist/views/components/animation_item.vue.d.ts +3 -3
- package/dist/views/components/setItem.vue.d.ts +7 -7
- package/dist/views/data-permission/components/createAndEditDataPermission.vue.d.ts +26 -26
- package/dist/views/data-permission/index.vue.d.ts +341 -341
- package/dist/views/dictionary/components/drawerDictionary.vue.d.ts +4 -4
- package/dist/views/dictionary/components/drawerDictionaryItem.vue.d.ts +4 -4
- package/dist/views/dictionary/index.vue.d.ts +319 -319
- package/dist/views/dictionary/itemlist.vue.d.ts +319 -319
- package/dist/views/group/components/drawerGroup.vue.d.ts +4 -4
- package/dist/views/group/index.vue.d.ts +319 -319
- package/dist/views/layout_setting/index.vue.d.ts +1 -1
- package/dist/views/log_center/components/browserType.vue.d.ts +3 -3
- package/dist/views/log_center/components/loginHistoryDetail.vue.d.ts +4 -4
- package/dist/views/log_center/components/operateHistoryDetail.vue.d.ts +4 -4
- package/dist/views/log_center/login_history.vue.d.ts +315 -315
- package/dist/views/log_center/operate_history.vue.d.ts +315 -315
- package/dist/views/menu_setting/index.vue.d.ts +1 -1
- package/dist/views/organization/components/drawerOrganization.vue.d.ts +4 -4
- package/dist/views/organization/components/drawerRole.vue.d.ts +7 -7
- package/dist/views/organization/components/roleSelect.vue.d.ts +4 -4
- package/dist/views/organization/index.vue.d.ts +12 -12
- package/dist/views/other_setting/index.vue.d.ts +1 -1
- package/dist/views/page_animation_setting/index.vue.d.ts +1 -1
- package/dist/views/page_w_setting/index.vue.d.ts +1 -1
- package/dist/views/position/components/drawerPosition.vue.d.ts +4 -4
- package/dist/views/position/index.vue.d.ts +319 -319
- package/dist/views/region/components/drawerRegion.vue.d.ts +4 -4
- package/dist/views/region/index.vue.d.ts +319 -319
- package/dist/views/resource/components/ResourceEdit.vue.d.ts +4 -4
- package/dist/views/resource/components/RoleRelation.vue.d.ts +2 -2
- package/dist/views/resource/index.vue.d.ts +321 -321
- package/dist/views/role/components/ResourceRelation.vue.d.ts +316 -316
- package/dist/views/role/components/drawerRole.vue.d.ts +8 -8
- package/dist/views/role/index.vue.d.ts +640 -640
- package/dist/views/role_group/components/drawerRole.vue.d.ts +7 -7
- package/dist/views/role_group/components/roleSelect.vue.d.ts +4 -4
- package/dist/views/role_group/index.vue.d.ts +322 -322
- package/dist/views/safe_setting/index.vue.d.ts +1 -1
- package/dist/views/tabbar_setting/index.vue.d.ts +1 -1
- package/dist/views/tenant/components/TenantEdit.vue.d.ts +8 -8
- package/dist/views/tenant/index.vue.d.ts +323 -323
- package/dist/views/theme_setting/index.vue.d.ts +1 -1
- package/dist/views/toolbar_setting/index.vue.d.ts +1 -1
- package/dist/views/user/components/OrgAndPosition.vue.d.ts +3 -3
- package/dist/views/user/components/UserAuthorization.vue.d.ts +7 -7
- package/dist/views/user/components/UserEdit.vue.d.ts +4 -4
- package/dist/views/user/components/roleSelect.vue.d.ts +4 -4
- package/dist/views/user/index.vue.d.ts +326 -326
- package/dist/views/watermark_setting/index.vue.d.ts +5 -5
- package/dist/{xitongpeizhifuwu-B3Lw-Lq9.js → xitongpeizhifuwu-BIR2CVXp.js} +1 -1
- package/dist/{zidianfuwu-BbhoWOZI.js → zidianfuwu-B137v_q7.js} +1 -1
- package/dist/{ziyuanjiekou-CypA4O57.js → ziyuanjiekou-j9nd-oaF.js} +1 -1
- package/dist/{zuzhijiaosebiaokongzhiqi-DhdCTnmx.js → zuzhijiaosebiaokongzhiqi-DPbRg7Qd.js} +1 -1
- package/package.json +11 -11
- package/src/index.ts +6 -12
- package/src/interface.ts +3 -0
- package/src/routes/index.ts +1 -1
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
declare const _default: import('../../../../../node_modules/.pnpm/vue@3.5.
|
|
2
|
-
animateItem: import('../../../../../node_modules/.pnpm/vue@3.5.
|
|
1
|
+
declare const _default: import('../../../../../node_modules/.pnpm/vue@3.5.16_typescript@5.8.3/node_modules/vue').DefineComponent<{}, {}, {}, {}, {}, import('../../../../../node_modules/.pnpm/vue@3.5.16_typescript@5.8.3/node_modules/vue').ComponentOptionsMixin, import('../../../../../node_modules/.pnpm/vue@3.5.16_typescript@5.8.3/node_modules/vue').ComponentOptionsMixin, {}, string, import('../../../../../node_modules/.pnpm/vue@3.5.16_typescript@5.8.3/node_modules/vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('../../../../../node_modules/.pnpm/vue@3.5.16_typescript@5.8.3/node_modules/vue').ComponentProvideOptions, true, {
|
|
2
|
+
animateItem: import('../../../../../node_modules/.pnpm/vue@3.5.16_typescript@5.8.3/node_modules/vue').CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
3
3
|
lightAnimationData: string;
|
|
4
4
|
darkAnimationData: string;
|
|
5
5
|
}> & Readonly<{}>, {
|
|
6
6
|
play: () => void;
|
|
7
7
|
stop: () => void;
|
|
8
|
-
}, {}, {}, {}, import('../../../../../node_modules/.pnpm/vue@3.5.
|
|
8
|
+
}, {}, {}, {}, import('../../../../../node_modules/.pnpm/vue@3.5.16_typescript@5.8.3/node_modules/vue').ComponentOptionsMixin, import('../../../../../node_modules/.pnpm/vue@3.5.16_typescript@5.8.3/node_modules/vue').ComponentOptionsMixin, {}, import('../../../../../node_modules/.pnpm/vue@3.5.16_typescript@5.8.3/node_modules/vue').PublicProps, {
|
|
9
9
|
lightAnimationData: string;
|
|
10
10
|
darkAnimationData: string;
|
|
11
|
-
}, false, {}, {}, import('../../../../../node_modules/.pnpm/vue@3.5.
|
|
11
|
+
}, false, {}, {}, import('../../../../../node_modules/.pnpm/vue@3.5.16_typescript@5.8.3/node_modules/vue').GlobalComponents, import('../../../../../node_modules/.pnpm/vue@3.5.16_typescript@5.8.3/node_modules/vue').GlobalDirectives, string, {
|
|
12
12
|
AnimationRef: HTMLDivElement;
|
|
13
|
-
}, HTMLDivElement, import('../../../../../node_modules/.pnpm/vue@3.5.
|
|
13
|
+
}, HTMLDivElement, import('../../../../../node_modules/.pnpm/vue@3.5.16_typescript@5.8.3/node_modules/vue').ComponentProvideOptions, {
|
|
14
14
|
P: {};
|
|
15
15
|
B: {};
|
|
16
16
|
D: {};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pubinfo/module-rbac",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.0.0-beta.
|
|
4
|
+
"version": "2.0.0-beta.29",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
@@ -18,30 +18,30 @@
|
|
|
18
18
|
],
|
|
19
19
|
"peerDependencies": {
|
|
20
20
|
"@ant-design/icons-vue": "^7.0.1",
|
|
21
|
-
"@pubinfo/pro-components": "^1.7.
|
|
22
|
-
"alova": "^3.2.
|
|
21
|
+
"@pubinfo/pro-components": "^1.7.1",
|
|
22
|
+
"alova": "^3.2.13",
|
|
23
23
|
"ant-design-vue": "^4.2.6",
|
|
24
|
-
"pubinfo": "2.0.0-beta.
|
|
24
|
+
"pubinfo": "2.0.0-beta.29"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@pubinfo/headlessui": "^1.5.1",
|
|
28
|
-
"@vueuse/core": "^13.
|
|
28
|
+
"@vueuse/core": "^13.3.0",
|
|
29
29
|
"dayjs": "^1.11.13",
|
|
30
30
|
"lodash-es": "^4.17.21",
|
|
31
|
-
"lottie-web": "^5.
|
|
31
|
+
"lottie-web": "^5.13.0",
|
|
32
32
|
"vxe-table": "4.6.10"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@ant-design/icons-vue": "^7.0.1",
|
|
36
36
|
"@pubinfo/openapi": "^0.8.4",
|
|
37
37
|
"@pubinfo/preset-openapi": "^0.8.4",
|
|
38
|
-
"@pubinfo/pro-components": "^1.7.
|
|
38
|
+
"@pubinfo/pro-components": "^1.7.1",
|
|
39
39
|
"@types/lodash-es": "^4.17.12",
|
|
40
|
-
"alova": "^3.2.
|
|
40
|
+
"alova": "^3.2.13",
|
|
41
41
|
"ant-design-vue": "^4.2.6",
|
|
42
|
-
"type-fest": "^4.
|
|
43
|
-
"vite-plugin-dts": "^4.5.
|
|
44
|
-
"pubinfo": "2.0.0-beta.
|
|
42
|
+
"type-fest": "^4.41.0",
|
|
43
|
+
"vite-plugin-dts": "^4.5.4",
|
|
44
|
+
"pubinfo": "2.0.0-beta.29"
|
|
45
45
|
},
|
|
46
46
|
"scripts": {
|
|
47
47
|
"dev": "pubinfo build -w",
|
package/src/index.ts
CHANGED
|
@@ -1,28 +1,22 @@
|
|
|
1
1
|
import type { ModuleOptions } from 'pubinfo';
|
|
2
2
|
import type { RbacOptions } from './interface';
|
|
3
|
-
import { defineAsyncRoutes,
|
|
3
|
+
import { defineAsyncRoutes, loadIconsFromGlob } from 'pubinfo';
|
|
4
4
|
import { filterPages } from './routes';
|
|
5
5
|
|
|
6
6
|
import './assets/styles/vxe-table.css';
|
|
7
7
|
import 'uno.css';
|
|
8
8
|
|
|
9
9
|
export function rbac(options: RbacOptions = {}): ModuleOptions {
|
|
10
|
-
const { pages } = options;
|
|
10
|
+
const { pages, sort } = options;
|
|
11
11
|
|
|
12
|
-
// TODO 考虑路由注册顺序
|
|
13
12
|
const asyncRoutes = filterPages({ pages });
|
|
14
|
-
defineAsyncRoutes(asyncRoutes);
|
|
13
|
+
defineAsyncRoutes(asyncRoutes, { sort });
|
|
15
14
|
|
|
16
15
|
return {
|
|
17
16
|
name: 'pubinfo:rbac',
|
|
18
|
-
setup({
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
const modules = (import.meta as any).glob('./assets/icons/*', { eager: true });
|
|
22
|
-
const path = `./assets/icons/${name}.svg`;
|
|
23
|
-
return modules[path]?.default;
|
|
24
|
-
},
|
|
25
|
-
});
|
|
17
|
+
setup({ iconRegistry }) {
|
|
18
|
+
const iconMap = loadIconsFromGlob(import.meta.glob('./assets/icons/*.svg', { eager: true }));
|
|
19
|
+
iconRegistry.register(iconMap);
|
|
26
20
|
},
|
|
27
21
|
};
|
|
28
22
|
}
|
package/src/interface.ts
CHANGED
package/src/routes/index.ts
CHANGED
|
@@ -93,7 +93,7 @@ export function filterPages(options: { pages?: RbacPages }) {
|
|
|
93
93
|
function filterRoutesByMap(routes: RouteRecordRaw[], pageMap: RbacPages) {
|
|
94
94
|
function filterRecursive(routeList: RouteRecordRaw[], map: Record<string, any>): RouteRecordRaw[] {
|
|
95
95
|
return routeList
|
|
96
|
-
.map(route => {
|
|
96
|
+
.map((route) => {
|
|
97
97
|
if (!route.name || !(route.name in map)) {
|
|
98
98
|
return null;
|
|
99
99
|
}
|