@ibiz-template/vue3-components 0.7.41-alpha.17 → 0.7.41-alpha.19
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-BoV5htv9.js +11 -0
- package/dist/{index-swminiXb.js → index-Bt6TkADL.js} +1 -1
- package/dist/{index-AOFxMmyX.js → index-K6B-Odyq.js} +1 -1
- 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-exnzt_I1.js +1 -0
- package/dist/{xlsx-util-jYyM8alm.js → xlsx-util-fuTLwrKA.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/dashboard/portlet/menu-portlet/app-menu-portlet/app-menu-portlet.css +1 -1
- 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 +18 -5
- 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.d.ts +3 -0
- 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/index.mjs +1 -0
- package/es/locale/en/index.d.ts +9 -0
- package/es/locale/en/index.mjs +4 -0
- package/es/locale/zh-CN/index.d.ts +9 -0
- package/es/locale/zh-CN/index.mjs +4 -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/app-switch/app-switch.controller.mjs +4 -1
- package/es/panel-component/app-switch/app-switch.d.ts +1 -1
- package/es/panel-component/auth-userinfo/auth-userinfo.controller.d.ts +31 -0
- package/es/panel-component/auth-userinfo/auth-userinfo.controller.mjs +51 -0
- package/es/panel-component/auth-userinfo/auth-userinfo.css +1 -1
- package/es/panel-component/auth-userinfo/auth-userinfo.d.ts +7 -4
- package/es/panel-component/auth-userinfo/auth-userinfo.mjs +20 -5
- package/es/panel-component/auth-userinfo/auth-userinfo.provider.d.ts +2 -1
- package/es/panel-component/auth-userinfo/auth-userinfo.provider.mjs +2 -2
- package/es/panel-component/auth-userinfo/index.d.ts +4 -3
- package/es/panel-component/global-search/global-search.controller.d.ts +10 -3
- package/es/panel-component/global-search/global-search.controller.mjs +39 -18
- package/es/panel-component/global-search/global-search.d.ts +3 -1
- package/es/panel-component/global-search/global-search.mjs +8 -1
- package/es/panel-component/global-search/index.d.ts +1 -0
- package/es/panel-component/index-blank-placeholder/index-blank-placeholder.controller.mjs +0 -2
- 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/panel-app-title/panel-app-title.controller.mjs +5 -2
- package/es/panel-component/panel-app-title/panel-app-title.d.ts +1 -0
- package/es/panel-component/panel-app-title/panel-app-title.mjs +6 -0
- package/es/panel-component/panel-index-view-search/index.d.ts +4 -3
- package/es/panel-component/panel-index-view-search/panel-index-view-search.controller.d.ts +31 -0
- package/es/panel-component/panel-index-view-search/panel-index-view-search.controller.mjs +51 -0
- package/es/panel-component/panel-index-view-search/panel-index-view-search.d.ts +8 -5
- package/es/panel-component/panel-index-view-search/panel-index-view-search.mjs +17 -3
- package/es/panel-component/panel-index-view-search/panel-index-view-search.provider.d.ts +2 -1
- package/es/panel-component/panel-index-view-search/panel-index-view-search.provider.mjs +2 -2
- package/es/panel-component/panel-tab-panel/panel-tab-panel.mjs +2 -2
- package/es/panel-component/user-action/user-action.d.ts +1 -1
- 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/panel-component/view-msg-pos/view-msg-pos.d.ts +2 -1
- package/es/util/app-modal/app-modal-component.css +1 -1
- package/es/util/app-modal/app-modal-component.d.ts +6 -1
- package/es/util/app-modal/app-modal-component.mjs +45 -4
- package/es/util/fullscreen/fullscreen-util.mjs +1 -1
- package/es/util/icon/icon.d.ts +3 -0
- package/es/util/icon/icon.mjs +25 -0
- package/es/util/index.d.ts +1 -0
- package/es/util/index.mjs +1 -0
- 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/dashboard/portlet/menu-portlet/app-menu-portlet/app-menu-portlet.css +1 -1
- 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 +17 -4
- 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/index.cjs +3 -0
- package/lib/locale/en/index.cjs +4 -0
- package/lib/locale/zh-CN/index.cjs +4 -0
- package/lib/panel-component/app-switch/app-switch.controller.cjs +4 -1
- package/lib/panel-component/auth-userinfo/auth-userinfo.cjs +20 -5
- package/lib/panel-component/auth-userinfo/auth-userinfo.controller.cjs +53 -0
- package/lib/panel-component/auth-userinfo/auth-userinfo.css +1 -1
- package/lib/panel-component/auth-userinfo/auth-userinfo.provider.cjs +2 -2
- package/lib/panel-component/global-search/global-search.cjs +8 -1
- package/lib/panel-component/global-search/global-search.controller.cjs +39 -18
- package/lib/panel-component/index-blank-placeholder/index-blank-placeholder.controller.cjs +0 -2
- 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/panel-app-title/panel-app-title.cjs +6 -0
- package/lib/panel-component/panel-app-title/panel-app-title.controller.cjs +5 -2
- package/lib/panel-component/panel-index-view-search/panel-index-view-search.cjs +16 -2
- package/lib/panel-component/panel-index-view-search/panel-index-view-search.controller.cjs +53 -0
- package/lib/panel-component/panel-index-view-search/panel-index-view-search.provider.cjs +2 -2
- package/lib/panel-component/panel-tab-panel/panel-tab-panel.cjs +2 -2
- package/lib/panel-component/user-message/async-action/async-data-export/async-data-export.cjs +3 -1
- package/lib/util/app-modal/app-modal-component.cjs +43 -2
- package/lib/util/app-modal/app-modal-component.css +1 -1
- package/lib/util/fullscreen/fullscreen-util.cjs +1 -1
- package/lib/util/icon/icon.cjs +28 -0
- package/lib/util/index.cjs +3 -0
- 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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PanelItemController } from '@ibiz-template/runtime';
|
|
2
|
-
import { IPanelRawItem } from '@ibiz/model-core';
|
|
2
|
+
import { IPanelRawItem, IAppFunc, IAppMenuItem } from '@ibiz/model-core';
|
|
3
3
|
import { IHttpResponse } from '@ibiz-template/core';
|
|
4
4
|
import { GlobalSearchState, ISearchItem } from './global-search.state';
|
|
5
5
|
/**
|
|
@@ -28,11 +28,11 @@ export declare class GlobalSearchController extends PanelItemController<IPanelRa
|
|
|
28
28
|
/**
|
|
29
29
|
* @description 自定义参数
|
|
30
30
|
* @exposedoc
|
|
31
|
-
* @
|
|
31
|
+
* @public
|
|
32
32
|
* @type {IData}
|
|
33
33
|
* @memberof GlobalSearchController
|
|
34
34
|
*/
|
|
35
|
-
|
|
35
|
+
rawItemParams: IData;
|
|
36
36
|
/**
|
|
37
37
|
* @description 搜索历史缓存标识
|
|
38
38
|
* @protected
|
|
@@ -91,6 +91,13 @@ export declare class GlobalSearchController extends PanelItemController<IPanelRa
|
|
|
91
91
|
* @memberof GlobalSearchController
|
|
92
92
|
*/
|
|
93
93
|
protected initHistory(): void;
|
|
94
|
+
/**
|
|
95
|
+
* @description 获取全局搜索应用功能
|
|
96
|
+
* @param {IAppMenuItem[]} appMenuItems
|
|
97
|
+
* @returns {*} {Promise<IAppFunc[]>}
|
|
98
|
+
* @memberof GlobalSearchController
|
|
99
|
+
*/
|
|
100
|
+
getSearchFunc(appMenuItems: IAppMenuItem[]): Promise<IAppFunc[]>;
|
|
94
101
|
/**
|
|
95
102
|
* 初始化全局搜索项
|
|
96
103
|
*
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { PanelItemController, getControl, getDeACMode, getAcItemProvider, calcDeCodeNameById, OpenAppViewCommand } from '@ibiz-template/runtime';
|
|
2
2
|
import { notNilEmpty, createUUID } from 'qx-util';
|
|
3
|
-
import { recursiveIterate } from '@ibiz-template/core';
|
|
4
3
|
import { GlobalSearchState } from './global-search.state.mjs';
|
|
5
4
|
|
|
6
5
|
"use strict";
|
|
@@ -30,7 +29,7 @@ class GlobalSearchController extends PanelItemController {
|
|
|
30
29
|
/**
|
|
31
30
|
* @description 自定义参数
|
|
32
31
|
* @exposedoc
|
|
33
|
-
* @
|
|
32
|
+
* @public
|
|
34
33
|
* @type {IData}
|
|
35
34
|
* @memberof GlobalSearchController
|
|
36
35
|
*/
|
|
@@ -125,6 +124,38 @@ class GlobalSearchController extends PanelItemController {
|
|
|
125
124
|
if (cache)
|
|
126
125
|
this.state.histories = JSON.parse(cache);
|
|
127
126
|
}
|
|
127
|
+
/**
|
|
128
|
+
* @description 获取全局搜索应用功能
|
|
129
|
+
* @param {IAppMenuItem[]} appMenuItems
|
|
130
|
+
* @returns {*} {Promise<IAppFunc[]>}
|
|
131
|
+
* @memberof GlobalSearchController
|
|
132
|
+
*/
|
|
133
|
+
async getSearchFunc(appMenuItems) {
|
|
134
|
+
const result = [];
|
|
135
|
+
const promises = appMenuItems.map(async (menuItem) => {
|
|
136
|
+
try {
|
|
137
|
+
if (menuItem.appMenuItems) {
|
|
138
|
+
const subFuncs = await this.getSearchFunc(menuItem.appMenuItems);
|
|
139
|
+
result.push(...subFuncs);
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
142
|
+
if (menuItem.appFuncId) {
|
|
143
|
+
let app = ibiz.hub.getApp(menuItem.appId);
|
|
144
|
+
if (!app) {
|
|
145
|
+
app = await ibiz.hub.getAppAsync(menuItem.appId);
|
|
146
|
+
}
|
|
147
|
+
const appFunc = app.getAppFunc(menuItem.appFuncId);
|
|
148
|
+
if (appFunc && appFunc.appFuncType === "SEARCH" && appFunc.appDEACModeId && appFunc.appDataEntityId) {
|
|
149
|
+
result.push(appFunc);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
} catch (err) {
|
|
153
|
+
console.error("\u8BA1\u7B97\u83DC\u5355\u5E94\u7528\u529F\u80FD\u5F02\u5E38: ".concat(menuItem.appFuncId), err);
|
|
154
|
+
}
|
|
155
|
+
});
|
|
156
|
+
await Promise.all(promises);
|
|
157
|
+
return result;
|
|
158
|
+
}
|
|
128
159
|
/**
|
|
129
160
|
* 初始化全局搜索项
|
|
130
161
|
*
|
|
@@ -132,24 +163,14 @@ class GlobalSearchController extends PanelItemController {
|
|
|
132
163
|
* @memberof GlobalSearchController
|
|
133
164
|
*/
|
|
134
165
|
async initGlobalSearchItem() {
|
|
135
|
-
const appMenu = getControl(
|
|
166
|
+
const appMenu = getControl(
|
|
167
|
+
this.panel.view.model,
|
|
168
|
+
"appmenu"
|
|
169
|
+
);
|
|
136
170
|
if (!appMenu)
|
|
137
171
|
return;
|
|
138
|
-
const
|
|
139
|
-
|
|
140
|
-
appMenu,
|
|
141
|
-
(menuItem) => {
|
|
142
|
-
if (menuItem.appFuncId) {
|
|
143
|
-
const app = ibiz.hub.getApp(menuItem.appId);
|
|
144
|
-
const appFunc = app.getAppFunc(menuItem.appFuncId);
|
|
145
|
-
if (appFunc && appFunc.appFuncType === "SEARCH" && appFunc.appDEACModeId && appFunc.appDataEntityId)
|
|
146
|
-
appFuncs.push(appFunc);
|
|
147
|
-
}
|
|
148
|
-
},
|
|
149
|
-
{
|
|
150
|
-
childrenFields: ["appMenuItems"]
|
|
151
|
-
}
|
|
152
|
-
);
|
|
172
|
+
const appMenuItems = appMenu.appMenuItems || [];
|
|
173
|
+
const appFuncs = await this.getSearchFunc(appMenuItems);
|
|
153
174
|
await Promise.all(
|
|
154
175
|
appFuncs.map(async (func) => {
|
|
155
176
|
const deACMode = await getDeACMode(
|
|
@@ -5,10 +5,11 @@ import './global-search.scss';
|
|
|
5
5
|
/**
|
|
6
6
|
* 全局搜索
|
|
7
7
|
* @primary
|
|
8
|
-
* @description 全局搜索组件,监听快捷键Ctrl+K
|
|
8
|
+
* @description 全局搜索组件,监听快捷键Ctrl+K弹出搜索框,需在菜单上绑定应用功能预定义类型为GLOBAL_SEARCH的隐藏菜单项,应用功能类型为全局搜索,同时绑定应用实体与自填模式。输入值时会查询实体自填模式数据,同时点击下拉数据后会打开自填模式中的链接视图。每次查询后还会缓存为搜索历史记录。
|
|
9
9
|
* @panelitemparams {name:historyCacheKey,parameterType:string,defaultvalue:global-search-history,description:搜索历史缓存标识}
|
|
10
10
|
* @panelitemparams {name:maxhistory,parameterType:number,defaultvalue:7,description:最大历史记录,默认7条}
|
|
11
11
|
* @panelitemparams {name:size,parameterType:number,defaultvalue:100,description:单次查询最大数量,默认100条}
|
|
12
|
+
* @panelitemparams {name:placeholder,parameterType:string,description:搜索框提示信息}
|
|
12
13
|
* @export
|
|
13
14
|
* @class GlobalSearch
|
|
14
15
|
*/
|
|
@@ -33,6 +34,7 @@ export declare const GlobalSearch: import("vue").DefineComponent<{
|
|
|
33
34
|
visible: import("vue").ComputedRef<boolean>;
|
|
34
35
|
editorRef: import("vue").Ref<any>;
|
|
35
36
|
searchValue: import("vue").Ref<string>;
|
|
37
|
+
curPlaceholder: import("vue").ComputedRef<any>;
|
|
36
38
|
handleFocus: (_evt: FocusEvent) => void;
|
|
37
39
|
handleEnter: (event: KeyboardEvent) => void;
|
|
38
40
|
renderAction: () => JSX.Element | undefined;
|
|
@@ -46,6 +46,12 @@ const GlobalSearch = /* @__PURE__ */ defineComponent({
|
|
|
46
46
|
const showEmpty = histories.includes(query) && list.length === 0;
|
|
47
47
|
return (showSearch || showEmpty || showHistory || loading) && activated.value;
|
|
48
48
|
});
|
|
49
|
+
const curPlaceholder = computed(() => {
|
|
50
|
+
const {
|
|
51
|
+
placeholder
|
|
52
|
+
} = c.rawItemParams;
|
|
53
|
+
return placeholder || ibiz.i18n.t("panelComponent.globalSearch.placeholder");
|
|
54
|
+
});
|
|
49
55
|
const handleEnter = (event) => {
|
|
50
56
|
if (event.key === "Enter") {
|
|
51
57
|
activated.value = true;
|
|
@@ -188,6 +194,7 @@ const GlobalSearch = /* @__PURE__ */ defineComponent({
|
|
|
188
194
|
visible,
|
|
189
195
|
editorRef,
|
|
190
196
|
searchValue,
|
|
197
|
+
curPlaceholder,
|
|
191
198
|
handleFocus,
|
|
192
199
|
handleEnter,
|
|
193
200
|
renderAction,
|
|
@@ -212,7 +219,7 @@ const GlobalSearch = /* @__PURE__ */ defineComponent({
|
|
|
212
219
|
"ref": "editorRef",
|
|
213
220
|
"modelValue": this.searchValue,
|
|
214
221
|
"onUpdate:modelValue": ($event) => this.searchValue = $event,
|
|
215
|
-
"placeholder":
|
|
222
|
+
"placeholder": this.curPlaceholder,
|
|
216
223
|
"class": [this.ns.e("search"), this.ns.is("search", this.visible)],
|
|
217
224
|
"onFocus": this.handleFocus,
|
|
218
225
|
"onKeyup": this.handleEnter,
|
|
@@ -13,6 +13,7 @@ export declare const IBizGlobalSearch: import("@ibiz-template/vue3-util").TypeWi
|
|
|
13
13
|
visible: import("vue").ComputedRef<boolean>;
|
|
14
14
|
editorRef: import("vue").Ref<any>;
|
|
15
15
|
searchValue: import("vue").Ref<string>;
|
|
16
|
+
curPlaceholder: import("vue").ComputedRef<any>;
|
|
16
17
|
handleFocus: (_evt: FocusEvent) => void;
|
|
17
18
|
handleEnter: (event: KeyboardEvent) => void;
|
|
18
19
|
renderAction: () => JSX.Element | undefined;
|
|
@@ -57,8 +57,6 @@ class IndexBlankPlaceholderController extends PanelItemController {
|
|
|
57
57
|
const appView = await ibiz.hub.config.view.get(appViewId);
|
|
58
58
|
const { openMode = "INDEXVIEWTAB" } = appView;
|
|
59
59
|
this.state.visible = !openMode.startsWith("INDEXVIEWTAB");
|
|
60
|
-
} else {
|
|
61
|
-
this.state.visible = true;
|
|
62
60
|
}
|
|
63
61
|
});
|
|
64
62
|
}
|
|
@@ -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
|
|
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
import { IAppFunc, IAppMenuItem } from '@ibiz/model-core';
|
|
2
2
|
import { Router } from 'vue-router';
|
|
3
|
+
import { IRoutePathNode } from '@ibiz-template/vue3-util';
|
|
4
|
+
import { IAppMenuController } from '@ibiz-template/runtime';
|
|
3
5
|
import { BreadcrumbMsg } from './nav-breadcrumb.state';
|
|
6
|
+
/**
|
|
7
|
+
* @description 获取首页视图名称
|
|
8
|
+
* @export
|
|
9
|
+
* @param {IContext} context
|
|
10
|
+
* @returns {*} {string}
|
|
11
|
+
*/
|
|
12
|
+
export declare function getAppIndexViewName(context: IContext): string;
|
|
4
13
|
/**
|
|
5
14
|
* @description 获取首页导航信息
|
|
6
15
|
* @export
|
|
@@ -36,4 +45,20 @@ export declare function getCurViewName(router: Router): string;
|
|
|
36
45
|
* @param {string} viewName
|
|
37
46
|
* @return {*} {(IData | undefined)}
|
|
38
47
|
*/
|
|
39
|
-
export declare function getViewInfoByViewStack(viewName: string): IData | undefined;
|
|
48
|
+
export declare function getViewInfoByViewStack(viewName: string, context: IContext): IData | undefined;
|
|
49
|
+
/**
|
|
50
|
+
* @description 获取菜单标识
|
|
51
|
+
* @export
|
|
52
|
+
* @param {IRoutePathNode[]} pathNodes
|
|
53
|
+
* @returns {*} {string}
|
|
54
|
+
*/
|
|
55
|
+
export declare function getMenuTag(pathNodes: IRoutePathNode[]): string;
|
|
56
|
+
/**
|
|
57
|
+
* @description 根据标识获取菜单数据
|
|
58
|
+
* @export
|
|
59
|
+
* @param {string} tag
|
|
60
|
+
* @param {IAppMenuController} appMenu
|
|
61
|
+
* @param {IContext} context
|
|
62
|
+
* @returns {*} {Promise<IData>}
|
|
63
|
+
*/
|
|
64
|
+
export declare function getMenuItemByTag(tag: string, appMenu: IAppMenuController, context: IContext): Promise<IData | undefined>;
|