@ibiz-template/vue3-components 0.7.41-alpha.17 → 0.7.41-alpha.18
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/chart-q7pMKjYo.js +1 -0
- package/dist/ibiz-markdown-editor-e33m6ees.js +1 -0
- package/dist/index-dXwgWAM8.js +11 -0
- package/dist/index.min.css +1 -1
- package/dist/index.system.min.js +1 -1
- package/dist/map-chart-user-NYROZ-6g.js +1 -0
- package/dist/wang-editor-4OlaBV3P.js +1 -0
- package/dist/{xlsx-util-jYyM8alm.js → xlsx-util-Rg-AbK_G.js} +1 -1
- package/es/common/control-navigation/provider/calendar-navigation.provider.mjs +3 -1
- package/es/common/control-navigation/provider/index.mjs +1 -1
- package/es/common/control-navigation/provider/map-navigation.provider.d.ts +8 -2
- package/es/common/control-navigation/provider/map-navigation.provider.mjs +20 -1
- package/es/common/map-chart-user/map-chart-user.css +1 -1
- package/es/common/map-chart-user/map-chart-user.d.ts +11 -1
- package/es/common/map-chart-user/map-chart-user.mjs +82 -6
- package/es/common/map-chart-user/map-chart-user.util.d.ts +2 -0
- package/es/common/map-chart-user/map-chart-user.util.mjs +54 -3
- package/es/common/map-chart-user/map-user-manager.d.ts +2 -0
- package/es/common/map-chart-user/map-user-manager.mjs +46 -10
- package/es/control/calendar/components/calendar-daily/calendar-daily.css +1 -1
- package/es/control/calendar/components/calendar-daily/calendar-daily.mjs +30 -43
- package/es/control/calendar/components/calendar-daily/use-calendar-daily.d.ts +6 -2
- package/es/control/calendar/components/calendar-daily/use-calendar-daily.mjs +37 -4
- package/es/control/calendar/components/calendar-user/calendar-user.css +1 -1
- package/es/control/calendar/components/calendar-user/calendar-user.mjs +1 -0
- package/es/control/calendar/components/calendar-week/calendar-week.css +1 -1
- package/es/control/calendar/components/calendar-week/calendar-week.mjs +30 -45
- package/es/control/calendar/components/calendar-week/use-calendar-week.d.ts +6 -2
- package/es/control/calendar/components/calendar-week/use-calendar-week.mjs +37 -4
- package/es/control/calendar/components/custom-calendar/custom-calendar.css +1 -1
- package/es/control/calendar/components/util/index.mjs +1 -1
- package/es/control/calendar/components/util/util.d.ts +30 -2
- package/es/control/calendar/components/util/util.mjs +32 -2
- package/es/control/chart/chart.mjs +1 -0
- package/es/control/data-view/data-view.d.ts +1 -1
- package/es/control/data-view/index.d.ts +1 -1
- package/es/control/drtab/drtab-control.util.mjs +1 -1
- package/es/control/drtab/drtab.controller.d.ts +5 -0
- package/es/control/drtab/drtab.controller.mjs +19 -0
- package/es/control/drtab/flow-drtab.css +1 -1
- package/es/control/drtab/flow-drtab.mjs +6 -1
- package/es/control/exp-bar/render-util.mjs +1 -12
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-grid/repeater-grid.mjs +8 -4
- package/es/control/form/form-detail/form-tab-panel/form-tab-panel.css +1 -1
- package/es/control/form/form-detail/form-tab-panel/form-tab-panel.mjs +2 -1
- package/es/control/gantt/gantt.css +1 -1
- package/es/control/gantt/gantt.d.ts +4 -2
- package/es/control/gantt/gantt.mjs +130 -5
- package/es/control/gantt/index.d.ts +4 -2
- package/es/control/grid/grid/grid.d.ts +1 -1
- package/es/control/grid/grid/index.d.ts +1 -1
- package/es/control/grid/grid-column/grid-field-column/attachment-column/attachment-column.mjs +11 -2
- package/es/control/grid/grid-column/grid-field-column/attachment-column/file-util.d.ts +1 -1
- package/es/control/grid/grid-column/grid-field-column/attachment-column/file-util.mjs +39 -24
- package/es/control/grid/grid-column/grid-field-column/grid-field-column.css +1 -1
- package/es/control/grid/virtualized-table/index.d.ts +1 -1
- package/es/control/grid/virtualized-table/virtualized-table.d.ts +1 -1
- package/es/control/kanban/index.d.ts +1 -1
- package/es/control/kanban/kanban.d.ts +1 -1
- package/es/control/list/index.d.ts +1 -1
- package/es/control/list/list.d.ts +1 -1
- package/es/control/list/list.mjs +1 -1
- package/es/control/map/map.mjs +1 -1
- package/es/control/tree/index.d.ts +1 -1
- package/es/control/tree/tree.d.ts +5 -5
- package/es/control/tree/tree.mjs +5 -13
- package/es/control/tree-grid/index.d.ts +7 -1
- package/es/control/tree-grid/tree-grid.d.ts +7 -1
- package/es/control/tree-grid/tree-grid.mjs +62 -55
- package/es/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-edit-column/all-edit.mjs +3 -1
- package/es/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-ua-column/tree-grid-ex-ua-column.css +1 -1
- package/es/control/tree-grid-ex/tree-grid-ex.css +1 -1
- package/es/control/tree-grid-ex/tree-grid-ex.mjs +32 -28
- package/es/editor/carousel/ibiz-carousel/ibiz-carousel.d.ts +2 -75
- package/es/editor/carousel/ibiz-carousel/ibiz-carousel.mjs +24 -12
- package/es/editor/data-picker/ibiz-picker/ibiz-picker.mjs +17 -1
- package/es/editor/dropdown-list/ibiz-virtualized-list/ibiz-virtualized-list.mjs +4 -2
- package/es/editor/html/wang-editor/wang-editor.mjs +29 -7
- package/es/editor/markdown/ibiz-markdown-editor/ibiz-markdown-editor.mjs +36 -5
- package/es/editor/upload/use/use-iview-upload.d.ts +0 -1
- package/es/editor/upload/use/use-iview-upload.mjs +50 -25
- package/es/locale/en/index.d.ts +5 -0
- package/es/locale/zh-CN/index.d.ts +5 -0
- package/es/panel-component/app-extend-menu/bottom-side-menu/bottom-side-menu.d.ts +1 -1
- package/es/panel-component/app-extend-menu/left-side-menu/left-side-menu.d.ts +1 -1
- package/es/panel-component/app-extend-menu/right-side-menu/right-side-menu.d.ts +1 -1
- package/es/panel-component/app-extend-menu/top-side-menu/top-side-menu.d.ts +1 -1
- package/es/panel-component/nav-breadcrumb/index.d.ts +1 -0
- package/es/panel-component/nav-breadcrumb/nav-breadcrumb.controller.d.ts +8 -1
- package/es/panel-component/nav-breadcrumb/nav-breadcrumb.controller.mjs +64 -18
- package/es/panel-component/nav-breadcrumb/nav-breadcrumb.css +1 -1
- package/es/panel-component/nav-breadcrumb/nav-breadcrumb.d.ts +3 -1
- package/es/panel-component/nav-breadcrumb/nav-breadcrumb.mjs +14 -3
- package/es/panel-component/nav-breadcrumb/nav-breadcrumb.service.d.ts +1 -1
- package/es/panel-component/nav-breadcrumb/nav-breadcrumb.service.mjs +5 -6
- package/es/panel-component/nav-breadcrumb/nav-breadcrumb.state.d.ts +8 -0
- package/es/panel-component/nav-breadcrumb/nav-breadcrumb.state.mjs +6 -0
- package/es/panel-component/nav-breadcrumb/nav-breadcrumb.util.d.ts +26 -1
- package/es/panel-component/nav-breadcrumb/nav-breadcrumb.util.mjs +50 -6
- package/es/panel-component/user-message/async-action/async-data-export/async-data-export.d.ts +1 -0
- package/es/panel-component/user-message/async-action/async-data-export/async-data-export.mjs +3 -1
- package/es/util/fullscreen/fullscreen-util.mjs +1 -1
- package/es/view-engine/calendar-exp-view.engine.d.ts +6 -7
- package/es/view-engine/calendar-exp-view.engine.mjs +6 -24
- package/es/view-engine/edit-view.engine.d.ts +11 -0
- package/es/view-engine/edit-view.engine.mjs +12 -0
- package/es/view-engine/login-view.engine.d.ts +11 -1
- package/es/view-engine/login-view.engine.mjs +9 -5
- package/es/view-engine/mpickup-view-engine.d.ts +8 -1
- package/es/view-engine/mpickup-view-engine.mjs +14 -8
- package/es/view-engine/pickup-view.engine.d.ts +8 -1
- package/es/view-engine/pickup-view.engine.mjs +15 -0
- package/lib/common/control-navigation/provider/calendar-navigation.provider.cjs +3 -1
- package/lib/common/control-navigation/provider/index.cjs +1 -1
- package/lib/common/control-navigation/provider/map-navigation.provider.cjs +20 -1
- package/lib/common/map-chart-user/map-chart-user.cjs +81 -5
- package/lib/common/map-chart-user/map-chart-user.css +1 -1
- package/lib/common/map-chart-user/map-chart-user.util.cjs +54 -3
- package/lib/common/map-chart-user/map-user-manager.cjs +46 -10
- package/lib/control/calendar/components/calendar-daily/calendar-daily.cjs +29 -42
- package/lib/control/calendar/components/calendar-daily/calendar-daily.css +1 -1
- package/lib/control/calendar/components/calendar-daily/use-calendar-daily.cjs +35 -2
- package/lib/control/calendar/components/calendar-user/calendar-user.cjs +1 -0
- package/lib/control/calendar/components/calendar-user/calendar-user.css +1 -1
- package/lib/control/calendar/components/calendar-week/calendar-week.cjs +29 -44
- package/lib/control/calendar/components/calendar-week/calendar-week.css +1 -1
- package/lib/control/calendar/components/calendar-week/use-calendar-week.cjs +35 -2
- package/lib/control/calendar/components/custom-calendar/custom-calendar.css +1 -1
- package/lib/control/calendar/components/util/index.cjs +4 -0
- package/lib/control/calendar/components/util/util.cjs +34 -0
- package/lib/control/chart/chart.cjs +1 -0
- package/lib/control/drtab/drtab-control.util.cjs +1 -1
- package/lib/control/drtab/drtab.controller.cjs +19 -0
- package/lib/control/drtab/flow-drtab.cjs +5 -0
- package/lib/control/drtab/flow-drtab.css +1 -1
- package/lib/control/exp-bar/render-util.cjs +1 -12
- package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-grid/repeater-grid.cjs +7 -3
- package/lib/control/form/form-detail/form-tab-panel/form-tab-panel.cjs +2 -1
- package/lib/control/form/form-detail/form-tab-panel/form-tab-panel.css +1 -1
- package/lib/control/gantt/gantt.cjs +129 -4
- package/lib/control/gantt/gantt.css +1 -1
- package/lib/control/grid/grid-column/grid-field-column/attachment-column/attachment-column.cjs +11 -2
- package/lib/control/grid/grid-column/grid-field-column/attachment-column/file-util.cjs +39 -24
- package/lib/control/grid/grid-column/grid-field-column/grid-field-column.css +1 -1
- package/lib/control/list/list.cjs +1 -1
- package/lib/control/map/map.cjs +1 -1
- package/lib/control/tree/tree.cjs +5 -13
- package/lib/control/tree-grid/tree-grid.cjs +62 -55
- package/lib/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-edit-column/all-edit.cjs +3 -1
- package/lib/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-ua-column/tree-grid-ex-ua-column.css +1 -1
- package/lib/control/tree-grid-ex/tree-grid-ex.cjs +32 -28
- package/lib/control/tree-grid-ex/tree-grid-ex.css +1 -1
- package/lib/editor/carousel/ibiz-carousel/ibiz-carousel.cjs +24 -12
- package/lib/editor/data-picker/ibiz-picker/ibiz-picker.cjs +17 -1
- package/lib/editor/dropdown-list/ibiz-virtualized-list/ibiz-virtualized-list.cjs +4 -2
- package/lib/editor/html/wang-editor/wang-editor.cjs +29 -7
- package/lib/editor/markdown/ibiz-markdown-editor/ibiz-markdown-editor.cjs +36 -5
- package/lib/editor/upload/use/use-iview-upload.cjs +50 -25
- package/lib/panel-component/nav-breadcrumb/nav-breadcrumb.cjs +14 -3
- package/lib/panel-component/nav-breadcrumb/nav-breadcrumb.controller.cjs +63 -17
- package/lib/panel-component/nav-breadcrumb/nav-breadcrumb.css +1 -1
- package/lib/panel-component/nav-breadcrumb/nav-breadcrumb.service.cjs +4 -5
- package/lib/panel-component/nav-breadcrumb/nav-breadcrumb.state.cjs +6 -0
- package/lib/panel-component/nav-breadcrumb/nav-breadcrumb.util.cjs +52 -5
- package/lib/panel-component/user-message/async-action/async-data-export/async-data-export.cjs +3 -1
- package/lib/util/fullscreen/fullscreen-util.cjs +1 -1
- package/lib/view-engine/calendar-exp-view.engine.cjs +6 -24
- package/lib/view-engine/edit-view.engine.cjs +12 -0
- package/lib/view-engine/login-view.engine.cjs +9 -5
- package/lib/view-engine/mpickup-view-engine.cjs +14 -8
- package/lib/view-engine/pickup-view.engine.cjs +15 -0
- package/package.json +6 -6
- package/dist/chart-8QfxarWf.js +0 -1
- package/dist/ibiz-markdown-editor-0VHzFa2l.js +0 -1
- package/dist/index-t1aZ8OJE.js +0 -11
- package/dist/map-chart-user-xOSZGbF2.js +0 -1
- package/dist/wang-editor-Y8puaTx2.js +0 -1
- package/es/editor/upload/use/use-ibiz-upload.d.ts +0 -95
- package/es/editor/upload/use/use-ibiz-upload.mjs +0 -170
- package/lib/editor/upload/use/use-ibiz-upload.cjs +0 -175
- /package/es/node_modules/.pnpm/{@ibiz-template_core@0.7.41-alpha.17_axios@1.6.8_lodash-es@4.17.21_qs@6.11.2_qx-util@0.4.8_ramda@0.29.1 → @ibiz-template_core@0.7.41-alpha.18_axios@1.6.8_lodash-es@4.17.21_qs@6.11.2_qx-util@0.4.8_ramda@0.29.1}/node_modules/@ibiz-template/core/out/utils/namespace/namespace.mjs +0 -0
- /package/lib/node_modules/.pnpm/{@ibiz-template_core@0.7.41-alpha.17_axios@1.6.8_lodash-es@4.17.21_qs@6.11.2_qx-util@0.4.8_ramda@0.29.1 → @ibiz-template_core@0.7.41-alpha.18_axios@1.6.8_lodash-es@4.17.21_qs@6.11.2_qx-util@0.4.8_ramda@0.29.1}/node_modules/@ibiz-template/core/out/utils/namespace/namespace.cjs +0 -0
|
@@ -23,7 +23,6 @@ const IBizMarkDown = /* @__PURE__ */ defineComponent({
|
|
|
23
23
|
...uploadHeaders
|
|
24
24
|
});
|
|
25
25
|
const uploadUrl = ref("");
|
|
26
|
-
const downloadUrl = ref("");
|
|
27
26
|
const customTheme = ((_a = c == null ? void 0 : c.editorParams) == null ? void 0 : _a.customTheme) || ((_b = c == null ? void 0 : c.editorParams) == null ? void 0 : _b.customtheme);
|
|
28
27
|
const {
|
|
29
28
|
UIStore
|
|
@@ -36,19 +35,51 @@ const IBizMarkDown = /* @__PURE__ */ defineComponent({
|
|
|
36
35
|
let isIgnoreChange = false;
|
|
37
36
|
watch(() => props.data, (newVal) => {
|
|
38
37
|
if (newVal && c) {
|
|
39
|
-
const
|
|
38
|
+
const editorParams = {
|
|
39
|
+
...c.editorParams
|
|
40
|
+
};
|
|
41
|
+
if (editorParams.uploadparams) {
|
|
42
|
+
editorParams.uploadParams = JSON.parse(editorParams.uploadparams);
|
|
43
|
+
}
|
|
44
|
+
const urls = ibiz.util.file.calcFileUpDownUrl(c.context, c.params, newVal, editorParams);
|
|
40
45
|
uploadUrl.value = urls.uploadUrl;
|
|
41
|
-
downloadUrl.value = urls.downloadUrl;
|
|
42
46
|
}
|
|
43
47
|
}, {
|
|
44
48
|
immediate: true,
|
|
45
49
|
deep: true
|
|
46
50
|
});
|
|
47
51
|
const markDownBox = ref();
|
|
52
|
+
const getDownloadUrl = (data, file) => {
|
|
53
|
+
if (!c) {
|
|
54
|
+
return "";
|
|
55
|
+
}
|
|
56
|
+
const editorParams = {
|
|
57
|
+
...c.editorParams
|
|
58
|
+
};
|
|
59
|
+
if (editorParams.exportparams) {
|
|
60
|
+
editorParams.exportParams = JSON.parse(editorParams.exportparams);
|
|
61
|
+
}
|
|
62
|
+
if (file && file.folder) {
|
|
63
|
+
editorParams.osscat = file.folder;
|
|
64
|
+
}
|
|
65
|
+
const urls = ibiz.util.file.calcFileUpDownUrl(c.context, c.params, data, editorParams);
|
|
66
|
+
return urls.downloadUrl;
|
|
67
|
+
};
|
|
48
68
|
const fileUpload = async (file, callback) => {
|
|
49
69
|
const data = await ibiz.util.file.fileUpload(uploadUrl.value, file, headers.value);
|
|
50
|
-
const
|
|
51
|
-
|
|
70
|
+
const downloadUrl = getDownloadUrl(props.data || {}, data.fileid);
|
|
71
|
+
let url = downloadUrl.replace("%fileId%", data.fileid);
|
|
72
|
+
if (ibiz.config.common.enableDownloadTicket && c) {
|
|
73
|
+
const downloadTicket = await ibiz.util.file.getDownloadTicket(c.context, {
|
|
74
|
+
fileId: data.fileid
|
|
75
|
+
});
|
|
76
|
+
if (downloadTicket && downloadTicket.ticket) {
|
|
77
|
+
url = downloadUrl.replace("%fileId%", downloadTicket.ticket);
|
|
78
|
+
callback(url);
|
|
79
|
+
}
|
|
80
|
+
} else {
|
|
81
|
+
callback(url);
|
|
82
|
+
}
|
|
52
83
|
};
|
|
53
84
|
const getCherryHtml = () => {
|
|
54
85
|
const result = editor == null ? void 0 : editor.getHtml();
|
|
@@ -14,7 +14,6 @@ import { UploadEditorController } from '../upload-editor.controller';
|
|
|
14
14
|
*/
|
|
15
15
|
export declare function useIViewUpload(props: IParams, valueChange: (_value: string | null) => void, c: UploadEditorController): {
|
|
16
16
|
uploadUrl: Ref<string>;
|
|
17
|
-
downloadUrl: Ref<string>;
|
|
18
17
|
headers: Ref<IData>;
|
|
19
18
|
files: Ref<{
|
|
20
19
|
id: string;
|
|
@@ -7,7 +7,6 @@ function useIViewUpload(props, valueChange, c) {
|
|
|
7
7
|
const uploadHeaders = ibiz.util.file.getUploadHeaders();
|
|
8
8
|
const headers = ref({ ...uploadHeaders });
|
|
9
9
|
const uploadUrl = ref("");
|
|
10
|
-
const downloadUrl = ref("");
|
|
11
10
|
const uploadCache = {
|
|
12
11
|
count: 0,
|
|
13
12
|
cacheFiles: []
|
|
@@ -21,6 +20,22 @@ function useIViewUpload(props, valueChange, c) {
|
|
|
21
20
|
},
|
|
22
21
|
{ immediate: true }
|
|
23
22
|
);
|
|
23
|
+
const getDownloadUrl = (data, file) => {
|
|
24
|
+
const editorParams = { ...c.editorParams };
|
|
25
|
+
if (editorParams.exportparams) {
|
|
26
|
+
editorParams.exportParams = JSON.parse(editorParams.exportparams);
|
|
27
|
+
}
|
|
28
|
+
if (file && file.folder) {
|
|
29
|
+
editorParams.osscat = file.folder;
|
|
30
|
+
}
|
|
31
|
+
const urls = ibiz.util.file.calcFileUpDownUrl(
|
|
32
|
+
c.context,
|
|
33
|
+
c.params,
|
|
34
|
+
data,
|
|
35
|
+
editorParams
|
|
36
|
+
);
|
|
37
|
+
return urls.downloadUrl;
|
|
38
|
+
};
|
|
24
39
|
watch(
|
|
25
40
|
() => props.data,
|
|
26
41
|
(newVal) => {
|
|
@@ -29,9 +44,6 @@ function useIViewUpload(props, valueChange, c) {
|
|
|
29
44
|
if (editorParams.uploadparams) {
|
|
30
45
|
editorParams.uploadParams = JSON.parse(editorParams.uploadparams);
|
|
31
46
|
}
|
|
32
|
-
if (editorParams.exportparams) {
|
|
33
|
-
editorParams.exportParams = JSON.parse(editorParams.exportparams);
|
|
34
|
-
}
|
|
35
47
|
const urls = ibiz.util.file.calcFileUpDownUrl(
|
|
36
48
|
c.context,
|
|
37
49
|
c.params,
|
|
@@ -39,7 +51,6 @@ function useIViewUpload(props, valueChange, c) {
|
|
|
39
51
|
editorParams
|
|
40
52
|
);
|
|
41
53
|
uploadUrl.value = urls.uploadUrl;
|
|
42
|
-
downloadUrl.value = urls.downloadUrl;
|
|
43
54
|
}
|
|
44
55
|
},
|
|
45
56
|
{ immediate: true, deep: true }
|
|
@@ -84,24 +95,23 @@ function useIViewUpload(props, valueChange, c) {
|
|
|
84
95
|
watch(
|
|
85
96
|
files,
|
|
86
97
|
(newVal) => {
|
|
87
|
-
if (
|
|
98
|
+
if (newVal == null ? void 0 : newVal.length) {
|
|
88
99
|
newVal.forEach((file) => {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
if (file.name.split(".").pop() === "svg") {
|
|
100
|
+
const downloadUrl = getDownloadUrl(props.data, file);
|
|
101
|
+
file.url = file.url || downloadUrl.replace("%fileId%", file.id);
|
|
102
|
+
if (ibiz.config.common.enableDownloadTicket) {
|
|
103
|
+
ibiz.util.file.getDownloadTicket(c.context, { fileId: file.id }).then((downloadTicket) => {
|
|
104
|
+
if (downloadTicket && downloadTicket.ticket) {
|
|
105
|
+
file.url = downloadUrl.replace(
|
|
106
|
+
"%fileId%",
|
|
107
|
+
downloadTicket.ticket
|
|
108
|
+
);
|
|
109
|
+
if (file.name.split(".").pop() === "svg") {
|
|
110
|
+
calcSvgPreview(file);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
} else if (file.name.split(".").pop() === "svg") {
|
|
105
115
|
calcSvgPreview(file);
|
|
106
116
|
}
|
|
107
117
|
});
|
|
@@ -115,6 +125,7 @@ function useIViewUpload(props, valueChange, c) {
|
|
|
115
125
|
_files.map((file) => ({
|
|
116
126
|
name: file.name,
|
|
117
127
|
id: file.id,
|
|
128
|
+
folder: file.folder,
|
|
118
129
|
...c.transformInfoMap(file, c.infoMap, true)
|
|
119
130
|
}))
|
|
120
131
|
) : null;
|
|
@@ -140,9 +151,13 @@ function useIViewUpload(props, valueChange, c) {
|
|
|
140
151
|
if (!response) {
|
|
141
152
|
return;
|
|
142
153
|
}
|
|
154
|
+
if (ibiz.config.common.enableDownloadTicket) {
|
|
155
|
+
ibiz.util.file.setDownloadTicket(response.id, response.ticket);
|
|
156
|
+
}
|
|
143
157
|
uploadCache.cacheFiles.push({
|
|
144
158
|
name: response.filename,
|
|
145
159
|
id: response.fileid,
|
|
160
|
+
folder: response.folder,
|
|
146
161
|
...c.transformInfoMap(response, c.infoMap)
|
|
147
162
|
});
|
|
148
163
|
if (response.name.split(".").pop() === "svg") {
|
|
@@ -175,15 +190,25 @@ function useIViewUpload(props, valueChange, c) {
|
|
|
175
190
|
emitValue();
|
|
176
191
|
};
|
|
177
192
|
const onDownload = (file) => {
|
|
178
|
-
const
|
|
179
|
-
|
|
193
|
+
const downloadUrl = getDownloadUrl(props.data, file);
|
|
194
|
+
const url = file.url || downloadUrl.replace("%fileId%", file.id);
|
|
195
|
+
const editorParams = { ...c.editorParams };
|
|
196
|
+
if (editorParams.exportparams) {
|
|
197
|
+
editorParams.exportParams = JSON.parse(editorParams.exportparams);
|
|
198
|
+
}
|
|
199
|
+
ibiz.util.file.fileDownload(url, file.name, {
|
|
200
|
+
context: c.context,
|
|
201
|
+
params: c.params,
|
|
202
|
+
data: props.data,
|
|
203
|
+
file: { fileId: file.id, ...file },
|
|
204
|
+
extraParams: editorParams
|
|
205
|
+
});
|
|
180
206
|
};
|
|
181
207
|
const limit = computed(() => {
|
|
182
208
|
return c.multiple ? 9999 : 1;
|
|
183
209
|
});
|
|
184
210
|
return {
|
|
185
211
|
uploadUrl,
|
|
186
|
-
downloadUrl,
|
|
187
212
|
headers,
|
|
188
213
|
files,
|
|
189
214
|
limit,
|
package/es/locale/en/index.d.ts
CHANGED
|
@@ -178,6 +178,10 @@ declare const _default: {
|
|
|
178
178
|
classificationNotArray: string;
|
|
179
179
|
classificationNotString: string;
|
|
180
180
|
errorJson: string;
|
|
181
|
+
value: string;
|
|
182
|
+
percent: string;
|
|
183
|
+
serieGroup: string;
|
|
184
|
+
catalogField: string;
|
|
181
185
|
};
|
|
182
186
|
dataView: {
|
|
183
187
|
noBehaviourGroup: string;
|
|
@@ -685,6 +689,7 @@ declare const _default: {
|
|
|
685
689
|
};
|
|
686
690
|
fileUtil: {
|
|
687
691
|
fileUploadFailed: string;
|
|
692
|
+
getDownloadTicketFailed: string;
|
|
688
693
|
};
|
|
689
694
|
handlebars: {
|
|
690
695
|
noInitHandlebars: string;
|
|
@@ -178,6 +178,10 @@ declare const _default: {
|
|
|
178
178
|
classificationNotArray: string;
|
|
179
179
|
classificationNotString: string;
|
|
180
180
|
errorJson: string;
|
|
181
|
+
value: string;
|
|
182
|
+
percent: string;
|
|
183
|
+
serieGroup: string;
|
|
184
|
+
catalogField: string;
|
|
181
185
|
};
|
|
182
186
|
dataView: {
|
|
183
187
|
noBehaviourGroup: string;
|
|
@@ -684,6 +688,7 @@ declare const _default: {
|
|
|
684
688
|
};
|
|
685
689
|
fileUtil: {
|
|
686
690
|
fileUploadFailed: string;
|
|
691
|
+
getDownloadTicketFailed: string;
|
|
687
692
|
};
|
|
688
693
|
handlebars: {
|
|
689
694
|
noInitHandlebars: string;
|
|
@@ -6,7 +6,7 @@ import './bottom-side-menu.scss';
|
|
|
6
6
|
* 底部菜单
|
|
7
7
|
* @primary
|
|
8
8
|
* @description 首页视图扩展菜单底部菜单
|
|
9
|
-
* @panelitemparams {name:rendermode,parameterType:'BUTTON' | 'MENU',defaultvalue:BUTTON,description:菜单项绘制模式,其中BUTTON
|
|
9
|
+
* @panelitemparams {name:rendermode,parameterType:'BUTTON' | 'MENU',defaultvalue:BUTTON,description:菜单项绘制模式,其中BUTTON表示按照按钮形态绘制、MENU表示按照菜单形态绘制}
|
|
10
10
|
* @primary
|
|
11
11
|
*/
|
|
12
12
|
export declare const BottomSideMenu: import("vue").DefineComponent<{
|
|
@@ -6,7 +6,7 @@ import './left-side-menu.scss';
|
|
|
6
6
|
* 左侧菜单
|
|
7
7
|
* @primary
|
|
8
8
|
* @description 首页视图扩展菜单左侧菜单
|
|
9
|
-
* @panelitemparams {name:rendermode,parameterType:'BUTTON' | 'MENU',defaultvalue:BUTTON,description:菜单项绘制模式,其中BUTTON
|
|
9
|
+
* @panelitemparams {name:rendermode,parameterType:'BUTTON' | 'MENU',defaultvalue:BUTTON,description:菜单项绘制模式,其中BUTTON表示按照按钮形态绘制、MENU表示按照菜单形态绘制}
|
|
10
10
|
* @primary
|
|
11
11
|
*/
|
|
12
12
|
export declare const LeftSideMenu: import("vue").DefineComponent<{
|
|
@@ -6,7 +6,7 @@ import './right-side-menu.scss';
|
|
|
6
6
|
* 右侧菜单
|
|
7
7
|
* @primary
|
|
8
8
|
* @description 首页视图扩展菜单右侧菜单
|
|
9
|
-
* @panelitemparams {name:rendermode,parameterType:'BUTTON' | 'MENU',defaultvalue:BUTTON,description:菜单项绘制模式,其中BUTTON
|
|
9
|
+
* @panelitemparams {name:rendermode,parameterType:'BUTTON' | 'MENU',defaultvalue:BUTTON,description:菜单项绘制模式,其中BUTTON表示按照按钮形态绘制、MENU表示按照菜单形态绘制}
|
|
10
10
|
* @primary
|
|
11
11
|
*/
|
|
12
12
|
export declare const RightSideMenu: import("vue").DefineComponent<{
|
|
@@ -6,7 +6,7 @@ import './top-side-menu.scss';
|
|
|
6
6
|
* 头部菜单
|
|
7
7
|
* @primary
|
|
8
8
|
* @description 首页视图扩展菜单头部菜单
|
|
9
|
-
* @panelitemparams {name:rendermode,parameterType:'BUTTON' | 'MENU',defaultvalue:BUTTON,description:菜单项绘制模式,其中BUTTON
|
|
9
|
+
* @panelitemparams {name:rendermode,parameterType:'BUTTON' | 'MENU',defaultvalue:BUTTON,description:菜单项绘制模式,其中BUTTON表示按照按钮形态绘制、MENU表示按照菜单形态绘制}
|
|
10
10
|
* @primary
|
|
11
11
|
*/
|
|
12
12
|
export declare const TopSideMenu: import("vue").DefineComponent<{
|
|
@@ -13,6 +13,7 @@ export declare const IBizNavBreadcrumb: import("@ibiz-template/vue3-util").TypeW
|
|
|
13
13
|
ns: import("@ibiz-template/core").Namespace;
|
|
14
14
|
c: import("./nav-breadcrumb.controller").NavBreadcrumbController;
|
|
15
15
|
items: import("vue").ComputedRef<import("./nav-breadcrumb.state").BreadcrumbMsg[]>;
|
|
16
|
+
onClick: (event: MouseEvent, item: import("./nav-breadcrumb.state").BreadcrumbMsg) => void;
|
|
16
17
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
17
18
|
modelData: {
|
|
18
19
|
type: import("vue").PropType<import("@ibiz/model-core").IPanelRawItem>;
|
|
@@ -104,7 +104,7 @@ export declare class NavBreadcrumbController extends PanelItemController<IPanelR
|
|
|
104
104
|
* @param {Router} router
|
|
105
105
|
* @memberof NavBreadcrumbController
|
|
106
106
|
*/
|
|
107
|
-
protected setBreadcrumbByRouter(router: Router): void
|
|
107
|
+
protected setBreadcrumbByRouter(router: Router): Promise<void>;
|
|
108
108
|
/**
|
|
109
109
|
* @description 根据路由设置菜单面包屑导航数据
|
|
110
110
|
* @param {Router} router
|
|
@@ -123,4 +123,11 @@ export declare class NavBreadcrumbController extends PanelItemController<IPanelR
|
|
|
123
123
|
* @memberof NavBreadcrumbController
|
|
124
124
|
*/
|
|
125
125
|
protected handleRawItemParams(): void;
|
|
126
|
+
/**
|
|
127
|
+
* @description 打开菜单项视图
|
|
128
|
+
* @param {IData} item
|
|
129
|
+
* @param {MouseEvent} event
|
|
130
|
+
* @memberof NavBreadcrumbController
|
|
131
|
+
*/
|
|
132
|
+
openMenuItemView(item: IData, event: MouseEvent): void;
|
|
126
133
|
}
|
|
@@ -4,7 +4,7 @@ import { route2routePath, routePath2string } from '@ibiz-template/vue3-util';
|
|
|
4
4
|
import { notNilEmpty } from 'qx-util';
|
|
5
5
|
import { NavBreadcrumbState } from './nav-breadcrumb.state.mjs';
|
|
6
6
|
import { NavBreadcrumbService } from './nav-breadcrumb.service.mjs';
|
|
7
|
-
import { getCurViewName, getIndexBreadcrumb, getViewInfoByViewStack, getAppFuncByViewName, getMenuItemsByAppFunc } from './nav-breadcrumb.util.mjs';
|
|
7
|
+
import { getCurViewName, getMenuTag, getAppIndexViewName, getIndexBreadcrumb, getMenuItemByTag, getViewInfoByViewStack, getAppFuncByViewName, getMenuItemsByAppFunc } from './nav-breadcrumb.util.mjs';
|
|
8
8
|
|
|
9
9
|
"use strict";
|
|
10
10
|
var __defProp = Object.defineProperty;
|
|
@@ -108,24 +108,33 @@ class NavBreadcrumbController extends PanelItemController {
|
|
|
108
108
|
}
|
|
109
109
|
if (this.navMode === "store") {
|
|
110
110
|
const { currentRoute } = router;
|
|
111
|
+
const routePath = route2routePath(currentRoute.value);
|
|
111
112
|
const fullPath = currentRoute.value.fullPath;
|
|
112
113
|
const viewName = getCurViewName(router);
|
|
114
|
+
const menuTag = getMenuTag(routePath.pathNodes);
|
|
113
115
|
const chacheItem = this.service.getItem({ fullPath, viewName });
|
|
116
|
+
const indexViewName = getAppIndexViewName(this.panel.context);
|
|
114
117
|
if (chacheItem) {
|
|
115
|
-
if (chacheItem.viewName ===
|
|
118
|
+
if (chacheItem.viewName === indexViewName) {
|
|
116
119
|
this.service.setChache([
|
|
117
120
|
{ ...getIndexBreadcrumb(this.panel.context), fullPath }
|
|
118
121
|
]);
|
|
119
122
|
this.resetBreadcrumbs();
|
|
120
123
|
return;
|
|
121
124
|
}
|
|
125
|
+
this.service.update({ ...chacheItem, fullPath });
|
|
122
126
|
const removeItems = this.service.removeAfter(fullPath);
|
|
123
127
|
removeItems.forEach((item) => {
|
|
124
128
|
var _a;
|
|
125
129
|
(_a = this.navPos) == null ? void 0 : _a.removeCache(item.fullPath);
|
|
126
130
|
});
|
|
127
131
|
this.resetBreadcrumbs();
|
|
132
|
+
} else if (this.state.menuTag !== menuTag) {
|
|
133
|
+
this.setBreadcrumbByRouter(router);
|
|
134
|
+
} else {
|
|
135
|
+
this.service.add({ viewName, fullPath, type: "default" });
|
|
128
136
|
}
|
|
137
|
+
this.state.menuTag = menuTag;
|
|
129
138
|
}
|
|
130
139
|
}
|
|
131
140
|
/**
|
|
@@ -146,7 +155,7 @@ class NavBreadcrumbController extends PanelItemController {
|
|
|
146
155
|
if (this.navMode === "menu") {
|
|
147
156
|
return;
|
|
148
157
|
}
|
|
149
|
-
this.service.
|
|
158
|
+
this.service.update({ fullPath, type: "default", ...info });
|
|
150
159
|
this.resetBreadcrumbs();
|
|
151
160
|
}
|
|
152
161
|
/**
|
|
@@ -162,19 +171,30 @@ class NavBreadcrumbController extends PanelItemController {
|
|
|
162
171
|
* @param {Router} router
|
|
163
172
|
* @memberof NavBreadcrumbController
|
|
164
173
|
*/
|
|
165
|
-
setBreadcrumbByRouter(router) {
|
|
174
|
+
async setBreadcrumbByRouter(router) {
|
|
166
175
|
const { currentRoute } = router;
|
|
167
176
|
const routePath = route2routePath(currentRoute.value);
|
|
168
|
-
const
|
|
169
|
-
|
|
170
|
-
|
|
177
|
+
const { appContext = {}, pathNodes } = routePath;
|
|
178
|
+
const menuTag = getMenuTag(pathNodes);
|
|
179
|
+
let hasMenuItem = false;
|
|
180
|
+
const menuData = await getMenuItemByTag(
|
|
181
|
+
menuTag,
|
|
182
|
+
this.appmenu,
|
|
183
|
+
this.panel.context
|
|
184
|
+
);
|
|
185
|
+
const calcPathNodes = routePath.pathNodes.map(
|
|
186
|
+
async (node, index) => {
|
|
187
|
+
if (this.appmenu && menuData && menuData.viewName === node.viewName) {
|
|
188
|
+
hasMenuItem = true;
|
|
189
|
+
}
|
|
171
190
|
const fullPath = routePath2string({
|
|
172
191
|
appContext,
|
|
173
192
|
pathNodes: pathNodes.slice(0, index + 1)
|
|
174
193
|
});
|
|
175
194
|
const result = {
|
|
176
195
|
viewName: node.viewName,
|
|
177
|
-
fullPath
|
|
196
|
+
fullPath,
|
|
197
|
+
type: "default"
|
|
178
198
|
};
|
|
179
199
|
const chacheItem = this.service.getItem({ viewName: node.viewName });
|
|
180
200
|
if (chacheItem) {
|
|
@@ -183,13 +203,28 @@ class NavBreadcrumbController extends PanelItemController {
|
|
|
183
203
|
}
|
|
184
204
|
Object.assign(result, chacheItem);
|
|
185
205
|
}
|
|
186
|
-
const viewInfo = getViewInfoByViewStack(
|
|
206
|
+
const viewInfo = getViewInfoByViewStack(
|
|
207
|
+
node.viewName,
|
|
208
|
+
this.panel.context
|
|
209
|
+
);
|
|
187
210
|
if (viewInfo) {
|
|
188
211
|
Object.assign(result, reject(isNil, viewInfo));
|
|
189
212
|
}
|
|
190
213
|
return result;
|
|
191
214
|
}
|
|
192
215
|
);
|
|
216
|
+
const items = await Promise.all(calcPathNodes);
|
|
217
|
+
if (!hasMenuItem && menuData) {
|
|
218
|
+
this.state.menuTag = menuData.tag;
|
|
219
|
+
const item = {
|
|
220
|
+
viewName: menuData.viewName,
|
|
221
|
+
caption: menuData.menuItem.caption,
|
|
222
|
+
fullPath: "",
|
|
223
|
+
type: "menuItem",
|
|
224
|
+
menuTag: menuData.tag
|
|
225
|
+
};
|
|
226
|
+
items.splice(1, 0, item);
|
|
227
|
+
}
|
|
193
228
|
this.service.setChache(items);
|
|
194
229
|
this.resetBreadcrumbs();
|
|
195
230
|
}
|
|
@@ -223,6 +258,7 @@ class NavBreadcrumbController extends PanelItemController {
|
|
|
223
258
|
return {
|
|
224
259
|
caption: item.caption,
|
|
225
260
|
fullPath: "",
|
|
261
|
+
type: "default",
|
|
226
262
|
viewName: item.id
|
|
227
263
|
};
|
|
228
264
|
});
|
|
@@ -265,16 +301,14 @@ class NavBreadcrumbController extends PanelItemController {
|
|
|
265
301
|
}
|
|
266
302
|
if (this.appmenu) {
|
|
267
303
|
this.appmenu.evt.on("onClick", async (data) => {
|
|
268
|
-
var _a;
|
|
269
304
|
const { eventArg } = data;
|
|
270
|
-
const
|
|
271
|
-
|
|
305
|
+
const menuData = await getMenuItemByTag(
|
|
306
|
+
eventArg,
|
|
307
|
+
this.appmenu,
|
|
308
|
+
this.panel.context
|
|
272
309
|
);
|
|
273
|
-
if (
|
|
274
|
-
const
|
|
275
|
-
const appFunc = app.getAppFunc(menuItem.appFuncId);
|
|
276
|
-
const viewName = ((_a = appFunc.appViewId) == null ? void 0 : _a.split(".").pop()) || "";
|
|
277
|
-
const viewConfig = await ibiz.hub.config.view.get(viewName);
|
|
310
|
+
if (menuData) {
|
|
311
|
+
const { viewName, appFunc, viewConfig } = menuData;
|
|
278
312
|
if (appFunc.openMode !== "INDEXVIEWTAB" || viewConfig && viewConfig.openMode && viewConfig.openMode !== "INDEXVIEWTAB") {
|
|
279
313
|
return;
|
|
280
314
|
}
|
|
@@ -285,7 +319,8 @@ class NavBreadcrumbController extends PanelItemController {
|
|
|
285
319
|
} else {
|
|
286
320
|
items.push({
|
|
287
321
|
viewName,
|
|
288
|
-
fullPath: ""
|
|
322
|
+
fullPath: "",
|
|
323
|
+
type: "default"
|
|
289
324
|
});
|
|
290
325
|
}
|
|
291
326
|
items.unshift(getIndexBreadcrumb(this.panel.context));
|
|
@@ -312,6 +347,17 @@ class NavBreadcrumbController extends PanelItemController {
|
|
|
312
347
|
}
|
|
313
348
|
Object.assign(this.rawItemParams, params);
|
|
314
349
|
}
|
|
350
|
+
/**
|
|
351
|
+
* @description 打开菜单项视图
|
|
352
|
+
* @param {IData} item
|
|
353
|
+
* @param {MouseEvent} event
|
|
354
|
+
* @memberof NavBreadcrumbController
|
|
355
|
+
*/
|
|
356
|
+
openMenuItemView(item, event) {
|
|
357
|
+
if (this.appmenu) {
|
|
358
|
+
this.appmenu.onClickMenuItem(item.menuTag, event);
|
|
359
|
+
}
|
|
360
|
+
}
|
|
315
361
|
}
|
|
316
362
|
|
|
317
363
|
export { NavBreadcrumbController };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.ibiz-nav-breadcrumb{--ibiz-nav-breadcrumb-padding:var(--ibiz-spacing-base-loose);--ibiz-nav-breadcrumb-link-color:var(--ibiz-color-link);--ibiz-nav-breadcrumb-disabled-color:var(--ibiz-color-text-0);padding:var(--ibiz-nav-breadcrumb-padding);--el-text-color-primary:var(--ibiz-nav-breadcrumb-link-color)}.ibiz-nav-breadcrumb--menu{color:var(--ibiz-nav-breadcrumb-disabled-color);--el-text-color-primary:var(--ibiz-nav-breadcrumb-disabled-color)}.ibiz-nav-breadcrumb--menu .el-breadcrumb__item{cursor:text}.ibiz-nav-breadcrumb--menu .el-breadcrumb__item:last-child .el-breadcrumb__inner{color:var(--ibiz-color-primary)}.ibiz-nav-breadcrumb--menu .el-breadcrumb__inner.is-link{font-weight:400;pointer-events:none}
|
|
1
|
+
.ibiz-nav-breadcrumb{--ibiz-nav-breadcrumb-padding:var(--ibiz-spacing-base-loose);--ibiz-nav-breadcrumb-link-color:var(--ibiz-color-link);--ibiz-nav-breadcrumb-disabled-color:var(--ibiz-color-text-0);padding:var(--ibiz-nav-breadcrumb-padding);--el-text-color-primary:var(--ibiz-nav-breadcrumb-link-color)}.ibiz-nav-breadcrumb--menu{color:var(--ibiz-nav-breadcrumb-disabled-color);--el-text-color-primary:var(--ibiz-nav-breadcrumb-disabled-color)}.ibiz-nav-breadcrumb--menu .el-breadcrumb__item{cursor:text}.ibiz-nav-breadcrumb--menu .el-breadcrumb__item:last-child .el-breadcrumb__inner{color:var(--ibiz-color-primary)}.ibiz-nav-breadcrumb--menu .el-breadcrumb__inner.is-link{font-weight:400;pointer-events:none}.ibiz-nav-breadcrumb .el-breadcrumb__item.is-link .el-breadcrumb__inner{font-weight:700;color:var(--el-text-color-primary);text-decoration:none;cursor:pointer;transition:var(--el-transition-color)}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { PropType } from 'vue';
|
|
2
2
|
import { IPanelRawItem } from '@ibiz/model-core';
|
|
3
3
|
import { NavBreadcrumbController } from './nav-breadcrumb.controller';
|
|
4
|
+
import { BreadcrumbMsg } from './nav-breadcrumb.state';
|
|
4
5
|
import './nav-breadcrumb.scss';
|
|
5
6
|
export interface dropdownAction {
|
|
6
7
|
text: string;
|
|
@@ -32,7 +33,8 @@ export declare const NavBreadcrumb: import("vue").DefineComponent<{
|
|
|
32
33
|
}, {
|
|
33
34
|
ns: import("@ibiz-template/core").Namespace;
|
|
34
35
|
c: NavBreadcrumbController;
|
|
35
|
-
items: import("vue").ComputedRef<
|
|
36
|
+
items: import("vue").ComputedRef<BreadcrumbMsg[]>;
|
|
37
|
+
onClick: (event: MouseEvent, item: BreadcrumbMsg) => void;
|
|
36
38
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
37
39
|
/**
|
|
38
40
|
* @description 面包屑导航数据
|
|
@@ -2,6 +2,7 @@ import { isVNode, watch, computed, resolveComponent, createVNode, defineComponen
|
|
|
2
2
|
import { useNamespace } from '@ibiz-template/vue3-util';
|
|
3
3
|
import { useRoute, useRouter } from 'vue-router';
|
|
4
4
|
import { NavBreadcrumbController } from './nav-breadcrumb.controller.mjs';
|
|
5
|
+
import { getAppIndexViewName } from './nav-breadcrumb.util.mjs';
|
|
5
6
|
import './nav-breadcrumb.css';
|
|
6
7
|
|
|
7
8
|
"use strict";
|
|
@@ -42,15 +43,23 @@ const NavBreadcrumb = /* @__PURE__ */ defineComponent({
|
|
|
42
43
|
breadcrumbItems
|
|
43
44
|
} = c.state;
|
|
44
45
|
let result = breadcrumbItems.filter((x) => x.caption);
|
|
46
|
+
const indexViewName = getAppIndexViewName(c.panel.context);
|
|
45
47
|
if (!c.showHome) {
|
|
46
|
-
result = result.filter((x) => x.viewName !==
|
|
48
|
+
result = result.filter((x) => x.viewName !== indexViewName);
|
|
47
49
|
}
|
|
48
50
|
return result;
|
|
49
51
|
});
|
|
52
|
+
const onClick = (event, item) => {
|
|
53
|
+
if (item.type === "menuItem") {
|
|
54
|
+
event.stopPropagation();
|
|
55
|
+
c.openMenuItemView(item, event);
|
|
56
|
+
}
|
|
57
|
+
};
|
|
50
58
|
return {
|
|
51
59
|
ns,
|
|
52
60
|
c,
|
|
53
|
-
items
|
|
61
|
+
items,
|
|
62
|
+
onClick
|
|
54
63
|
};
|
|
55
64
|
},
|
|
56
65
|
render() {
|
|
@@ -65,7 +74,9 @@ const NavBreadcrumb = /* @__PURE__ */ defineComponent({
|
|
|
65
74
|
label += " - ".concat(item.dataInfo);
|
|
66
75
|
}
|
|
67
76
|
return createVNode(resolveComponent("el-breadcrumb-item"), {
|
|
68
|
-
"
|
|
77
|
+
"class": this.ns.is("link", item.type === "menuItem"),
|
|
78
|
+
"to": item.fullPath,
|
|
79
|
+
"onClick": (event) => this.onClick(event, item)
|
|
69
80
|
}, _isSlot(label) ? label : {
|
|
70
81
|
default: () => [label]
|
|
71
82
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { clone, isNil, reject } from 'ramda';
|
|
2
|
-
import { getIndexBreadcrumb } from './nav-breadcrumb.util.mjs';
|
|
2
|
+
import { getAppIndexViewName, getIndexBreadcrumb } from './nav-breadcrumb.util.mjs';
|
|
3
3
|
|
|
4
4
|
"use strict";
|
|
5
5
|
var __defProp = Object.defineProperty;
|
|
@@ -70,7 +70,7 @@ class NavBreadcrumbService {
|
|
|
70
70
|
* @param {BreadcrumbMsg} item
|
|
71
71
|
* @memberof NavBreadcrumbService
|
|
72
72
|
*/
|
|
73
|
-
|
|
73
|
+
update(item) {
|
|
74
74
|
if (!this.chache.length && this.navMode === "store") {
|
|
75
75
|
const result = localStorage.getItem("breadcrumb");
|
|
76
76
|
if (result) {
|
|
@@ -80,9 +80,7 @@ class NavBreadcrumbService {
|
|
|
80
80
|
const index = this.chache.findIndex(
|
|
81
81
|
(x) => x.fullPath && x.fullPath === item.fullPath || x.viewName.toLowerCase() === item.viewName.toLowerCase()
|
|
82
82
|
);
|
|
83
|
-
if (index
|
|
84
|
-
this.add(item);
|
|
85
|
-
} else {
|
|
83
|
+
if (index !== -1) {
|
|
86
84
|
Object.assign(this.chache[index], reject(isNil, item));
|
|
87
85
|
this.chache = this.chache.filter((x) => !x.isEmbed && !x.isModal);
|
|
88
86
|
if (this.navMode === "store") {
|
|
@@ -98,7 +96,8 @@ class NavBreadcrumbService {
|
|
|
98
96
|
*/
|
|
99
97
|
getItem(data) {
|
|
100
98
|
const { viewName = "", fullPath = "" } = data;
|
|
101
|
-
|
|
99
|
+
const indexViewName = getAppIndexViewName(this.context);
|
|
100
|
+
if (viewName === indexViewName) {
|
|
102
101
|
return getIndexBreadcrumb(this.context);
|
|
103
102
|
}
|
|
104
103
|
const item = this.chache.find(
|
|
@@ -6,6 +6,8 @@ export interface BreadcrumbMsg {
|
|
|
6
6
|
dataInfo?: string;
|
|
7
7
|
isEmbed?: boolean;
|
|
8
8
|
isModal?: boolean;
|
|
9
|
+
type: 'menuItem' | 'default';
|
|
10
|
+
menuTag?: string;
|
|
9
11
|
}
|
|
10
12
|
/**
|
|
11
13
|
* 导航标签页占位状态
|
|
@@ -24,4 +26,10 @@ export declare class NavBreadcrumbState extends PanelItemState {
|
|
|
24
26
|
* @memberof NavBreadcrumbState
|
|
25
27
|
*/
|
|
26
28
|
breadcrumbItems: BreadcrumbMsg[];
|
|
29
|
+
/**
|
|
30
|
+
* @description 菜单标识
|
|
31
|
+
* @type {string}
|
|
32
|
+
* @memberof NavBreadcrumbState
|
|
33
|
+
*/
|
|
34
|
+
menuTag: string;
|
|
27
35
|
}
|
|
@@ -17,6 +17,12 @@ class NavBreadcrumbState extends PanelItemState {
|
|
|
17
17
|
* @memberof NavBreadcrumbState
|
|
18
18
|
*/
|
|
19
19
|
__publicField(this, "breadcrumbItems", []);
|
|
20
|
+
/**
|
|
21
|
+
* @description 菜单标识
|
|
22
|
+
* @type {string}
|
|
23
|
+
* @memberof NavBreadcrumbState
|
|
24
|
+
*/
|
|
25
|
+
__publicField(this, "menuTag", "");
|
|
20
26
|
}
|
|
21
27
|
}
|
|
22
28
|
|