@pubinfo/module-rbac 2.0.0 → 2.0.2
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/{IconSelect-HAhfS6hd.js → IconSelect-BMlRIxBx.js} +293 -273
- package/dist/{IconSelect-Ct5FkeHI.js → IconSelect-BeZfjsl0.js} +1 -1
- package/dist/IconSelect.css +1 -1
- package/dist/{ResourceEdit-DF-2_zoi.js → ResourceEdit-BSaHxlbT.js} +14 -13
- package/dist/{ResourceEdit-oAPLPUf0.js → ResourceEdit-Beu0QLBf.js} +2 -2
- package/dist/components/ResourceSelector/hooks/useAppAndResource.d.ts +6 -15
- package/dist/components/RoleSelector/useRole.d.ts +4 -68
- package/dist/index.css +1 -1
- package/dist/index.js +6 -6
- package/dist/{resource-CyI9ZpmF.js → resource-UmUb9yZa.js} +2 -2
- package/dist/stores/view.d.ts +21 -126
- package/dist/utils/routeSystem.d.ts +21 -126
- package/dist/views/blackWhiteList/index.vue.d.ts +40 -40
- package/dist/views/data-permission/components/createAndEditDataPermission.vue.d.ts +4 -4
- package/dist/views/data-permission/index.vue.d.ts +44 -44
- package/dist/views/dictionary/index.vue.d.ts +40 -40
- package/dist/views/dictionary/itemlist.vue.d.ts +40 -40
- package/dist/views/group/index.vue.d.ts +40 -40
- package/dist/views/log_center/components/browserType.vue.d.ts +2 -2
- package/dist/views/log_center/components/loginHistoryDetail.vue.d.ts +2 -2
- package/dist/views/log_center/components/operateHistoryDetail.vue.d.ts +2 -2
- package/dist/views/log_center/login_history.vue.d.ts +40 -40
- package/dist/views/log_center/operate_history.vue.d.ts +40 -40
- package/dist/views/position/index.vue.d.ts +40 -40
- package/dist/views/region/index.vue.d.ts +40 -40
- package/dist/views/resource/hooks/useMetaForm.d.ts +1 -8
- package/dist/views/resource/index.vue.d.ts +40 -40
- package/dist/views/role/components/ResourceRelation.vue.d.ts +40 -40
- package/dist/views/role/index.vue.d.ts +80 -80
- package/dist/views/role_group/index.vue.d.ts +40 -40
- package/dist/views/tenant/index.vue.d.ts +40 -40
- package/dist/views/user/index.vue.d.ts +40 -40
- package/package.json +3 -3
- package/src/components/ResourceIcones/Select.vue +74 -60
- package/src/views/resource/components/IconSelect.vue +77 -31
- package/src/views/resource/components/ResourceEdit.vue +29 -31
|
@@ -1,50 +1,50 @@
|
|
|
1
1
|
import { CurrentOrg } from './interface';
|
|
2
2
|
import { ACTION } from './enum';
|
|
3
3
|
declare const _default: import('../../../../../node_modules/.pnpm/vue@3.5.17_typescript@5.8.3/node_modules/vue').DefineComponent<{}, {}, {}, {}, {}, import('../../../../../node_modules/.pnpm/vue@3.5.17_typescript@5.8.3/node_modules/vue').ComponentOptionsMixin, import('../../../../../node_modules/.pnpm/vue@3.5.17_typescript@5.8.3/node_modules/vue').ComponentOptionsMixin, {}, string, import('../../../../../node_modules/.pnpm/vue@3.5.17_typescript@5.8.3/node_modules/vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('../../../../../node_modules/.pnpm/vue@3.5.17_typescript@5.8.3/node_modules/vue').ComponentProvideOptions, true, {
|
|
4
|
-
tableRef: import('../../../../../node_modules/.pnpm/vue@3.5.17_typescript@5.8.3/node_modules/vue').CreateComponentPublicInstanceWithMixins<Readonly<
|
|
5
|
-
request: PropType<import('@pubinfo/pro-components').ProTableProps["request"]>;
|
|
4
|
+
tableRef: import('../../../../../node_modules/.pnpm/vue@3.5.17_typescript@5.8.3/node_modules/vue').CreateComponentPublicInstanceWithMixins<Readonly<import('../../../../../node_modules/.pnpm/vue@3.5.17_typescript@5.8.3/node_modules/vue').ExtractPropTypes<{
|
|
5
|
+
request: import('../../../../../node_modules/.pnpm/vue@3.5.17_typescript@5.8.3/node_modules/vue').PropType<import('@pubinfo/pro-components').ProTableProps["request"]>;
|
|
6
6
|
dataSource: {
|
|
7
|
-
type: PropType<import('@pubinfo/pro-components').ProTableProps["dataSource"]>;
|
|
7
|
+
type: import('../../../../../node_modules/.pnpm/vue@3.5.17_typescript@5.8.3/node_modules/vue').PropType<import('@pubinfo/pro-components').ProTableProps["dataSource"]>;
|
|
8
8
|
default: () => never[];
|
|
9
9
|
};
|
|
10
10
|
params: {
|
|
11
|
-
type: PropType<import('@pubinfo/pro-components').ProTableProps["params"]>;
|
|
11
|
+
type: import('../../../../../node_modules/.pnpm/vue@3.5.17_typescript@5.8.3/node_modules/vue').PropType<import('@pubinfo/pro-components').ProTableProps["params"]>;
|
|
12
12
|
default: () => {};
|
|
13
13
|
};
|
|
14
14
|
columns: {
|
|
15
|
-
type: PropType<import('@pubinfo/pro-components').ProTableProps["columns"]>;
|
|
15
|
+
type: import('../../../../../node_modules/.pnpm/vue@3.5.17_typescript@5.8.3/node_modules/vue').PropType<import('@pubinfo/pro-components').ProTableProps["columns"]>;
|
|
16
16
|
default: () => never[];
|
|
17
17
|
};
|
|
18
18
|
columnsState: {
|
|
19
|
-
type: PropType<import('@pubinfo/pro-components').ProTableProps["columnsState"]>;
|
|
19
|
+
type: import('../../../../../node_modules/.pnpm/vue@3.5.17_typescript@5.8.3/node_modules/vue').PropType<import('@pubinfo/pro-components').ProTableProps["columnsState"]>;
|
|
20
20
|
default: () => {};
|
|
21
21
|
};
|
|
22
22
|
search: {
|
|
23
|
-
type: PropType<import('@pubinfo/pro-components').ProTableProps["search"]>;
|
|
23
|
+
type: import('../../../../../node_modules/.pnpm/vue@3.5.17_typescript@5.8.3/node_modules/vue').PropType<import('@pubinfo/pro-components').ProTableProps["search"]>;
|
|
24
24
|
default: boolean;
|
|
25
25
|
};
|
|
26
26
|
toolbar: {
|
|
27
|
-
type: PropType<import('@pubinfo/pro-components').ProTableProps["toolbar"]>;
|
|
27
|
+
type: import('../../../../../node_modules/.pnpm/vue@3.5.17_typescript@5.8.3/node_modules/vue').PropType<import('@pubinfo/pro-components').ProTableProps["toolbar"]>;
|
|
28
28
|
default: boolean;
|
|
29
29
|
};
|
|
30
30
|
beforeSearchSubmit: {
|
|
31
|
-
type: PropType<import('@pubinfo/pro-components').ProTableProps["beforeSearchSubmit"]>;
|
|
31
|
+
type: import('../../../../../node_modules/.pnpm/vue@3.5.17_typescript@5.8.3/node_modules/vue').PropType<import('@pubinfo/pro-components').ProTableProps["beforeSearchSubmit"]>;
|
|
32
32
|
default: (arg: import('@pubinfo/pro-components').QueryData) => any;
|
|
33
33
|
};
|
|
34
34
|
postData: {
|
|
35
|
-
type: PropType<import('@pubinfo/pro-components').ProTableProps["postData"]>;
|
|
35
|
+
type: import('../../../../../node_modules/.pnpm/vue@3.5.17_typescript@5.8.3/node_modules/vue').PropType<import('@pubinfo/pro-components').ProTableProps["postData"]>;
|
|
36
36
|
default: (arg: import('@pubinfo/pro-components').Recordable[]) => import('@pubinfo/pro-components').Recordable[];
|
|
37
37
|
};
|
|
38
38
|
cardBordered: {
|
|
39
|
-
type: PropType<import('@pubinfo/pro-components').ProTableProps["cardBordered"]>;
|
|
39
|
+
type: import('../../../../../node_modules/.pnpm/vue@3.5.17_typescript@5.8.3/node_modules/vue').PropType<import('@pubinfo/pro-components').ProTableProps["cardBordered"]>;
|
|
40
40
|
default: boolean;
|
|
41
41
|
};
|
|
42
42
|
autoHeight: {
|
|
43
|
-
type: PropType<import('@pubinfo/pro-components').ProTableProps["autoHeight"]>;
|
|
43
|
+
type: import('../../../../../node_modules/.pnpm/vue@3.5.17_typescript@5.8.3/node_modules/vue').PropType<import('@pubinfo/pro-components').ProTableProps["autoHeight"]>;
|
|
44
44
|
default: boolean;
|
|
45
45
|
};
|
|
46
46
|
manualRequest: {
|
|
47
|
-
type: PropType<import('@pubinfo/pro-components').ProTableProps["manualRequest"]>;
|
|
47
|
+
type: import('../../../../../node_modules/.pnpm/vue@3.5.17_typescript@5.8.3/node_modules/vue').PropType<import('@pubinfo/pro-components').ProTableProps["manualRequest"]>;
|
|
48
48
|
default: boolean;
|
|
49
49
|
};
|
|
50
50
|
prefixCls: {
|
|
@@ -472,26 +472,26 @@ declare const _default: import('../../../../../node_modules/.pnpm/vue@3.5.17_typ
|
|
|
472
472
|
type: NumberConstructor;
|
|
473
473
|
};
|
|
474
474
|
submitter: {
|
|
475
|
-
type: PropType<import('node_modules/@pubinfo/pro-components/es/pro-form/components').CommonFormProps["submitter"]>;
|
|
475
|
+
type: import('../../../../../node_modules/.pnpm/vue@3.5.17_typescript@5.8.3/node_modules/vue').PropType<import('node_modules/@pubinfo/pro-components/es/pro-form/components').CommonFormProps["submitter"]>;
|
|
476
476
|
default: () => {};
|
|
477
477
|
};
|
|
478
478
|
onFinish: {
|
|
479
|
-
type: PropType<import('node_modules/@pubinfo/pro-components/es/pro-form/components').CommonFormProps["onFinish"]>;
|
|
479
|
+
type: import('../../../../../node_modules/.pnpm/vue@3.5.17_typescript@5.8.3/node_modules/vue').PropType<import('node_modules/@pubinfo/pro-components/es/pro-form/components').CommonFormProps["onFinish"]>;
|
|
480
480
|
};
|
|
481
481
|
readonly: {
|
|
482
|
-
type: PropType<import('node_modules/@pubinfo/pro-components/es/pro-form/components').CommonFormProps["readonly"]>;
|
|
482
|
+
type: import('../../../../../node_modules/.pnpm/vue@3.5.17_typescript@5.8.3/node_modules/vue').PropType<import('node_modules/@pubinfo/pro-components/es/pro-form/components').CommonFormProps["readonly"]>;
|
|
483
483
|
default: boolean;
|
|
484
484
|
};
|
|
485
485
|
grid: {
|
|
486
|
-
type: PropType<import('node_modules/@pubinfo/pro-components/es/pro-form/components').CommonFormProps["grid"]>;
|
|
486
|
+
type: import('../../../../../node_modules/.pnpm/vue@3.5.17_typescript@5.8.3/node_modules/vue').PropType<import('node_modules/@pubinfo/pro-components/es/pro-form/components').CommonFormProps["grid"]>;
|
|
487
487
|
default: boolean;
|
|
488
488
|
};
|
|
489
489
|
rowProps: {
|
|
490
|
-
type: PropType<import('node_modules/@pubinfo/pro-components/es/pro-form/components').CommonFormProps["rowProps"]>;
|
|
490
|
+
type: import('../../../../../node_modules/.pnpm/vue@3.5.17_typescript@5.8.3/node_modules/vue').PropType<import('node_modules/@pubinfo/pro-components/es/pro-form/components').CommonFormProps["rowProps"]>;
|
|
491
491
|
default: () => {};
|
|
492
492
|
};
|
|
493
493
|
colProps: {
|
|
494
|
-
type: PropType<import('node_modules/@pubinfo/pro-components/es/pro-form/components').CommonFormProps["colProps"]>;
|
|
494
|
+
type: import('../../../../../node_modules/.pnpm/vue@3.5.17_typescript@5.8.3/node_modules/vue').PropType<import('node_modules/@pubinfo/pro-components/es/pro-form/components').CommonFormProps["colProps"]>;
|
|
495
495
|
default: () => {};
|
|
496
496
|
};
|
|
497
497
|
layout: any;
|
|
@@ -716,7 +716,7 @@ declare const _default: import('../../../../../node_modules/.pnpm/vue@3.5.17_typ
|
|
|
716
716
|
toolbar: boolean | Partial<import('../../../../../node_modules/.pnpm/vue@3.5.17_typescript@5.8.3/node_modules/vue').ExtractPropTypes<{
|
|
717
717
|
title: StringConstructor;
|
|
718
718
|
settings: {
|
|
719
|
-
type: PropType<import('@pubinfo/pro-components').ToolBarSetting[] | boolean>;
|
|
719
|
+
type: import('../../../../../node_modules/.pnpm/vue@3.5.17_typescript@5.8.3/node_modules/vue').PropType<import('@pubinfo/pro-components').ToolBarSetting[] | boolean>;
|
|
720
720
|
default: () => never[];
|
|
721
721
|
};
|
|
722
722
|
}>> | undefined;
|
|
@@ -758,50 +758,50 @@ declare const _default: import('../../../../../node_modules/.pnpm/vue@3.5.17_typ
|
|
|
758
758
|
C: {};
|
|
759
759
|
M: {};
|
|
760
760
|
Defaults: {};
|
|
761
|
-
}, Readonly<
|
|
762
|
-
request: PropType<import('@pubinfo/pro-components').ProTableProps["request"]>;
|
|
761
|
+
}, Readonly<import('../../../../../node_modules/.pnpm/vue@3.5.17_typescript@5.8.3/node_modules/vue').ExtractPropTypes<{
|
|
762
|
+
request: import('../../../../../node_modules/.pnpm/vue@3.5.17_typescript@5.8.3/node_modules/vue').PropType<import('@pubinfo/pro-components').ProTableProps["request"]>;
|
|
763
763
|
dataSource: {
|
|
764
|
-
type: PropType<import('@pubinfo/pro-components').ProTableProps["dataSource"]>;
|
|
764
|
+
type: import('../../../../../node_modules/.pnpm/vue@3.5.17_typescript@5.8.3/node_modules/vue').PropType<import('@pubinfo/pro-components').ProTableProps["dataSource"]>;
|
|
765
765
|
default: () => never[];
|
|
766
766
|
};
|
|
767
767
|
params: {
|
|
768
|
-
type: PropType<import('@pubinfo/pro-components').ProTableProps["params"]>;
|
|
768
|
+
type: import('../../../../../node_modules/.pnpm/vue@3.5.17_typescript@5.8.3/node_modules/vue').PropType<import('@pubinfo/pro-components').ProTableProps["params"]>;
|
|
769
769
|
default: () => {};
|
|
770
770
|
};
|
|
771
771
|
columns: {
|
|
772
|
-
type: PropType<import('@pubinfo/pro-components').ProTableProps["columns"]>;
|
|
772
|
+
type: import('../../../../../node_modules/.pnpm/vue@3.5.17_typescript@5.8.3/node_modules/vue').PropType<import('@pubinfo/pro-components').ProTableProps["columns"]>;
|
|
773
773
|
default: () => never[];
|
|
774
774
|
};
|
|
775
775
|
columnsState: {
|
|
776
|
-
type: PropType<import('@pubinfo/pro-components').ProTableProps["columnsState"]>;
|
|
776
|
+
type: import('../../../../../node_modules/.pnpm/vue@3.5.17_typescript@5.8.3/node_modules/vue').PropType<import('@pubinfo/pro-components').ProTableProps["columnsState"]>;
|
|
777
777
|
default: () => {};
|
|
778
778
|
};
|
|
779
779
|
search: {
|
|
780
|
-
type: PropType<import('@pubinfo/pro-components').ProTableProps["search"]>;
|
|
780
|
+
type: import('../../../../../node_modules/.pnpm/vue@3.5.17_typescript@5.8.3/node_modules/vue').PropType<import('@pubinfo/pro-components').ProTableProps["search"]>;
|
|
781
781
|
default: boolean;
|
|
782
782
|
};
|
|
783
783
|
toolbar: {
|
|
784
|
-
type: PropType<import('@pubinfo/pro-components').ProTableProps["toolbar"]>;
|
|
784
|
+
type: import('../../../../../node_modules/.pnpm/vue@3.5.17_typescript@5.8.3/node_modules/vue').PropType<import('@pubinfo/pro-components').ProTableProps["toolbar"]>;
|
|
785
785
|
default: boolean;
|
|
786
786
|
};
|
|
787
787
|
beforeSearchSubmit: {
|
|
788
|
-
type: PropType<import('@pubinfo/pro-components').ProTableProps["beforeSearchSubmit"]>;
|
|
788
|
+
type: import('../../../../../node_modules/.pnpm/vue@3.5.17_typescript@5.8.3/node_modules/vue').PropType<import('@pubinfo/pro-components').ProTableProps["beforeSearchSubmit"]>;
|
|
789
789
|
default: (arg: import('@pubinfo/pro-components').QueryData) => any;
|
|
790
790
|
};
|
|
791
791
|
postData: {
|
|
792
|
-
type: PropType<import('@pubinfo/pro-components').ProTableProps["postData"]>;
|
|
792
|
+
type: import('../../../../../node_modules/.pnpm/vue@3.5.17_typescript@5.8.3/node_modules/vue').PropType<import('@pubinfo/pro-components').ProTableProps["postData"]>;
|
|
793
793
|
default: (arg: import('@pubinfo/pro-components').Recordable[]) => import('@pubinfo/pro-components').Recordable[];
|
|
794
794
|
};
|
|
795
795
|
cardBordered: {
|
|
796
|
-
type: PropType<import('@pubinfo/pro-components').ProTableProps["cardBordered"]>;
|
|
796
|
+
type: import('../../../../../node_modules/.pnpm/vue@3.5.17_typescript@5.8.3/node_modules/vue').PropType<import('@pubinfo/pro-components').ProTableProps["cardBordered"]>;
|
|
797
797
|
default: boolean;
|
|
798
798
|
};
|
|
799
799
|
autoHeight: {
|
|
800
|
-
type: PropType<import('@pubinfo/pro-components').ProTableProps["autoHeight"]>;
|
|
800
|
+
type: import('../../../../../node_modules/.pnpm/vue@3.5.17_typescript@5.8.3/node_modules/vue').PropType<import('@pubinfo/pro-components').ProTableProps["autoHeight"]>;
|
|
801
801
|
default: boolean;
|
|
802
802
|
};
|
|
803
803
|
manualRequest: {
|
|
804
|
-
type: PropType<import('@pubinfo/pro-components').ProTableProps["manualRequest"]>;
|
|
804
|
+
type: import('../../../../../node_modules/.pnpm/vue@3.5.17_typescript@5.8.3/node_modules/vue').PropType<import('@pubinfo/pro-components').ProTableProps["manualRequest"]>;
|
|
805
805
|
default: boolean;
|
|
806
806
|
};
|
|
807
807
|
prefixCls: {
|
|
@@ -1229,26 +1229,26 @@ declare const _default: import('../../../../../node_modules/.pnpm/vue@3.5.17_typ
|
|
|
1229
1229
|
type: NumberConstructor;
|
|
1230
1230
|
};
|
|
1231
1231
|
submitter: {
|
|
1232
|
-
type: PropType<import('node_modules/@pubinfo/pro-components/es/pro-form/components').CommonFormProps["submitter"]>;
|
|
1232
|
+
type: import('../../../../../node_modules/.pnpm/vue@3.5.17_typescript@5.8.3/node_modules/vue').PropType<import('node_modules/@pubinfo/pro-components/es/pro-form/components').CommonFormProps["submitter"]>;
|
|
1233
1233
|
default: () => {};
|
|
1234
1234
|
};
|
|
1235
1235
|
onFinish: {
|
|
1236
|
-
type: PropType<import('node_modules/@pubinfo/pro-components/es/pro-form/components').CommonFormProps["onFinish"]>;
|
|
1236
|
+
type: import('../../../../../node_modules/.pnpm/vue@3.5.17_typescript@5.8.3/node_modules/vue').PropType<import('node_modules/@pubinfo/pro-components/es/pro-form/components').CommonFormProps["onFinish"]>;
|
|
1237
1237
|
};
|
|
1238
1238
|
readonly: {
|
|
1239
|
-
type: PropType<import('node_modules/@pubinfo/pro-components/es/pro-form/components').CommonFormProps["readonly"]>;
|
|
1239
|
+
type: import('../../../../../node_modules/.pnpm/vue@3.5.17_typescript@5.8.3/node_modules/vue').PropType<import('node_modules/@pubinfo/pro-components/es/pro-form/components').CommonFormProps["readonly"]>;
|
|
1240
1240
|
default: boolean;
|
|
1241
1241
|
};
|
|
1242
1242
|
grid: {
|
|
1243
|
-
type: PropType<import('node_modules/@pubinfo/pro-components/es/pro-form/components').CommonFormProps["grid"]>;
|
|
1243
|
+
type: import('../../../../../node_modules/.pnpm/vue@3.5.17_typescript@5.8.3/node_modules/vue').PropType<import('node_modules/@pubinfo/pro-components/es/pro-form/components').CommonFormProps["grid"]>;
|
|
1244
1244
|
default: boolean;
|
|
1245
1245
|
};
|
|
1246
1246
|
rowProps: {
|
|
1247
|
-
type: PropType<import('node_modules/@pubinfo/pro-components/es/pro-form/components').CommonFormProps["rowProps"]>;
|
|
1247
|
+
type: import('../../../../../node_modules/.pnpm/vue@3.5.17_typescript@5.8.3/node_modules/vue').PropType<import('node_modules/@pubinfo/pro-components/es/pro-form/components').CommonFormProps["rowProps"]>;
|
|
1248
1248
|
default: () => {};
|
|
1249
1249
|
};
|
|
1250
1250
|
colProps: {
|
|
1251
|
-
type: PropType<import('node_modules/@pubinfo/pro-components/es/pro-form/components').CommonFormProps["colProps"]>;
|
|
1251
|
+
type: import('../../../../../node_modules/.pnpm/vue@3.5.17_typescript@5.8.3/node_modules/vue').PropType<import('node_modules/@pubinfo/pro-components/es/pro-form/components').CommonFormProps["colProps"]>;
|
|
1252
1252
|
default: () => {};
|
|
1253
1253
|
};
|
|
1254
1254
|
layout: any;
|
|
@@ -1473,7 +1473,7 @@ declare const _default: import('../../../../../node_modules/.pnpm/vue@3.5.17_typ
|
|
|
1473
1473
|
toolbar: boolean | Partial<import('../../../../../node_modules/.pnpm/vue@3.5.17_typescript@5.8.3/node_modules/vue').ExtractPropTypes<{
|
|
1474
1474
|
title: StringConstructor;
|
|
1475
1475
|
settings: {
|
|
1476
|
-
type: PropType<import('@pubinfo/pro-components').ToolBarSetting[] | boolean>;
|
|
1476
|
+
type: import('../../../../../node_modules/.pnpm/vue@3.5.17_typescript@5.8.3/node_modules/vue').PropType<import('@pubinfo/pro-components').ToolBarSetting[] | boolean>;
|
|
1477
1477
|
default: () => never[];
|
|
1478
1478
|
};
|
|
1479
1479
|
}>> | undefined;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pubinfo/module-rbac",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.0.
|
|
4
|
+
"version": "2.0.2",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"@pubinfo/pro-components": "^1.7.3",
|
|
25
25
|
"alova": "^3.3.4",
|
|
26
26
|
"ant-design-vue": "^4.2.6",
|
|
27
|
-
"pubinfo": "2.0.
|
|
27
|
+
"pubinfo": "2.0.2"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@destyler/color-picker": "^0.1.0",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"alova": "^3.3.4",
|
|
49
49
|
"ant-design-vue": "^4.2.6",
|
|
50
50
|
"type-fest": "^4.41.0",
|
|
51
|
-
"pubinfo": "2.0.
|
|
51
|
+
"pubinfo": "2.0.2"
|
|
52
52
|
},
|
|
53
53
|
"scripts": {
|
|
54
54
|
"dev": "pubinfo build -w --sourcemap",
|
|
@@ -356,73 +356,87 @@ const previewBoxPadding = 4; // 与 shapeBoxDefaults 中的 padding 对齐
|
|
|
356
356
|
/>
|
|
357
357
|
</div>
|
|
358
358
|
<!-- 图标颜色设置:始终显示;非 AntD 图标时禁用 -->
|
|
359
|
-
<div class="flex items-center gap-3 w-full">
|
|
360
|
-
<
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
359
|
+
<div class="flex items-center gap-3 mb-0! w-full flex-col">
|
|
360
|
+
<div class="flex">
|
|
361
|
+
<label class="text-12px opacity-70 w-14 shrink-0 flex items-center">
|
|
362
|
+
图标色
|
|
363
|
+
<a-tooltip>
|
|
364
|
+
<template #title>
|
|
365
|
+
仅 Ant Design 图标有效
|
|
366
|
+
</template>
|
|
367
|
+
<PubinfoIcon name="i-carbon-information" size="12px" class="ml-1 cursor-help" />
|
|
368
|
+
</a-tooltip>
|
|
369
|
+
</label>
|
|
370
|
+
<div class="flex flex-col">
|
|
371
|
+
<a-input
|
|
372
|
+
v-model:value="iconColor"
|
|
373
|
+
allow-clear
|
|
374
|
+
:placeholder="boxType === 'null' ? '默认' : '#ffffff'"
|
|
375
|
+
size="small"
|
|
376
|
+
class="flex-1 min-w-0"
|
|
377
|
+
:disabled="!isAntdIcon"
|
|
378
|
+
>
|
|
379
|
+
<template #prefix>
|
|
380
|
+
<div class="relative inline-flex items-center">
|
|
381
|
+
<button
|
|
382
|
+
type="button"
|
|
383
|
+
:disabled="!isAntdIcon"
|
|
384
|
+
class="w-4 h-4 rounded border border-gray-300 dark:border-gray-700"
|
|
385
|
+
:class="!isAntdIcon ? 'opacity-50 cursor-not-allowed' : ''"
|
|
386
|
+
:style="{ background: iconColor || '#ffffff' }"
|
|
387
|
+
@click="openIconColorPicker"
|
|
388
|
+
/>
|
|
389
|
+
<input
|
|
390
|
+
ref="iconColorPickerRef"
|
|
391
|
+
type="color"
|
|
392
|
+
:value="iconColor || '#ffffff'"
|
|
393
|
+
:disabled="!isAntdIcon"
|
|
394
|
+
class="absolute left-0 top-0 opacity-0 pointer-events-none"
|
|
395
|
+
style="width:16px;height:16px;"
|
|
396
|
+
@input="iconColor = ($event.target as HTMLInputElement).value"
|
|
397
|
+
>
|
|
398
|
+
</div>
|
|
399
|
+
</template>
|
|
400
|
+
</a-input>
|
|
401
|
+
</div>
|
|
402
|
+
</div>
|
|
403
|
+
</div>
|
|
404
|
+
<!-- 预览:固定底部 -->
|
|
405
|
+
<div class="w-full mt-auto flex aspect-square">
|
|
406
|
+
<div class="flex-1 w-full h-full py-4 rounded-md border-t border-t-dashed border-t-[#d0d7de] dark:border-t-[#30363d] flex flex-col items-center gap-2">
|
|
407
|
+
<template v-if="tempValueRef">
|
|
408
|
+
<div class="w-full h-full flex items-center justify-center">
|
|
409
|
+
<PubinfoIcon
|
|
410
|
+
v-if="boxType === 'null'"
|
|
411
|
+
:name="tempValueRef"
|
|
412
|
+
:size="80"
|
|
413
|
+
:color="(isAntdIcon && iconColor) ? iconColor : undefined"
|
|
414
|
+
/>
|
|
415
|
+
<PubinfoIcon
|
|
416
|
+
v-else
|
|
417
|
+
:name="tempValueRef"
|
|
418
|
+
:box="boxType"
|
|
419
|
+
:size="80"
|
|
420
|
+
:angle="boxAngle"
|
|
421
|
+
:background="boxBackground"
|
|
422
|
+
:radius="boxRadius"
|
|
423
|
+
:color="isAntdIcon ? (iconColor || '#ffffff') : undefined"
|
|
378
424
|
/>
|
|
379
|
-
<input
|
|
380
|
-
ref="iconColorPickerRef"
|
|
381
|
-
type="color"
|
|
382
|
-
:value="iconColor || '#ffffff'"
|
|
383
|
-
:disabled="!isAntdIcon"
|
|
384
|
-
class="absolute left-0 top-0 opacity-0 pointer-events-none"
|
|
385
|
-
style="width:16px;height:16px;"
|
|
386
|
-
@input="iconColor = ($event.target as HTMLInputElement).value"
|
|
387
|
-
>
|
|
388
425
|
</div>
|
|
389
426
|
</template>
|
|
390
|
-
</
|
|
427
|
+
</div>
|
|
391
428
|
</div>
|
|
392
429
|
</div>
|
|
393
|
-
<!--
|
|
394
|
-
<div class="
|
|
395
|
-
<
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
:color="(isAntdIcon && iconColor) ? iconColor : undefined"
|
|
402
|
-
/>
|
|
403
|
-
<PubinfoIcon
|
|
404
|
-
v-else
|
|
405
|
-
:name="tempValueRef"
|
|
406
|
-
:box="boxType"
|
|
407
|
-
:size="80"
|
|
408
|
-
:angle="boxAngle"
|
|
409
|
-
:background="boxBackground"
|
|
410
|
-
:radius="boxRadius"
|
|
411
|
-
:color="isAntdIcon ? (iconColor || '#ffffff') : undefined"
|
|
412
|
-
/>
|
|
413
|
-
</template>
|
|
414
|
-
</div>
|
|
430
|
+
<!-- 侧栏底部操作按钮 -->
|
|
431
|
+
<div class="mt-4 flex justify-end gap-2">
|
|
432
|
+
<a-button @click="handleClose">
|
|
433
|
+
取消
|
|
434
|
+
</a-button>
|
|
435
|
+
<a-button type="primary" @click="handleConfirm">
|
|
436
|
+
确定
|
|
437
|
+
</a-button>
|
|
415
438
|
</div>
|
|
416
439
|
</div>
|
|
417
|
-
<!-- 侧栏底部操作按钮 -->
|
|
418
|
-
<div class="mt-4 flex justify-end gap-2">
|
|
419
|
-
<a-button @click="handleClose">
|
|
420
|
-
取消
|
|
421
|
-
</a-button>
|
|
422
|
-
<a-button type="primary" @click="handleConfirm">
|
|
423
|
-
确定
|
|
424
|
-
</a-button>
|
|
425
|
-
</div>
|
|
426
440
|
</div>
|
|
427
441
|
</div>
|
|
428
442
|
</a-modal>
|
|
@@ -17,32 +17,77 @@ const modelValue = defineModel<Form>({
|
|
|
17
17
|
},
|
|
18
18
|
});
|
|
19
19
|
|
|
20
|
-
//
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
20
|
+
// 仅当选择了非空的 boxType 时才把 iconOptions 持久化到 meta.iconOptions,
|
|
21
|
+
// 避免未选择边框模式时仍写入多余数据导致后端解析问题。
|
|
22
|
+
interface LocalIconOptions {
|
|
23
|
+
boxType: 'null' | 'square' | 'prism'
|
|
24
|
+
angle: number
|
|
25
|
+
background: { from: string, to: string } | string
|
|
26
|
+
radius: number
|
|
27
|
+
iconColor: string
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function createDefaultIconOptions(): LocalIconOptions {
|
|
31
|
+
return {
|
|
32
|
+
boxType: 'null',
|
|
33
|
+
angle: 65,
|
|
34
|
+
background: { from: '#65E54A', to: '#35C724' },
|
|
35
|
+
radius: 6,
|
|
36
|
+
iconColor: '',
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
const metaRef = computed(() => (modelValue.value.meta as any) || ((modelValue.value.meta as any) = {}));
|
|
41
|
+
|
|
42
|
+
// 本地响应式副本,解决:刷新后后端异步填充 meta.iconOptions(对象引用被整体替换)导致视图仍指向初始默认对象的问题。
|
|
43
|
+
const iconOptions = reactive<LocalIconOptions>(createDefaultIconOptions());
|
|
44
|
+
|
|
45
|
+
// 监听 meta.iconOptions 的“引用”变化(后端数据覆盖时)并合并到本地副本;
|
|
46
|
+
// 不用 deep 避免属性级别循环触发。
|
|
47
|
+
watch(
|
|
48
|
+
() => metaRef.value.iconOptions,
|
|
49
|
+
(val) => {
|
|
50
|
+
if (val) {
|
|
51
|
+
Object.assign(iconOptions, createDefaultIconOptions(), val);
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
// 若后端未提供,重置为默认值
|
|
55
|
+
Object.assign(iconOptions, createDefaultIconOptions());
|
|
32
56
|
}
|
|
33
|
-
return meta.iconOptions;
|
|
34
57
|
},
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
58
|
+
{ immediate: true },
|
|
59
|
+
);
|
|
60
|
+
|
|
61
|
+
// 将本地修改“写回” meta.iconOptions,使用浅比较避免无限循环。
|
|
62
|
+
watch(
|
|
63
|
+
iconOptions,
|
|
64
|
+
(val) => {
|
|
65
|
+
if (!modelValue.value.icon) {
|
|
66
|
+
if (metaRef.value.iconOptions) {
|
|
67
|
+
Reflect.deleteProperty(metaRef.value, 'iconOptions');
|
|
68
|
+
}
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
const current = metaRef.value.iconOptions;
|
|
72
|
+
let changed = false;
|
|
73
|
+
if (!current) {
|
|
74
|
+
changed = true;
|
|
75
|
+
}
|
|
76
|
+
else {
|
|
77
|
+
const keys = new Set([...Object.keys(current), ...Object.keys(val as any)]);
|
|
78
|
+
for (const k of keys) {
|
|
79
|
+
if ((current as any)[k] !== (val as any)[k]) {
|
|
80
|
+
changed = true;
|
|
81
|
+
break;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
if (changed) {
|
|
86
|
+
metaRef.value.iconOptions = { ...(val as any) };
|
|
87
|
+
}
|
|
44
88
|
},
|
|
45
|
-
}
|
|
89
|
+
{ deep: true },
|
|
90
|
+
);
|
|
46
91
|
|
|
47
92
|
const show = computed(() => {
|
|
48
93
|
const type = modelValue.value.type as RESOURCE_TYPE;
|
|
@@ -61,13 +106,14 @@ const isDynamicRoutesForm = computed(() => {
|
|
|
61
106
|
function clearIcon(e: MouseEvent) {
|
|
62
107
|
e.stopPropagation();
|
|
63
108
|
if (modelValue.value.icon) {
|
|
64
|
-
modelValue.value.icon = undefined; //
|
|
109
|
+
modelValue.value.icon = undefined; // 设为 undefined 以触发 v-if 切换
|
|
110
|
+
Reflect.deleteProperty(metaRef.value, 'iconOptions');
|
|
65
111
|
}
|
|
66
112
|
}
|
|
67
113
|
</script>
|
|
68
114
|
|
|
69
115
|
<template>
|
|
70
|
-
<
|
|
116
|
+
<a-form-item v-if="isDynamicRoutesForm && show.icon" label="资源图标">
|
|
71
117
|
<ResourceIconesSelect
|
|
72
118
|
v-slot="{ open }"
|
|
73
119
|
v-model="modelValue.icon"
|
|
@@ -81,17 +127,17 @@ function clearIcon(e: MouseEvent) {
|
|
|
81
127
|
<template v-if="modelValue.icon">
|
|
82
128
|
<!-- 已选择图标展示盒子 -->
|
|
83
129
|
<div
|
|
84
|
-
class="size-
|
|
130
|
+
class="size-64px flex justify-center items-center cursor-pointer
|
|
85
131
|
rounded-md border-px border-dashed relative group
|
|
86
132
|
border-[#d9d9d9] dark:border-[#424242]
|
|
87
|
-
hover:border-[#5794f7] dark:hover:border-[#5187e1]"
|
|
133
|
+
hover:border-[#5794f7] dark:hover:border-[#5187e1] p-8px"
|
|
88
134
|
@click="open"
|
|
89
135
|
>
|
|
90
136
|
<PubinfoIcon
|
|
91
137
|
v-if="iconOptions.boxType && iconOptions.boxType !== 'null'"
|
|
92
138
|
:name="modelValue.icon"
|
|
93
139
|
:box="iconOptions.boxType"
|
|
94
|
-
|
|
140
|
+
size="48px"
|
|
95
141
|
:radius="iconOptions.radius"
|
|
96
142
|
:background="iconOptions.background"
|
|
97
143
|
:angle="iconOptions.angle"
|
|
@@ -100,7 +146,7 @@ function clearIcon(e: MouseEvent) {
|
|
|
100
146
|
<PubinfoIcon
|
|
101
147
|
v-else
|
|
102
148
|
:name="modelValue.icon"
|
|
103
|
-
size="
|
|
149
|
+
size="48px"
|
|
104
150
|
:color="(modelValue.icon || '').startsWith('antd:') ? (iconOptions.iconColor || undefined) : undefined"
|
|
105
151
|
/>
|
|
106
152
|
<!-- 清除按钮 -->
|
|
@@ -118,7 +164,7 @@ function clearIcon(e: MouseEvent) {
|
|
|
118
164
|
<!-- null icon select box -->
|
|
119
165
|
<template v-else>
|
|
120
166
|
<div
|
|
121
|
-
class="size-
|
|
167
|
+
class="size-64px flex justify-center items-center
|
|
122
168
|
rounded-md border-px border-dashed cursor-pointer
|
|
123
169
|
border-[#d9d9d9] dark:border-[#424242]
|
|
124
170
|
hover:border-[#5794f7] dark:hover:border-[#5187e1]
|
|
@@ -134,5 +180,5 @@ function clearIcon(e: MouseEvent) {
|
|
|
134
180
|
</div>
|
|
135
181
|
</template>
|
|
136
182
|
</ResourceIconesSelect>
|
|
137
|
-
</
|
|
183
|
+
</a-form-item>
|
|
138
184
|
</template>
|
|
@@ -203,42 +203,40 @@ defineExpose({
|
|
|
203
203
|
:label-col="{ style: { width: '100px' } }"
|
|
204
204
|
>
|
|
205
205
|
<a-row :gutter="8">
|
|
206
|
-
<a-col :span="
|
|
207
|
-
<a-
|
|
208
|
-
<
|
|
209
|
-
<
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
<a-
|
|
217
|
-
<
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
<!-- <PubinfoIcon v-if="form.type" :name="`resource-${RESOURCE_ICON[Number(form.type)]}`" class="text-xl" />
|
|
206
|
+
<a-col v-if="parentNode?.name" :span="24">
|
|
207
|
+
<a-form-item name="parentId">
|
|
208
|
+
<template #label>
|
|
209
|
+
<DatabaseOutlined class="mr-1" />
|
|
210
|
+
父资源
|
|
211
|
+
</template>
|
|
212
|
+
{{ parentNode?.name }}
|
|
213
|
+
</a-form-item>
|
|
214
|
+
</a-col>
|
|
215
|
+
<a-col :span="24">
|
|
216
|
+
<a-form-item label="资源类型" name="type">
|
|
217
|
+
<div
|
|
218
|
+
v-if="state.title === ACTION.EDIT"
|
|
219
|
+
class="flex items-center space-x-1"
|
|
220
|
+
>
|
|
221
|
+
<!-- <PubinfoIcon v-if="form.type" :name="`resource-${RESOURCE_ICON[Number(form.type)]}`" class="text-xl" />
|
|
223
222
|
<span>
|
|
224
223
|
{{ resourceComputedOptions.find(e => e.value === form.type)?.label }}
|
|
225
224
|
</span> -->
|
|
226
225
|
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
</a-col>
|
|
226
|
+
<a-tag v-if="form.type" :color="RESOURCE_COLOR[Number(form.type)]" :bordered="false">
|
|
227
|
+
{{ resourceComputedOptions.find(e => e.value === form.type)?.label }}
|
|
228
|
+
</a-tag>
|
|
229
|
+
</div>
|
|
230
|
+
<a-radio-group
|
|
231
|
+
v-else
|
|
232
|
+
v-model:value="form.type"
|
|
233
|
+
:options="resourceComputedOptions"
|
|
234
|
+
option-type="button"
|
|
235
|
+
button-style="solid"
|
|
236
|
+
/>
|
|
237
|
+
</a-form-item>
|
|
240
238
|
</a-col>
|
|
241
|
-
<a-col :span="
|
|
239
|
+
<a-col :span="24">
|
|
242
240
|
<ResourceIconSelect v-model="form" />
|
|
243
241
|
</a-col>
|
|
244
242
|
</a-row>
|