@pubinfo/module-rbac 2.0.13 → 2.0.15
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/{DynamicRoutesForm-DzOGoyf3.js → DynamicRoutesForm-BU4EAISs.js} +1 -1
- package/dist/{DynamicRoutesForm.vue_vue_type_script_setup_true_lang-lpCaLpPL.js → DynamicRoutesForm.vue_vue_type_script_setup_true_lang-bEqJ03T_.js} +6 -6
- package/dist/{IconSelect-Cco4lJFZ.js → IconSelect-DtNpk3Rj.js} +1 -1
- package/dist/{IconSelect.vue_vue_type_script_setup_true_lang-C9GJFjrV.js → IconSelect.vue_vue_type_script_setup_true_lang-D450SiKg.js} +64 -64
- package/dist/{ImportExport-BD8o7IvB.js → ImportExport-DAe_Sl13.js} +1 -1
- package/dist/{ImportExport.vue_vue_type_script_setup_true_lang-BzdP0ADd.js → ImportExport.vue_vue_type_script_setup_true_lang-CV0DrMvw.js} +1 -1
- package/dist/{LayoutForm-DqDnsQcr.js → LayoutForm-C-vNwp3q.js} +1 -1
- package/dist/{MetaForm-s74FbAc9.js → MetaForm-13JASu7v.js} +133 -104
- package/dist/MetaForm.css +1 -1
- package/dist/{ResourceEdit-CNYAteRE.js → ResourceEdit-D2YFu-Gk.js} +1 -1
- package/dist/{ResourceEdit.vue_vue_type_script_setup_true_lang-BLqs77A8.js → ResourceEdit.vue_vue_type_script_setup_true_lang-Cb0mKIlJ.js} +45 -49
- package/dist/{enum-CjyX3J0o.js → enum-D5iPiZiT.js} +0 -1
- package/dist/{index-BsZjgoZQ.js → index-BPkJOFXE.js} +3 -3
- package/dist/index.js +1507 -1531
- package/dist/index17.css +1 -1
- package/dist/views/resource/model.d.ts +1 -0
- package/package.json +7 -7
- package/src/views/resource/components/DynamicRoutesForm.vue +1 -1
- package/src/views/resource/components/IconSelect.vue +1 -1
- package/src/views/resource/components/MetaForm.vue +11 -0
- package/src/views/resource/components/ResourceEdit.vue +2 -8
- package/src/views/resource/enum.ts +0 -1
- package/src/views/resource/hooks/useMetaForm.ts +2 -0
- package/src/views/resource/index.vue +0 -3
- package/src/views/resource/model.ts +2 -0
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.15",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
@@ -21,10 +21,10 @@
|
|
|
21
21
|
},
|
|
22
22
|
"peerDependencies": {
|
|
23
23
|
"@ant-design/icons-vue": "^7.0.1",
|
|
24
|
-
"@pubinfo/pro-components": "^1.
|
|
24
|
+
"@pubinfo/pro-components": "^1.8.0",
|
|
25
25
|
"alova": "^3.3.4",
|
|
26
26
|
"ant-design-vue": "^4.2.6",
|
|
27
|
-
"pubinfo": "2.0.
|
|
27
|
+
"pubinfo": "2.0.15"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@destyler/color-picker": "^0.1.0",
|
|
@@ -40,15 +40,15 @@
|
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@ant-design/icons-vue": "^7.0.1",
|
|
43
|
-
"@pubinfo/openapi": "^0.9.
|
|
44
|
-
"@pubinfo/preset-openapi": "^0.9.
|
|
45
|
-
"@pubinfo/pro-components": "^1.
|
|
43
|
+
"@pubinfo/openapi": "^0.9.1",
|
|
44
|
+
"@pubinfo/preset-openapi": "^0.9.1",
|
|
45
|
+
"@pubinfo/pro-components": "^1.8.0",
|
|
46
46
|
"@types/file-saver": "^2.0.7",
|
|
47
47
|
"@types/lodash-es": "^4.17.12",
|
|
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.15"
|
|
52
52
|
},
|
|
53
53
|
"scripts": {
|
|
54
54
|
"dev": "pubinfo build -w --sourcemap",
|
|
@@ -24,7 +24,7 @@ const show = computed(() => {
|
|
|
24
24
|
const type = form.value.type as RESOURCE_TYPE;
|
|
25
25
|
|
|
26
26
|
return {
|
|
27
|
-
path: [RESOURCE_TYPE.INDEX, RESOURCE_TYPE.MENU, RESOURCE_TYPE.
|
|
27
|
+
path: [RESOURCE_TYPE.INDEX, RESOURCE_TYPE.MENU, RESOURCE_TYPE.NON_MENU, RESOURCE_TYPE.IFRAME, RESOURCE_TYPE.LINK].includes(type),
|
|
28
28
|
component: [RESOURCE_TYPE.MENU, RESOURCE_TYPE.NON_MENU].includes(type),
|
|
29
29
|
iframe: [RESOURCE_TYPE.IFRAME].includes(type),
|
|
30
30
|
link: [RESOURCE_TYPE.LINK].includes(type),
|
|
@@ -95,7 +95,7 @@ const show = computed(() => {
|
|
|
95
95
|
const type = modelValue.value.type as RESOURCE_TYPE;
|
|
96
96
|
|
|
97
97
|
return {
|
|
98
|
-
icon: [RESOURCE_TYPE.DYNAMIC_APP, RESOURCE_TYPE.
|
|
98
|
+
icon: [RESOURCE_TYPE.DYNAMIC_APP, RESOURCE_TYPE.INDEX, RESOURCE_TYPE.MENU, RESOURCE_TYPE.IFRAME, RESOURCE_TYPE.LINK].includes(type),
|
|
99
99
|
};
|
|
100
100
|
});
|
|
101
101
|
|
|
@@ -80,6 +80,17 @@ const { show } = useMetaForm(form);
|
|
|
80
80
|
</HoverCard>
|
|
81
81
|
</a-col>
|
|
82
82
|
|
|
83
|
+
<a-col v-if="show.iframe" :span="12">
|
|
84
|
+
<a-form-item name="enable" :label-col="{ span: 0 }">
|
|
85
|
+
<HoverCard class="flex items-center justify-between">
|
|
86
|
+
<div class="text-sm font-medium">
|
|
87
|
+
启用缓存
|
|
88
|
+
</div>
|
|
89
|
+
<a-switch v-model:checked="form.meta!.iframeCache" />
|
|
90
|
+
</HoverCard>
|
|
91
|
+
</a-form-item>
|
|
92
|
+
</a-col>
|
|
93
|
+
|
|
83
94
|
<!-- 缓存标签页:仅在菜单中显示 -->
|
|
84
95
|
<a-col v-if="show.cacheAndPin" :span="12">
|
|
85
96
|
<HoverCard :more="form.meta?.cache" class="flex flex-wrap items-center">
|
|
@@ -73,7 +73,6 @@ function recursiveTreeFind<T extends { children?: T[] }>(tree: T[], fn: (node: T
|
|
|
73
73
|
const resourceComputedOptions = computed(() => {
|
|
74
74
|
switch (parentNode.value?.type) {
|
|
75
75
|
case RESOURCE_TYPE.APP:
|
|
76
|
-
case RESOURCE_TYPE.MICRO_APP:
|
|
77
76
|
case RESOURCE_TYPE.DYNAMIC_APP:
|
|
78
77
|
return resourceOptions.filter(node => [RESOURCE_TYPE.INDEX, RESOURCE_TYPE.MENU, RESOURCE_TYPE.IFRAME, RESOURCE_TYPE.LINK].includes(node.value));
|
|
79
78
|
|
|
@@ -90,7 +89,7 @@ const resourceComputedOptions = computed(() => {
|
|
|
90
89
|
return [];
|
|
91
90
|
|
|
92
91
|
default:
|
|
93
|
-
return resourceOptions.filter(node => [RESOURCE_TYPE.APP,
|
|
92
|
+
return resourceOptions.filter(node => [RESOURCE_TYPE.APP, RESOURCE_TYPE.DYNAMIC_APP].includes(node.value));
|
|
94
93
|
}
|
|
95
94
|
});
|
|
96
95
|
|
|
@@ -220,16 +219,11 @@ defineExpose({
|
|
|
220
219
|
</a-form-item>
|
|
221
220
|
</a-col>
|
|
222
221
|
<a-col :span="24">
|
|
223
|
-
<a-form-item label="资源类型" name="type">
|
|
222
|
+
<a-form-item label="资源类型" name="type" :tooltip="!parentNode?.type ? '动态应用为后端路由,应用为前端路由' : ''">
|
|
224
223
|
<div
|
|
225
224
|
v-if="state.title === ACTION.EDIT"
|
|
226
225
|
class="flex items-center space-x-1"
|
|
227
226
|
>
|
|
228
|
-
<!-- <PubinfoIcon v-if="form.type" :name="`resource-${RESOURCE_ICON[Number(form.type)]}`" class="text-xl" />
|
|
229
|
-
<span>
|
|
230
|
-
{{ resourceComputedOptions.find(e => e.value === form.type)?.label }}
|
|
231
|
-
</span> -->
|
|
232
|
-
|
|
233
227
|
<a-tag v-if="form.type" :color="RESOURCE_COLOR[Number(form.type)]" :bordered="false">
|
|
234
228
|
{{ resourceComputedOptions.find(e => e.value === form.type)?.label }}
|
|
235
229
|
</a-tag>
|
|
@@ -24,7 +24,6 @@ export const RESOURCE_COLOR = ['', 'geekblue', 'blue', 'default', 'cyan', 'defau
|
|
|
24
24
|
export const resourceOptions = [
|
|
25
25
|
{ label: '动态应用', value: RESOURCE_TYPE.DYNAMIC_APP },
|
|
26
26
|
{ label: '应用', value: RESOURCE_TYPE.APP },
|
|
27
|
-
{ label: '微应用', value: RESOURCE_TYPE.MICRO_APP },
|
|
28
27
|
{ label: '目录', value: RESOURCE_TYPE.INDEX },
|
|
29
28
|
{ label: '菜单', value: RESOURCE_TYPE.MENU },
|
|
30
29
|
{ label: '按钮', value: RESOURCE_TYPE.BUTTON },
|
|
@@ -42,9 +42,6 @@ const columns: ProColumns<TreeNode> = [
|
|
|
42
42
|
customRender({ text }) {
|
|
43
43
|
return (
|
|
44
44
|
<div class="flex items-center space-x-1">
|
|
45
|
-
{/* <PubinfoIcon name={`resource-${RESOURCE_ICON[text]}`} class="text-xl" />
|
|
46
|
-
<span>{resourceOptions.find(item => item.value === text)?.label}</span> */}
|
|
47
|
-
|
|
48
45
|
<Tag color={RESOURCE_COLOR[text]} bordered={false}>{resourceOptions.find(item => item.value === text)?.label}</Tag>
|
|
49
46
|
</div>
|
|
50
47
|
);
|
|
@@ -46,6 +46,7 @@ export interface CustomMeta {
|
|
|
46
46
|
breadcrumb: boolean
|
|
47
47
|
link?: string
|
|
48
48
|
iframe?: string
|
|
49
|
+
iframeCache?: boolean
|
|
49
50
|
layout: CustomMetaLayout
|
|
50
51
|
partyLogin?: any[] // 第三方登录配置数据
|
|
51
52
|
}
|
|
@@ -67,6 +68,7 @@ export const defaultMeta: CustomMeta = {
|
|
|
67
68
|
breadcrumb: true,
|
|
68
69
|
link: undefined,
|
|
69
70
|
iframe: undefined,
|
|
71
|
+
iframeCache: false,
|
|
70
72
|
layout: {
|
|
71
73
|
header: true,
|
|
72
74
|
sidebar: true,
|