@ibiz-template/vue3-util 0.6.0 → 0.6.1-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.min.css +1 -1
- package/dist/index.system.min.js +1 -1
- package/es/panel-component/nav-pos/nav-pos.controller.d.ts.map +1 -1
- package/es/panel-component/nav-pos/nav-pos.controller.mjs +12 -3
- package/es/util/overlay-container/overlay-container.mjs +1 -1
- package/es/util/router-callback/router-callback.d.ts +1 -1
- package/es/util/router-callback/router-callback.d.ts.map +1 -1
- package/es/util/router-callback/router-callback.mjs +6 -2
- package/lib/_virtual/_commonjsHelpers.cjs +46 -0
- package/lib/common/badge/badge.cjs +34 -0
- package/lib/common/badge/badge.css +1 -0
- package/lib/common/code-list/code-list.cjs +105 -0
- package/lib/common/code-list/code-list.css +1 -0
- package/lib/common/control-base/control-base.cjs +102 -0
- package/lib/common/control-base/control-base.css +1 -0
- package/lib/common/control-loading-placeholder/control-loading-placeholder.cjs +32 -0
- package/lib/common/control-shell/control-shell.cjs +58 -0
- package/lib/common/control-shell/control-shell.css +1 -0
- package/lib/common/icon/icon.cjs +103 -0
- package/lib/common/index.cjs +21 -0
- package/lib/common/router-view/router-view.cjs +77 -0
- package/lib/common/view-shell/view-shell.cjs +137 -0
- package/lib/common/view-shell/view-shell.css +1 -0
- package/lib/control/index.cjs +10 -0
- package/lib/control/panel/index.cjs +9 -0
- package/lib/control/panel/panel/index.cjs +18 -0
- package/lib/control/panel/panel/panel.cjs +142 -0
- package/lib/control/panel/panel/panel.css +1 -0
- package/lib/control/panel/panel/panel.provider.cjs +10 -0
- package/lib/control/panel/view-layout-panel/index.cjs +24 -0
- package/lib/control/panel/view-layout-panel/view-layout-panel.cjs +144 -0
- package/lib/control/panel/view-layout-panel/view-layout-panel.css +1 -0
- package/lib/control/panel/view-layout-panel/view-layout-panel.provider.cjs +10 -0
- package/lib/hooks/app/app.hooks.cjs +26 -0
- package/lib/hooks/index.cjs +7 -0
- package/lib/interface/index.cjs +5 -0
- package/lib/interface/util/index.cjs +5 -0
- package/lib/interface/util/route/route.cjs +3 -0
- package/lib/node_modules/.pnpm/path-browserify@1.0.1/node_modules/path-browserify/index.cjs +540 -0
- package/lib/panel-component/grid-container/grid-container.cjs +108 -0
- package/lib/panel-component/grid-container/grid-container.controller.cjs +14 -0
- package/lib/panel-component/grid-container/grid-container.css +1 -0
- package/lib/panel-component/grid-container/grid-container.provider.cjs +17 -0
- package/lib/panel-component/grid-container/grid-container.state.cjs +9 -0
- package/lib/panel-component/grid-container/index.cjs +25 -0
- package/lib/panel-component/index.cjs +73 -0
- package/lib/panel-component/multi-data-container/index.cjs +28 -0
- package/lib/panel-component/multi-data-container/multi-data-container-item.controller.cjs +119 -0
- package/lib/panel-component/multi-data-container/multi-data-container-itm.state.cjs +19 -0
- package/lib/panel-component/multi-data-container/multi-data-container.cjs +89 -0
- package/lib/panel-component/multi-data-container/multi-data-container.controller.cjs +262 -0
- package/lib/panel-component/multi-data-container/multi-data-container.css +1 -0
- package/lib/panel-component/multi-data-container/multi-data-container.provider.cjs +17 -0
- package/lib/panel-component/multi-data-container/multi-data-container.state.cjs +19 -0
- package/lib/panel-component/nav-pos/index.cjs +22 -0
- package/lib/panel-component/nav-pos/nav-pos.cjs +107 -0
- package/lib/panel-component/nav-pos/nav-pos.controller.cjs +312 -0
- package/lib/panel-component/nav-pos/nav-pos.css +1 -0
- package/lib/panel-component/nav-pos/nav-pos.provider.cjs +26 -0
- package/lib/panel-component/nav-pos/nav-pos.state.cjs +49 -0
- package/lib/panel-component/panel-container/index.cjs +29 -0
- package/lib/panel-component/panel-container/panel-container.cjs +72 -0
- package/lib/panel-component/panel-container/panel-container.controller.cjs +14 -0
- package/lib/panel-component/panel-container/panel-container.css +1 -0
- package/lib/panel-component/panel-container/panel-container.provider.cjs +17 -0
- package/lib/panel-component/panel-container/panel-container.state.cjs +9 -0
- package/lib/panel-component/panel-container-group/index.cjs +28 -0
- package/lib/panel-component/panel-container-group/panel-container-group.cjs +110 -0
- package/lib/panel-component/panel-container-group/panel-container-group.controller.cjs +37 -0
- package/lib/panel-component/panel-container-group/panel-container-group.css +1 -0
- package/lib/panel-component/panel-container-group/panel-container-group.provider.cjs +17 -0
- package/lib/panel-component/panel-container-group/panel-container-group.state.cjs +9 -0
- package/lib/panel-component/panel-container-image/index.cjs +28 -0
- package/lib/panel-component/panel-container-image/panel-container-image.cjs +95 -0
- package/lib/panel-component/panel-container-image/panel-container-image.controller.cjs +14 -0
- package/lib/panel-component/panel-container-image/panel-container-image.css +1 -0
- package/lib/panel-component/panel-container-image/panel-container-image.provider.cjs +17 -0
- package/lib/panel-component/panel-container-image/panel-container-image.state.cjs +9 -0
- package/lib/panel-component/panel-ctrl-pos/index.cjs +20 -0
- package/lib/panel-component/panel-ctrl-pos/panel-ctrl-pos.cjs +47 -0
- package/lib/panel-component/panel-ctrl-pos/panel-ctrl-pos.controller.cjs +25 -0
- package/lib/panel-component/panel-ctrl-pos/panel-ctrl-pos.css +1 -0
- package/lib/panel-component/panel-ctrl-pos/panel-ctrl-pos.provider.cjs +17 -0
- package/lib/panel-component/panel-field/index.cjs +20 -0
- package/lib/panel-component/panel-field/panel-field.cjs +78 -0
- package/lib/panel-component/panel-field/panel-field.controller.cjs +132 -0
- package/lib/panel-component/panel-field/panel-field.css +1 -0
- package/lib/panel-component/panel-field/panel-field.provider.cjs +17 -0
- package/lib/panel-component/panel-field/panel-field.state.cjs +9 -0
- package/lib/panel-component/panel-item-render/index.cjs +24 -0
- package/lib/panel-component/panel-item-render/panel-item-render.cjs +49 -0
- package/lib/panel-component/panel-item-render/panel-item-render.controller.cjs +31 -0
- package/lib/panel-component/panel-item-render/panel-item-render.provider.cjs +17 -0
- package/lib/panel-component/panel-rawitem/index.cjs +32 -0
- package/lib/panel-component/panel-rawitem/panel-rawitem.cjs +61 -0
- package/lib/panel-component/panel-rawitem/panel-rawitem.controller.cjs +30 -0
- package/lib/panel-component/panel-rawitem/panel-rawitem.css +1 -0
- package/lib/panel-component/panel-rawitem/panel-rawitem.provider.cjs +17 -0
- package/lib/panel-component/panel-tab-page/index.cjs +18 -0
- package/lib/panel-component/panel-tab-page/panel-tab-page.cjs +65 -0
- package/lib/panel-component/panel-tab-page/panel-tab-page.provider.cjs +17 -0
- package/lib/panel-component/scroll-container/index.cjs +55 -0
- package/lib/panel-component/scroll-container/scroll-container/index.cjs +9 -0
- package/lib/panel-component/scroll-container/scroll-container/scroll-container.cjs +114 -0
- package/lib/panel-component/scroll-container/scroll-container/scroll-container.controller.cjs +14 -0
- package/lib/panel-component/scroll-container/scroll-container/scroll-container.css +1 -0
- package/lib/panel-component/scroll-container/scroll-container/scroll-container.provider.cjs +17 -0
- package/lib/panel-component/scroll-container/scroll-container-item/index.cjs +9 -0
- package/lib/panel-component/scroll-container/scroll-container-item/scroll-container-item.cjs +66 -0
- package/lib/panel-component/scroll-container/scroll-container-item/scroll-container-item.controller.cjs +9 -0
- package/lib/panel-component/scroll-container/scroll-container-item/scroll-container-item.css +1 -0
- package/lib/panel-component/scroll-container/scroll-container-item/scroll-container-item.provider.cjs +17 -0
- package/lib/panel-component/single-data-container/index.cjs +28 -0
- package/lib/panel-component/single-data-container/single-data-container.cjs +79 -0
- package/lib/panel-component/single-data-container/single-data-container.controller.cjs +287 -0
- package/lib/panel-component/single-data-container/single-data-container.css +1 -0
- package/lib/panel-component/single-data-container/single-data-container.provider.cjs +17 -0
- package/lib/panel-component/single-data-container/single-data-container.state.cjs +19 -0
- package/lib/plugin/index.cjs +7 -0
- package/{src/plugin/plugin-factory/plugin-factory.ts → lib/plugin/plugin-factory/plugin-factory.cjs} +137 -182
- package/lib/props/common.cjs +17 -0
- package/lib/props/editor/array.cjs +14 -0
- package/lib/props/editor/autocomplete.cjs +14 -0
- package/lib/props/editor/cascader.cjs +14 -0
- package/lib/props/editor/check-box-list.cjs +14 -0
- package/lib/props/editor/check-box.cjs +14 -0
- package/lib/props/editor/code.cjs +23 -0
- package/lib/props/editor/color-picker.cjs +14 -0
- package/lib/props/editor/common.cjs +62 -0
- package/lib/props/editor/data-picker.cjs +14 -0
- package/lib/props/editor/date-picker.cjs +14 -0
- package/lib/props/editor/date-range.cjs +14 -0
- package/lib/props/editor/dropdown-list.cjs +14 -0
- package/lib/props/editor/html.cjs +14 -0
- package/lib/props/editor/index.cjs +86 -0
- package/lib/props/editor/list-box.cjs +14 -0
- package/lib/props/editor/markdown.cjs +22 -0
- package/lib/props/editor/number-range.cjs +14 -0
- package/lib/props/editor/radio-button-list.cjs +14 -0
- package/lib/props/editor/rate.cjs +14 -0
- package/lib/props/editor/raw.cjs +14 -0
- package/lib/props/editor/slider.cjs +14 -0
- package/lib/props/editor/span.cjs +14 -0
- package/lib/props/editor/stepper.cjs +14 -0
- package/lib/props/editor/switch.cjs +14 -0
- package/lib/props/editor/text-box.cjs +30 -0
- package/lib/props/editor/upload.cjs +14 -0
- package/lib/props/index.cjs +89 -0
- package/lib/use/click-outside/click-outside.cjs +50 -0
- package/lib/use/control/index.cjs +7 -0
- package/lib/use/control/use-control-controller/use-control-controller.cjs +78 -0
- package/lib/use/event/event.cjs +39 -0
- package/lib/use/focus-blur/focus-blur.cjs +48 -0
- package/lib/use/index.cjs +34 -0
- package/lib/use/namespace/namespace.cjs +10 -0
- package/lib/use/route/route.cjs +31 -0
- package/lib/use/util/index.cjs +14 -0
- package/lib/use/view/index.cjs +7 -0
- package/lib/use/view/use-view-controller/use-view-controller.cjs +86 -0
- package/lib/use/vue/vue.cjs +64 -0
- package/lib/util/control/prepare-control.cjs +24 -0
- package/lib/util/index.cjs +43 -0
- package/lib/util/install.cjs +11 -0
- package/lib/util/overlay-container/overlay-container.cjs +116 -0
- package/lib/util/overlay-popover-container/overlay-popover-container.cjs +12 -0
- package/lib/util/overlay-view-util/overlay-view-util.cjs +70 -0
- package/lib/util/render/render.cjs +22 -0
- package/lib/util/route/route-listener.cjs +75 -0
- package/lib/util/route/route.cjs +302 -0
- package/lib/util/router-callback/router-callback-item.cjs +74 -0
- package/{src/util/router-callback/router-callback.ts → lib/util/router-callback/router-callback.cjs} +33 -37
- package/lib/util/store/app-store/app-store.cjs +12 -0
- package/lib/util/store/index.cjs +12 -0
- package/lib/util/store/ui-store/ui-store.cjs +17 -0
- package/lib/util/store/ui-store/z-index.cjs +20 -0
- package/lib/view/app-redirect-view/app-redirect-view.cjs +29 -0
- package/lib/view/common/index.cjs +15 -0
- package/lib/view/common/view.cjs +129 -0
- package/lib/view/common/view.css +1 -0
- package/lib/view/common/view.provider.cjs +10 -0
- package/lib/view/de-redirect-view/de-redirect-view.cjs +64 -0
- package/lib/view/de-redirect-view/de-redirect-view.provider.cjs +10 -0
- package/lib/view/de-redirect-view/index.cjs +22 -0
- package/lib/view/index.cjs +15 -0
- package/lib/view/portal-view/index.cjs +23 -0
- package/lib/view/portal-view/portal-view.cjs +95 -0
- package/lib/view/portal-view/portal-view.provider.cjs +10 -0
- package/lib/view/todo-redirect/todo-redirect.cjs +54 -0
- package/package.json +14 -10
- package/src/common/badge/badge.scss +0 -29
- package/src/common/badge/badge.tsx +0 -26
- package/src/common/code-list/code-list.scss +0 -15
- package/src/common/code-list/code-list.tsx +0 -127
- package/src/common/control-base/control-base.scss +0 -4
- package/src/common/control-base/control-base.tsx +0 -130
- package/src/common/control-loading-placeholder/control-loading-placeholder.tsx +0 -22
- package/src/common/control-shell/control-shell.scss +0 -5
- package/src/common/control-shell/control-shell.tsx +0 -70
- package/src/common/icon/icon.tsx +0 -82
- package/src/common/index.ts +0 -8
- package/src/common/router-view/router-view.tsx +0 -74
- package/src/common/view-shell/view-shell.scss +0 -5
- package/src/common/view-shell/view-shell.tsx +0 -163
- package/src/control/index.ts +0 -1
- package/src/control/panel/index.ts +0 -2
- package/src/control/panel/panel/index.ts +0 -12
- package/src/control/panel/panel/panel.provider.ts +0 -14
- package/src/control/panel/panel/panel.scss +0 -9
- package/src/control/panel/panel/panel.tsx +0 -166
- package/src/control/panel/view-layout-panel/index.ts +0 -18
- package/src/control/panel/view-layout-panel/view-layout-panel.provider.ts +0 -14
- package/src/control/panel/view-layout-panel/view-layout-panel.scss +0 -9
- package/src/control/panel/view-layout-panel/view-layout-panel.tsx +0 -178
- package/src/hooks/app/app.hooks.ts +0 -31
- package/src/hooks/index.ts +0 -1
- package/src/index.ts +0 -18
- package/src/interface/index.ts +0 -1
- package/src/interface/util/index.ts +0 -1
- package/src/interface/util/route/route.ts +0 -116
- package/src/panel-component/grid-container/grid-container.controller.ts +0 -18
- package/src/panel-component/grid-container/grid-container.provider.ts +0 -30
- package/src/panel-component/grid-container/grid-container.scss +0 -17
- package/src/panel-component/grid-container/grid-container.state.ts +0 -12
- package/src/panel-component/grid-container/grid-container.tsx +0 -119
- package/src/panel-component/grid-container/index.ts +0 -19
- package/src/panel-component/index.ts +0 -13
- package/src/panel-component/multi-data-container/index.ts +0 -22
- package/src/panel-component/multi-data-container/multi-data-container-item.controller.ts +0 -166
- package/src/panel-component/multi-data-container/multi-data-container-itm.state.ts +0 -20
- package/src/panel-component/multi-data-container/multi-data-container.controller.ts +0 -308
- package/src/panel-component/multi-data-container/multi-data-container.provider.ts +0 -30
- package/src/panel-component/multi-data-container/multi-data-container.scss +0 -10
- package/src/panel-component/multi-data-container/multi-data-container.state.ts +0 -20
- package/src/panel-component/multi-data-container/multi-data-container.tsx +0 -109
- package/src/panel-component/nav-pos/index.ts +0 -16
- package/src/panel-component/nav-pos/nav-pos.controller.ts +0 -393
- package/src/panel-component/nav-pos/nav-pos.provider.ts +0 -38
- package/src/panel-component/nav-pos/nav-pos.scss +0 -4
- package/src/panel-component/nav-pos/nav-pos.state.ts +0 -52
- package/src/panel-component/nav-pos/nav-pos.tsx +0 -121
- package/src/panel-component/panel-container/index.ts +0 -27
- package/src/panel-component/panel-container/panel-container.controller.ts +0 -18
- package/src/panel-component/panel-container/panel-container.provider.ts +0 -30
- package/src/panel-component/panel-container/panel-container.scss +0 -15
- package/src/panel-component/panel-container/panel-container.state.ts +0 -12
- package/src/panel-component/panel-container/panel-container.tsx +0 -72
- package/src/panel-component/panel-container-group/index.ts +0 -22
- package/src/panel-component/panel-container-group/panel-container-group.controller.ts +0 -43
- package/src/panel-component/panel-container-group/panel-container-group.provider.ts +0 -30
- package/src/panel-component/panel-container-group/panel-container-group.scss +0 -91
- package/src/panel-component/panel-container-group/panel-container-group.state.ts +0 -12
- package/src/panel-component/panel-container-group/panel-container-group.tsx +0 -112
- package/src/panel-component/panel-container-image/index.ts +0 -22
- package/src/panel-component/panel-container-image/panel-container-image.controller.ts +0 -18
- package/src/panel-component/panel-container-image/panel-container-image.provider.ts +0 -30
- package/src/panel-component/panel-container-image/panel-container-image.scss +0 -18
- package/src/panel-component/panel-container-image/panel-container-image.state.ts +0 -12
- package/src/panel-component/panel-container-image/panel-container-image.tsx +0 -95
- package/src/panel-component/panel-ctrl-pos/index.ts +0 -14
- package/src/panel-component/panel-ctrl-pos/panel-ctrl-pos.controller.ts +0 -53
- package/src/panel-component/panel-ctrl-pos/panel-ctrl-pos.provider.ts +0 -30
- package/src/panel-component/panel-ctrl-pos/panel-ctrl-pos.scss +0 -8
- package/src/panel-component/panel-ctrl-pos/panel-ctrl-pos.tsx +0 -53
- package/src/panel-component/panel-field/index.ts +0 -14
- package/src/panel-component/panel-field/panel-field.controller.ts +0 -174
- package/src/panel-component/panel-field/panel-field.provider.ts +0 -28
- package/src/panel-component/panel-field/panel-field.scss +0 -36
- package/src/panel-component/panel-field/panel-field.state.ts +0 -12
- package/src/panel-component/panel-field/panel-field.tsx +0 -81
- package/src/panel-component/panel-item-render/index.ts +0 -18
- package/src/panel-component/panel-item-render/panel-item-render.controller.ts +0 -52
- package/src/panel-component/panel-item-render/panel-item-render.provider.ts +0 -30
- package/src/panel-component/panel-item-render/panel-item-render.tsx +0 -50
- package/src/panel-component/panel-rawitem/index.ts +0 -26
- package/src/panel-component/panel-rawitem/panel-rawitem.controller.ts +0 -34
- package/src/panel-component/panel-rawitem/panel-rawitem.provider.ts +0 -28
- package/src/panel-component/panel-rawitem/panel-rawitem.scss +0 -8
- package/src/panel-component/panel-rawitem/panel-rawitem.tsx +0 -61
- package/src/panel-component/panel-tab-page/index.ts +0 -12
- package/src/panel-component/panel-tab-page/panel-tab-page.provider.ts +0 -27
- package/src/panel-component/panel-tab-page/panel-tab-page.tsx +0 -55
- package/src/panel-component/scroll-container/index.ts +0 -44
- package/src/panel-component/scroll-container/scroll-container/index.ts +0 -2
- package/src/panel-component/scroll-container/scroll-container/scroll-container.controller.ts +0 -32
- package/src/panel-component/scroll-container/scroll-container/scroll-container.provider.ts +0 -30
- package/src/panel-component/scroll-container/scroll-container/scroll-container.scss +0 -34
- package/src/panel-component/scroll-container/scroll-container/scroll-container.tsx +0 -110
- package/src/panel-component/scroll-container/scroll-container-item/index.ts +0 -2
- package/src/panel-component/scroll-container/scroll-container-item/scroll-container-item.controller.ts +0 -25
- package/src/panel-component/scroll-container/scroll-container-item/scroll-container-item.provider.ts +0 -30
- package/src/panel-component/scroll-container/scroll-container-item/scroll-container-item.scss +0 -9
- package/src/panel-component/scroll-container/scroll-container-item/scroll-container-item.tsx +0 -60
- package/src/panel-component/single-data-container/index.ts +0 -22
- package/src/panel-component/single-data-container/single-data-container.controller.ts +0 -345
- package/src/panel-component/single-data-container/single-data-container.provider.ts +0 -30
- package/src/panel-component/single-data-container/single-data-container.scss +0 -10
- package/src/panel-component/single-data-container/single-data-container.state.ts +0 -20
- package/src/panel-component/single-data-container/single-data-container.tsx +0 -95
- package/src/plugin/index.ts +0 -1
- package/src/props/common.ts +0 -30
- package/src/props/editor/array.ts +0 -27
- package/src/props/editor/autocomplete.ts +0 -27
- package/src/props/editor/cascader.ts +0 -27
- package/src/props/editor/check-box-list.ts +0 -27
- package/src/props/editor/check-box.ts +0 -27
- package/src/props/editor/code.ts +0 -36
- package/src/props/editor/color-picker.ts +0 -27
- package/src/props/editor/common.ts +0 -94
- package/src/props/editor/data-picker.ts +0 -27
- package/src/props/editor/date-picker.ts +0 -27
- package/src/props/editor/date-range.ts +0 -23
- package/src/props/editor/dropdown-list.ts +0 -27
- package/src/props/editor/html.ts +0 -27
- package/src/props/editor/index.ts +0 -25
- package/src/props/editor/list-box.ts +0 -27
- package/src/props/editor/markdown.ts +0 -35
- package/src/props/editor/number-range.ts +0 -23
- package/src/props/editor/radio-button-list.ts +0 -27
- package/src/props/editor/rate.ts +0 -23
- package/src/props/editor/raw.ts +0 -23
- package/src/props/editor/slider.ts +0 -23
- package/src/props/editor/span.ts +0 -27
- package/src/props/editor/stepper.ts +0 -23
- package/src/props/editor/switch.ts +0 -23
- package/src/props/editor/text-box.ts +0 -79
- package/src/props/editor/upload.ts +0 -27
- package/src/props/index.ts +0 -2
- package/src/types/index.d.ts +0 -8
- package/src/use/click-outside/click-outside.ts +0 -72
- package/src/use/control/index.ts +0 -1
- package/src/use/control/use-control-controller/use-control-controller.ts +0 -153
- package/src/use/event/event.ts +0 -57
- package/src/use/focus-blur/focus-blur.ts +0 -83
- package/src/use/index.ts +0 -9
- package/src/use/namespace/namespace.ts +0 -14
- package/src/use/route/route.ts +0 -47
- package/src/use/util/index.ts +0 -26
- package/src/use/view/index.ts +0 -1
- package/src/use/view/use-view-controller/use-view-controller.ts +0 -153
- package/src/use/vue/vue.ts +0 -142
- package/src/util/control/prepare-control.ts +0 -33
- package/src/util/index.ts +0 -10
- package/src/util/install.ts +0 -14
- package/src/util/overlay-container/overlay-container.ts +0 -155
- package/src/util/overlay-popover-container/overlay-popover-container.ts +0 -30
- package/src/util/overlay-view-util/overlay-view-util.ts +0 -89
- package/src/util/render/render.ts +0 -28
- package/src/util/route/route-listener.ts +0 -91
- package/src/util/route/route.ts +0 -520
- package/src/util/router-callback/router-callback-item.ts +0 -98
- package/src/util/store/app-store/app-store.ts +0 -10
- package/src/util/store/index.ts +0 -6
- package/src/util/store/ui-store/ui-store.ts +0 -27
- package/src/util/store/ui-store/z-index.ts +0 -53
- package/src/view/app-redirect-view/app-redirect-view.tsx +0 -26
- package/src/view/common/index.ts +0 -10
- package/src/view/common/view.provider.ts +0 -14
- package/src/view/common/view.scss +0 -38
- package/src/view/common/view.tsx +0 -152
- package/src/view/de-redirect-view/de-redirect-view.provider.ts +0 -14
- package/src/view/de-redirect-view/de-redirect-view.tsx +0 -62
- package/src/view/de-redirect-view/index.ts +0 -17
- package/src/view/index.ts +0 -5
- package/src/view/portal-view/index.ts +0 -18
- package/src/view/portal-view/portal-view.provider.ts +0 -14
- package/src/view/portal-view/portal-view.tsx +0 -79
- package/src/view/todo-redirect/todo-redirect.tsx +0 -51
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { PanelItemState } from '@ibiz-template/runtime';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* 多项数据容器状态
|
|
5
|
-
*
|
|
6
|
-
* @author lxm
|
|
7
|
-
* @date 2023-02-07 06:04:27
|
|
8
|
-
* @export
|
|
9
|
-
* @class MultiDataContainerState
|
|
10
|
-
* @extends {PanelItemState}
|
|
11
|
-
*/
|
|
12
|
-
export class MultiDataContainerState extends PanelItemState {
|
|
13
|
-
/**
|
|
14
|
-
* 多项数据容器数据
|
|
15
|
-
* @author lxm
|
|
16
|
-
* @date 2023-07-14 12:07:45
|
|
17
|
-
* @type {(IData | IData[])}
|
|
18
|
-
*/
|
|
19
|
-
items: IData[] = [];
|
|
20
|
-
}
|
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
IPanelItemProvider,
|
|
3
|
-
IPanelItemController,
|
|
4
|
-
} from '@ibiz-template/runtime';
|
|
5
|
-
import { IPanelContainer, IPanelItem } from '@ibiz/model-core';
|
|
6
|
-
import {
|
|
7
|
-
computed,
|
|
8
|
-
defineComponent,
|
|
9
|
-
inject,
|
|
10
|
-
PropType,
|
|
11
|
-
reactive,
|
|
12
|
-
VNode,
|
|
13
|
-
watch,
|
|
14
|
-
} from 'vue';
|
|
15
|
-
import { useNamespace } from '../../use';
|
|
16
|
-
import { MultiDataContainerController } from './multi-data-container.controller';
|
|
17
|
-
import './multi-data-container.scss';
|
|
18
|
-
|
|
19
|
-
export const MultiDataContainer = defineComponent({
|
|
20
|
-
name: 'IBizMultiDataContainer',
|
|
21
|
-
props: {
|
|
22
|
-
modelData: {
|
|
23
|
-
type: Object as PropType<IPanelContainer>,
|
|
24
|
-
required: true,
|
|
25
|
-
},
|
|
26
|
-
controller: {
|
|
27
|
-
type: MultiDataContainerController,
|
|
28
|
-
required: true,
|
|
29
|
-
},
|
|
30
|
-
},
|
|
31
|
-
setup(props) {
|
|
32
|
-
const ns = useNamespace('multi-data-container');
|
|
33
|
-
const { id } = props.modelData;
|
|
34
|
-
|
|
35
|
-
// 面板成员state响应式
|
|
36
|
-
watch(
|
|
37
|
-
() => props.controller.state.items,
|
|
38
|
-
() => {
|
|
39
|
-
props.controller.dataItems.forEach(item => {
|
|
40
|
-
item.state = reactive(item.state);
|
|
41
|
-
|
|
42
|
-
const keys = Object.keys(item.panelItems);
|
|
43
|
-
keys.forEach(key => {
|
|
44
|
-
const panelItem = item.panelItems[key];
|
|
45
|
-
panelItem.state = reactive(panelItem.state);
|
|
46
|
-
});
|
|
47
|
-
});
|
|
48
|
-
},
|
|
49
|
-
{ immediate: true },
|
|
50
|
-
);
|
|
51
|
-
|
|
52
|
-
// 获取上层的绘制函数
|
|
53
|
-
const renderPanelItem = inject<
|
|
54
|
-
(
|
|
55
|
-
panelItem: IPanelItem,
|
|
56
|
-
options?: {
|
|
57
|
-
providers: {
|
|
58
|
-
[key: string]: IPanelItemProvider;
|
|
59
|
-
};
|
|
60
|
-
panelItems: {
|
|
61
|
-
[key: string]: IPanelItemController;
|
|
62
|
-
};
|
|
63
|
-
},
|
|
64
|
-
) => VNode | null
|
|
65
|
-
>('renderPanelItem')!;
|
|
66
|
-
|
|
67
|
-
// 类名控制
|
|
68
|
-
const classArr = computed(() => {
|
|
69
|
-
const result: Array<string | false> = [
|
|
70
|
-
ns.b(),
|
|
71
|
-
ns.m(id),
|
|
72
|
-
...props.controller.containerClass,
|
|
73
|
-
];
|
|
74
|
-
return result;
|
|
75
|
-
});
|
|
76
|
-
|
|
77
|
-
return { ns, classArr, renderPanelItem };
|
|
78
|
-
},
|
|
79
|
-
render() {
|
|
80
|
-
let content: VNode | VNode[];
|
|
81
|
-
if (this.$slots.default) {
|
|
82
|
-
content = this.$slots.default();
|
|
83
|
-
} else {
|
|
84
|
-
// 内容区默认插槽处理,封装app-col
|
|
85
|
-
content = this.controller.state.items.map((_item, index) => {
|
|
86
|
-
const itemController = this.controller.dataItems[index];
|
|
87
|
-
return (
|
|
88
|
-
<iBizRow class={this.ns.b('content')} layout={this.modelData.layout}>
|
|
89
|
-
{this.modelData.panelItems?.map(panelItem => {
|
|
90
|
-
const childController = itemController.panelItems[panelItem.id!];
|
|
91
|
-
return (
|
|
92
|
-
<iBizCol
|
|
93
|
-
layoutPos={panelItem.layoutPos}
|
|
94
|
-
state={childController.state}
|
|
95
|
-
>
|
|
96
|
-
{this.renderPanelItem(panelItem, {
|
|
97
|
-
providers: this.controller.providers,
|
|
98
|
-
panelItems: itemController.panelItems,
|
|
99
|
-
})}
|
|
100
|
-
</iBizCol>
|
|
101
|
-
);
|
|
102
|
-
})}
|
|
103
|
-
</iBizRow>
|
|
104
|
-
);
|
|
105
|
-
});
|
|
106
|
-
}
|
|
107
|
-
return <div class={this.classArr}>{content}</div>;
|
|
108
|
-
},
|
|
109
|
-
});
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { registerPanelItemProvider } from '@ibiz-template/runtime';
|
|
2
|
-
import { App } from 'vue';
|
|
3
|
-
import { withInstall } from '../../util';
|
|
4
|
-
import { NavPos } from './nav-pos';
|
|
5
|
-
import { NavPosProvider } from './nav-pos.provider';
|
|
6
|
-
import { NavPosState } from './nav-pos.state';
|
|
7
|
-
import { NavPosController } from './nav-pos.controller';
|
|
8
|
-
|
|
9
|
-
export { NavPosState, NavPosController };
|
|
10
|
-
|
|
11
|
-
export const IBizNavPos = withInstall(NavPos, function (v: App) {
|
|
12
|
-
v.component(NavPos.name, NavPos);
|
|
13
|
-
registerPanelItemProvider('RAWITEM_NAV_POS', () => new NavPosProvider());
|
|
14
|
-
});
|
|
15
|
-
|
|
16
|
-
export default IBizNavPos;
|
|
@@ -1,393 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
EventBase,
|
|
3
|
-
IModal,
|
|
4
|
-
Modal,
|
|
5
|
-
OpenAppViewCommand,
|
|
6
|
-
IPanelItemNavPosController,
|
|
7
|
-
ViewMode,
|
|
8
|
-
INavViewMsg,
|
|
9
|
-
NavViewChangeEvent,
|
|
10
|
-
PanelItemController,
|
|
11
|
-
} from '@ibiz-template/runtime';
|
|
12
|
-
import { IPanelRawItem } from '@ibiz/model-core';
|
|
13
|
-
import { RouteLocationNormalizedLoaded, Router } from 'vue-router';
|
|
14
|
-
import { notNilEmpty } from 'qx-util';
|
|
15
|
-
import { mergeLeft } from 'ramda';
|
|
16
|
-
import { NavPosState } from './nav-pos.state';
|
|
17
|
-
import { getNestedRoutePath } from '../../util';
|
|
18
|
-
|
|
19
|
-
const excludeKeys = ['is404', 'isRoutePushed'] as const;
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* 导航占位控制器
|
|
23
|
-
*
|
|
24
|
-
* @export
|
|
25
|
-
* @class NavPosController
|
|
26
|
-
* @extends {PanelItemController}
|
|
27
|
-
*/
|
|
28
|
-
export class NavPosController
|
|
29
|
-
extends PanelItemController<IPanelRawItem>
|
|
30
|
-
implements IPanelItemNavPosController
|
|
31
|
-
{
|
|
32
|
-
/**
|
|
33
|
-
* 导航占位状态
|
|
34
|
-
*
|
|
35
|
-
* @type {NavPosState}
|
|
36
|
-
* @memberof NavPosController
|
|
37
|
-
*/
|
|
38
|
-
declare state: NavPosState;
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* 导航视图的modal
|
|
42
|
-
*
|
|
43
|
-
* @type {{ [key: string]: IModal }}
|
|
44
|
-
* @memberof NavPosController
|
|
45
|
-
*/
|
|
46
|
-
viewModals: { [key: string]: IModal } = {};
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* 当前导航视图
|
|
50
|
-
*
|
|
51
|
-
* @type {INavViewMsg}
|
|
52
|
-
* @memberof NavPosController
|
|
53
|
-
*/
|
|
54
|
-
curNavViewMsg!: INavViewMsg;
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* Router 对象
|
|
58
|
-
*
|
|
59
|
-
* @type {Router}
|
|
60
|
-
* @memberof NavPosController
|
|
61
|
-
*/
|
|
62
|
-
router!: Router;
|
|
63
|
-
|
|
64
|
-
/**
|
|
65
|
-
* 关联部件标识集合
|
|
66
|
-
* @author lxm
|
|
67
|
-
* @date 2023-08-10 07:35:08
|
|
68
|
-
* @type {string[]}
|
|
69
|
-
*/
|
|
70
|
-
refCtrlKeys: string[] = [];
|
|
71
|
-
|
|
72
|
-
/**
|
|
73
|
-
* 自定义补充参数
|
|
74
|
-
*
|
|
75
|
-
* @author zk
|
|
76
|
-
* @date 2023-09-27 03:09:02
|
|
77
|
-
* @type {IData}
|
|
78
|
-
* @memberof NavPosController
|
|
79
|
-
*/
|
|
80
|
-
rawItemParams: IData = {};
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
* Route 对象
|
|
84
|
-
*
|
|
85
|
-
* @author zk
|
|
86
|
-
* @date 2023-06-29 04:06:59
|
|
87
|
-
* @type {RouteLocationNormalizedLoaded}
|
|
88
|
-
* @memberof NavPosController
|
|
89
|
-
*/
|
|
90
|
-
get route(): RouteLocationNormalizedLoaded {
|
|
91
|
-
return this.router.currentRoute.value;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
/**
|
|
95
|
-
* 导航项是否缓存
|
|
96
|
-
*
|
|
97
|
-
* @author zk
|
|
98
|
-
* @date 2023-09-27 03:09:49
|
|
99
|
-
* @param {INavViewMsg} navViewMsg
|
|
100
|
-
* @return {*} {boolean}
|
|
101
|
-
* @memberof NavPosController
|
|
102
|
-
*/
|
|
103
|
-
getExpItemIsCache(navViewMsg: INavViewMsg): boolean {
|
|
104
|
-
if (this.rawItemParams.expcache === 'CACHE') {
|
|
105
|
-
return true;
|
|
106
|
-
}
|
|
107
|
-
if (this.rawItemParams.expcache === 'NO_CACHE') {
|
|
108
|
-
return false;
|
|
109
|
-
}
|
|
110
|
-
return navViewMsg.isCache as boolean;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
/**
|
|
114
|
-
* 设置 Router 对象
|
|
115
|
-
*
|
|
116
|
-
* @param {Router} router
|
|
117
|
-
* @memberof NavPosController
|
|
118
|
-
*/
|
|
119
|
-
setRouter(router: Router): void {
|
|
120
|
-
this.router = router;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
protected async onInit(): Promise<void> {
|
|
124
|
-
await super.onInit();
|
|
125
|
-
this.handleRawItemParams();
|
|
126
|
-
if (this.model.rawItem?.rawItemParams) {
|
|
127
|
-
this.model.rawItem.rawItemParams.find(item => {
|
|
128
|
-
if (item.key === 'REFCTRL' && item.value) {
|
|
129
|
-
this.refCtrlKeys = item.value
|
|
130
|
-
.split(';')
|
|
131
|
-
.map(str => str.toLowerCase());
|
|
132
|
-
return true;
|
|
133
|
-
}
|
|
134
|
-
return false;
|
|
135
|
-
});
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
this.panel.evt.on('onControlEvent', event => {
|
|
139
|
-
// 是否是关联部件,如果没有配置都监控,配置了只监控指定部件
|
|
140
|
-
const isRefCtrl =
|
|
141
|
-
this.refCtrlKeys.length === 0 ||
|
|
142
|
-
this.refCtrlKeys.includes(event.triggerControlName);
|
|
143
|
-
if (isRefCtrl && event.triggerEventName === 'onNavViewChange') {
|
|
144
|
-
const triggerEvent = event.triggerEvent as NavViewChangeEvent;
|
|
145
|
-
this.openView(triggerEvent.navViewMsg);
|
|
146
|
-
}
|
|
147
|
-
});
|
|
148
|
-
|
|
149
|
-
// 根据 导航占位参数 || 视图参数 判断是否用路由打开视图 不使用:NO_ROUTE 使用 :ROUTE
|
|
150
|
-
// 导航占位参数优先级大于视图参数
|
|
151
|
-
const expRoute =
|
|
152
|
-
this.rawItemParams.expmode || this.panel.view.params.expmode;
|
|
153
|
-
|
|
154
|
-
// 路由模式下 必须为路由打开
|
|
155
|
-
if (expRoute === 'ROUTE' && this.routeDepth) {
|
|
156
|
-
this.state.routeOpen = true;
|
|
157
|
-
} else if (expRoute === 'NO_ROUTE') {
|
|
158
|
-
this.state.routeOpen = false;
|
|
159
|
-
} else {
|
|
160
|
-
this.state.routeOpen = !!this.routeDepth;
|
|
161
|
-
}
|
|
162
|
-
// 消费完参数销毁 expmode
|
|
163
|
-
if (this.panel.view.params.expmode) {
|
|
164
|
-
delete this.panel.view.params.expmode;
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
/**
|
|
169
|
-
* 创建导航占位状态对象
|
|
170
|
-
*
|
|
171
|
-
* @protected
|
|
172
|
-
* @return {*} {NavPosState}
|
|
173
|
-
* @memberof NavPosController
|
|
174
|
-
*/
|
|
175
|
-
protected createState(): NavPosState {
|
|
176
|
-
return new NavPosState(this.parent?.state);
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
/**
|
|
180
|
-
* 当前路由视图的层级
|
|
181
|
-
*
|
|
182
|
-
* @readonly
|
|
183
|
-
* @type {(number | undefined)}
|
|
184
|
-
* @memberof NavPosController
|
|
185
|
-
*/
|
|
186
|
-
get routeDepth(): number | undefined {
|
|
187
|
-
return this.panel.view.modal.routeDepth;
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
/**
|
|
191
|
-
* 计算缓存 key 标识
|
|
192
|
-
*
|
|
193
|
-
* @author chitanda
|
|
194
|
-
* @date 2023-12-03 13:12:25
|
|
195
|
-
* @protected
|
|
196
|
-
* @param {INavViewMsg} msg
|
|
197
|
-
* @return {*} {string}
|
|
198
|
-
*/
|
|
199
|
-
protected calcCacheKey(msg: INavViewMsg): string {
|
|
200
|
-
if (msg) {
|
|
201
|
-
return `${msg.viewId}___${msg.key}`;
|
|
202
|
-
}
|
|
203
|
-
return '';
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
/**
|
|
207
|
-
* 路由改变
|
|
208
|
-
*
|
|
209
|
-
* @memberof NavPosController
|
|
210
|
-
*/
|
|
211
|
-
onRouteChange(route: RouteLocationNormalizedLoaded): void {
|
|
212
|
-
// 没有当前导航视图信息时不做任何处理
|
|
213
|
-
if (this.curNavViewMsg) {
|
|
214
|
-
const cacheKey = this.calcCacheKey(this.curNavViewMsg);
|
|
215
|
-
|
|
216
|
-
// 路由打开的视图,currentKey在路由变更之后改值。此时新建的视图才能识别到跳转之后的路由。
|
|
217
|
-
this.state.currentKey = cacheKey;
|
|
218
|
-
|
|
219
|
-
// 更新fullPath信息
|
|
220
|
-
this.state.navViewMsgs[cacheKey].fullPath = route.fullPath;
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
/**
|
|
225
|
-
* 设置导航视图信息
|
|
226
|
-
*
|
|
227
|
-
* @author zk
|
|
228
|
-
* @date 2023-06-29 02:06:41
|
|
229
|
-
* @param {INavViewMsg} navViewMsg 导航视图信息
|
|
230
|
-
* @memberof NavPosController
|
|
231
|
-
*/
|
|
232
|
-
setNavViewMsgs(navViewMsg: INavViewMsg): void {
|
|
233
|
-
// isRoutePushed没传的时候给false
|
|
234
|
-
navViewMsg.isRoutePushed = navViewMsg.isRoutePushed === true;
|
|
235
|
-
const cacheKey = this.calcCacheKey(navViewMsg);
|
|
236
|
-
if (this.state.navViewMsgs[cacheKey]) {
|
|
237
|
-
mergeLeft(this.state.navViewMsgs[cacheKey], navViewMsg);
|
|
238
|
-
// 部分属性这次没传就是undefined
|
|
239
|
-
excludeKeys.forEach(key => {
|
|
240
|
-
if (Object.prototype.hasOwnProperty.call(navViewMsg, key)) {
|
|
241
|
-
this.state.navViewMsgs[cacheKey][key] = undefined;
|
|
242
|
-
}
|
|
243
|
-
});
|
|
244
|
-
} else {
|
|
245
|
-
// 不存在的走新建流程
|
|
246
|
-
this.state.navViewMsgs[cacheKey] = navViewMsg;
|
|
247
|
-
if (this.getExpItemIsCache(navViewMsg)) {
|
|
248
|
-
// 往缓存keys里添加新视图的key
|
|
249
|
-
this.state.cacheKeys.push(cacheKey);
|
|
250
|
-
}
|
|
251
|
-
this.viewModals[cacheKey] = new Modal({
|
|
252
|
-
mode: this.routeDepth ? ViewMode.ROUTE : ViewMode.EMBED,
|
|
253
|
-
routeDepth: this.routeDepth ? this.routeDepth + 1 : undefined,
|
|
254
|
-
dismiss: () => {
|
|
255
|
-
// 执行对应key的dismiss方法
|
|
256
|
-
this.dismiss(cacheKey);
|
|
257
|
-
},
|
|
258
|
-
});
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
// todo 换个方式
|
|
262
|
-
this.curNavViewMsg = this.state.navViewMsgs[cacheKey];
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
/**
|
|
266
|
-
* 自身的dismiss相关操作
|
|
267
|
-
*
|
|
268
|
-
* @param {string} key
|
|
269
|
-
* @memberof NavPosController
|
|
270
|
-
*/
|
|
271
|
-
dismiss(key: string): void {
|
|
272
|
-
ibiz.log.debug(this.constructor.name, 'dismiss', key);
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
/**
|
|
276
|
-
* 监听视图创建
|
|
277
|
-
*
|
|
278
|
-
* @param {EventBase} event
|
|
279
|
-
* @memberof NavPosController
|
|
280
|
-
*/
|
|
281
|
-
onViewCreated(event: EventBase): void {
|
|
282
|
-
ibiz.log.debug(this.constructor.name, 'onViewCreated', event);
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
toBlankRoute(): void {
|
|
286
|
-
const blankRoute = getNestedRoutePath(this.route, this.routeDepth!);
|
|
287
|
-
this.router.push(blankRoute);
|
|
288
|
-
}
|
|
289
|
-
|
|
290
|
-
/**
|
|
291
|
-
* 打开视图
|
|
292
|
-
*
|
|
293
|
-
* @param {INavViewMsg} openViewMsg
|
|
294
|
-
* @memberof NavPosController
|
|
295
|
-
*/
|
|
296
|
-
openView(openViewMsg: INavViewMsg): void {
|
|
297
|
-
// 当key为空时,直接切换currentKey,绘制null
|
|
298
|
-
if (!openViewMsg.key) {
|
|
299
|
-
this.state.currentKey = this.calcCacheKey(openViewMsg);
|
|
300
|
-
if (this.routeDepth && this.state.routeOpen) {
|
|
301
|
-
this.toBlankRoute();
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
return;
|
|
305
|
-
}
|
|
306
|
-
|
|
307
|
-
if (this.routeDepth && this.state.routeOpen) {
|
|
308
|
-
this.openViewByPath(openViewMsg);
|
|
309
|
-
} else {
|
|
310
|
-
this.openViewByModel(openViewMsg);
|
|
311
|
-
}
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
/**
|
|
315
|
-
* 通过路由打开视图
|
|
316
|
-
*
|
|
317
|
-
* @param {INavViewMsg} openViewMsg
|
|
318
|
-
* @memberof NavPosController
|
|
319
|
-
*/
|
|
320
|
-
openViewByPath(openViewMsg: INavViewMsg): void {
|
|
321
|
-
const cacheKey = this.calcCacheKey(openViewMsg);
|
|
322
|
-
this.setNavViewMsgs(openViewMsg);
|
|
323
|
-
const isRoutePushed = openViewMsg.isRoutePushed === true;
|
|
324
|
-
// * 外部跳转过了的场景不需要这边跳转路由了,直接处理后续内容。
|
|
325
|
-
if (isRoutePushed) {
|
|
326
|
-
this.state.currentKey = cacheKey;
|
|
327
|
-
this.state.navViewMsgs[this.calcCacheKey(this.curNavViewMsg)].fullPath =
|
|
328
|
-
this.route.fullPath;
|
|
329
|
-
return;
|
|
330
|
-
}
|
|
331
|
-
|
|
332
|
-
// * 路由跳转
|
|
333
|
-
if (openViewMsg.is404) {
|
|
334
|
-
const selfPath = getNestedRoutePath(this.route, this.routeDepth!, false);
|
|
335
|
-
this.router.push(`${selfPath}/404`);
|
|
336
|
-
} else if (
|
|
337
|
-
// 如果启用缓存并且有之前存过的fullPath则push回fullPath。
|
|
338
|
-
this.state.navViewMsgs[cacheKey].fullPath &&
|
|
339
|
-
this.getExpItemIsCache(openViewMsg)
|
|
340
|
-
) {
|
|
341
|
-
this.router.push(this.state.navViewMsgs[cacheKey].fullPath!);
|
|
342
|
-
} else {
|
|
343
|
-
// 走视图路由打开逻辑计算并push
|
|
344
|
-
const tempContext = Object.assign(openViewMsg.context!.clone(), {
|
|
345
|
-
toRouteDepth: this.routeDepth! + 1,
|
|
346
|
-
});
|
|
347
|
-
if (this.getExpItemIsCache(openViewMsg)) {
|
|
348
|
-
this.state.cacheKeys.push(cacheKey);
|
|
349
|
-
}
|
|
350
|
-
ibiz.commands.execute(
|
|
351
|
-
OpenAppViewCommand.TAG,
|
|
352
|
-
openViewMsg.viewId,
|
|
353
|
-
tempContext,
|
|
354
|
-
openViewMsg.params,
|
|
355
|
-
{ openMode: 'INDEXVIEWTAB' },
|
|
356
|
-
);
|
|
357
|
-
}
|
|
358
|
-
|
|
359
|
-
// !跳转路由过后,修改currentKey由onRouteChange那边路由变更之后处理。
|
|
360
|
-
}
|
|
361
|
-
|
|
362
|
-
/**
|
|
363
|
-
* 通过模型绘制视图
|
|
364
|
-
*
|
|
365
|
-
* @param {INavViewMsg} openViewMsg
|
|
366
|
-
* @memberof NavPosController
|
|
367
|
-
*/
|
|
368
|
-
openViewByModel(openViewMsg: INavViewMsg): void {
|
|
369
|
-
this.setNavViewMsgs(openViewMsg);
|
|
370
|
-
// 切换currentKey,重新渲染openViewMsg
|
|
371
|
-
this.state.currentKey = this.calcCacheKey(openViewMsg);
|
|
372
|
-
}
|
|
373
|
-
|
|
374
|
-
/**
|
|
375
|
-
* 处理自定义补充参数 [{key:'name',value:'data'}] => {name:'data'}
|
|
376
|
-
*
|
|
377
|
-
* @author zk
|
|
378
|
-
* @date 2023-09-27 03:09:55
|
|
379
|
-
* @protected
|
|
380
|
-
* @memberof NavPosController
|
|
381
|
-
*/
|
|
382
|
-
protected handleRawItemParams(): void {
|
|
383
|
-
let params = {};
|
|
384
|
-
const rawItemParams = this.model.rawItem?.rawItemParams;
|
|
385
|
-
if (notNilEmpty(rawItemParams)) {
|
|
386
|
-
params = rawItemParams!.reduce((param: IData, item) => {
|
|
387
|
-
param[item.key!.toLowerCase()] = item.value;
|
|
388
|
-
return param;
|
|
389
|
-
}, {});
|
|
390
|
-
}
|
|
391
|
-
Object.assign(this.rawItemParams, params);
|
|
392
|
-
}
|
|
393
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
IPanelItemNavPosController,
|
|
3
|
-
IPanelItemProvider,
|
|
4
|
-
PanelController,
|
|
5
|
-
PanelItemController,
|
|
6
|
-
} from '@ibiz-template/runtime';
|
|
7
|
-
import { IPanelItem } from '@ibiz/model-core';
|
|
8
|
-
import { NavPosController } from './nav-pos.controller';
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* 导航占位适配器
|
|
12
|
-
*
|
|
13
|
-
* @export
|
|
14
|
-
* @class NavPosProvider
|
|
15
|
-
* @implements {IPanelItemProvider}
|
|
16
|
-
*/
|
|
17
|
-
export class NavPosProvider implements IPanelItemProvider {
|
|
18
|
-
component: string = 'IBizNavPos';
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* 创建控制器
|
|
22
|
-
*
|
|
23
|
-
* @param {IPanelItem} panelItem
|
|
24
|
-
* @param {PanelController} panel
|
|
25
|
-
* @param {(PanelItemController | undefined)} parent
|
|
26
|
-
* @return {*} {Promise<IPanelItemNavPosController>}
|
|
27
|
-
* @memberof NavPosProvider
|
|
28
|
-
*/
|
|
29
|
-
async createController(
|
|
30
|
-
panelItem: IPanelItem,
|
|
31
|
-
panel: PanelController,
|
|
32
|
-
parent: PanelItemController | undefined,
|
|
33
|
-
): Promise<IPanelItemNavPosController> {
|
|
34
|
-
const c = new NavPosController(panelItem, panel, parent);
|
|
35
|
-
await c.init();
|
|
36
|
-
return c;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { INavViewMsg, PanelItemState } from '@ibiz-template/runtime';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* 导航占位状态
|
|
5
|
-
*
|
|
6
|
-
* @export
|
|
7
|
-
* @class NavPosState
|
|
8
|
-
* @extends {PanelItemState}
|
|
9
|
-
*/
|
|
10
|
-
export class NavPosState extends PanelItemState {
|
|
11
|
-
/**
|
|
12
|
-
* 是否启用缓存
|
|
13
|
-
*
|
|
14
|
-
* @type {boolean}
|
|
15
|
-
* @memberof NavPosState
|
|
16
|
-
*/
|
|
17
|
-
cache: boolean = true;
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* 是否是路由打开
|
|
21
|
-
*
|
|
22
|
-
* @author zk
|
|
23
|
-
* @date 2023-09-26 04:09:23
|
|
24
|
-
* @type {boolean}
|
|
25
|
-
* @memberof NavPosState
|
|
26
|
-
*/
|
|
27
|
-
routeOpen: boolean = true;
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* 当前导航视图标识
|
|
31
|
-
* @author lxm
|
|
32
|
-
* @date 2023-05-25 06:24:48
|
|
33
|
-
* @type {string}
|
|
34
|
-
*/
|
|
35
|
-
currentKey: string = '';
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* 缓存的视图标识
|
|
39
|
-
* @author lxm
|
|
40
|
-
* @date 2023-05-25 06:25:21
|
|
41
|
-
* @type {string[]}
|
|
42
|
-
*/
|
|
43
|
-
cacheKeys: string[] = ['RouterShell'];
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* 导航视图详细信息
|
|
47
|
-
* @author lxm
|
|
48
|
-
* @date 2023-05-25 07:07:05
|
|
49
|
-
* @type {INavViewMsg[]}
|
|
50
|
-
*/
|
|
51
|
-
navViewMsgs: { [p: string]: INavViewMsg } = {};
|
|
52
|
-
}
|