@ibiz-template/vue3-util 0.2.11 → 0.2.12
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 -0
- package/dist/index.system.min.js +1 -1
- package/dist/index.system.min.js.map +1 -1
- package/es/_virtual/_commonjsHelpers.mjs +40 -0
- package/es/common/code-list/code-list.css +1 -0
- package/es/common/code-list/code-list.d.ts +58 -0
- package/es/common/code-list/code-list.d.ts.map +1 -0
- package/es/common/code-list/code-list.mjs +85 -0
- package/es/common/control-base/control-base.css +1 -0
- package/es/common/control-base/control-base.d.ts +2 -0
- package/es/common/control-base/control-base.d.ts.map +1 -0
- package/es/common/control-base/control-base.mjs +99 -0
- package/es/common/control-loading-placeholder/control-loading-placeholder.d.ts +31 -0
- package/es/common/control-loading-placeholder/control-loading-placeholder.d.ts.map +1 -0
- package/es/common/control-loading-placeholder/control-loading-placeholder.mjs +30 -0
- package/es/common/control-shell/control-shell.css +1 -0
- package/es/common/control-shell/control-shell.d.ts +21 -0
- package/es/common/control-shell/control-shell.d.ts.map +1 -0
- package/es/common/control-shell/control-shell.mjs +56 -0
- package/es/common/icon/icon.d.ts +29 -0
- package/es/common/icon/icon.d.ts.map +1 -0
- package/es/common/icon/icon.mjs +89 -0
- package/es/common/index.d.ts +9 -0
- package/es/common/index.d.ts.map +1 -0
- package/es/common/index.mjs +9 -0
- package/es/common/router-view/router-view.d.ts +30 -0
- package/es/common/router-view/router-view.d.ts.map +1 -0
- package/es/common/router-view/router-view.mjs +75 -0
- package/es/common/view-shell/view-shell.css +1 -0
- package/es/common/view-shell/view-shell.d.ts +40 -0
- package/es/common/view-shell/view-shell.d.ts.map +1 -0
- package/es/common/view-shell/view-shell.mjs +77 -0
- package/{out → es}/index.d.ts +3 -0
- package/es/index.d.ts.map +1 -0
- package/es/index.mjs +107 -0
- package/es/interface/index.mjs +3 -0
- package/es/interface/util/index.mjs +3 -0
- package/es/interface/util/route/route.mjs +1 -0
- package/es/node_modules/.pnpm/path-browserify@1.0.1/node_modules/path-browserify/index.mjs +535 -0
- package/es/panel-component/grid-container/grid-container.controller.d.ts +15 -0
- package/es/panel-component/grid-container/grid-container.controller.d.ts.map +1 -0
- package/es/panel-component/grid-container/grid-container.controller.mjs +12 -0
- package/es/panel-component/grid-container/grid-container.css +1 -0
- package/es/panel-component/grid-container/grid-container.d.ts +38 -0
- package/es/panel-component/grid-container/grid-container.d.ts.map +1 -0
- package/es/panel-component/grid-container/grid-container.mjs +106 -0
- package/es/panel-component/grid-container/grid-container.provider.d.ts +16 -0
- package/es/panel-component/grid-container/grid-container.provider.d.ts.map +1 -0
- package/es/panel-component/grid-container/grid-container.provider.mjs +15 -0
- package/es/panel-component/grid-container/grid-container.state.d.ts +13 -0
- package/es/panel-component/grid-container/grid-container.state.d.ts.map +1 -0
- package/es/panel-component/grid-container/grid-container.state.mjs +7 -0
- package/es/panel-component/grid-container/index.d.ts +39 -0
- package/es/panel-component/grid-container/index.d.ts.map +1 -0
- package/es/panel-component/grid-container/index.mjs +18 -0
- package/es/panel-component/index.d.ts +10 -0
- package/es/panel-component/index.d.ts.map +1 -0
- package/es/panel-component/index.mjs +38 -0
- package/es/panel-component/multi-data-container/index.d.ts +38 -0
- package/es/panel-component/multi-data-container/index.d.ts.map +1 -0
- package/es/panel-component/multi-data-container/index.mjs +21 -0
- package/es/panel-component/multi-data-container/multi-data-container-item.controller.d.ts +61 -0
- package/es/panel-component/multi-data-container/multi-data-container-item.controller.d.ts.map +1 -0
- package/es/panel-component/multi-data-container/multi-data-container-item.controller.mjs +117 -0
- package/es/panel-component/multi-data-container/multi-data-container-itm.state.d.ts +20 -0
- package/es/panel-component/multi-data-container/multi-data-container-itm.state.d.ts.map +1 -0
- package/es/panel-component/multi-data-container/multi-data-container-itm.state.mjs +17 -0
- package/es/panel-component/multi-data-container/multi-data-container.controller.d.ts +107 -0
- package/es/panel-component/multi-data-container/multi-data-container.controller.d.ts.map +1 -0
- package/es/panel-component/multi-data-container/multi-data-container.controller.mjs +260 -0
- package/es/panel-component/multi-data-container/multi-data-container.css +1 -0
- package/es/panel-component/multi-data-container/multi-data-container.d.ts +36 -0
- package/es/panel-component/multi-data-container/multi-data-container.d.ts.map +1 -0
- package/es/panel-component/multi-data-container/multi-data-container.mjs +87 -0
- package/es/panel-component/multi-data-container/multi-data-container.provider.d.ts +16 -0
- package/es/panel-component/multi-data-container/multi-data-container.provider.d.ts.map +1 -0
- package/es/panel-component/multi-data-container/multi-data-container.provider.mjs +15 -0
- package/es/panel-component/multi-data-container/multi-data-container.state.d.ts +20 -0
- package/es/panel-component/multi-data-container/multi-data-container.state.d.ts.map +1 -0
- package/es/panel-component/multi-data-container/multi-data-container.state.mjs +17 -0
- package/es/panel-component/nav-pos/index.d.ts +29 -0
- package/es/panel-component/nav-pos/index.d.ts.map +1 -0
- package/es/panel-component/nav-pos/index.mjs +15 -0
- package/es/panel-component/nav-pos/nav-pos.controller.d.ts +162 -0
- package/es/panel-component/nav-pos/nav-pos.controller.d.ts.map +1 -0
- package/es/panel-component/nav-pos/nav-pos.controller.mjs +261 -0
- package/es/panel-component/nav-pos/nav-pos.css +1 -0
- package/es/panel-component/nav-pos/nav-pos.d.ts +29 -0
- package/es/panel-component/nav-pos/nav-pos.d.ts.map +1 -0
- package/es/panel-component/nav-pos/nav-pos.mjs +105 -0
- package/es/panel-component/nav-pos/nav-pos.provider.d.ts +23 -0
- package/es/panel-component/nav-pos/nav-pos.provider.d.ts.map +1 -0
- package/es/panel-component/nav-pos/nav-pos.provider.mjs +24 -0
- package/es/panel-component/nav-pos/nav-pos.state.d.ts +50 -0
- package/es/panel-component/nav-pos/nav-pos.state.d.ts.map +1 -0
- package/es/panel-component/nav-pos/nav-pos.state.mjs +47 -0
- package/es/panel-component/panel-container/index.d.ts +28 -0
- package/es/panel-component/panel-container/index.d.ts.map +1 -0
- package/es/panel-component/panel-container/index.mjs +22 -0
- package/es/panel-component/panel-container/panel-container.controller.d.ts +15 -0
- package/es/panel-component/panel-container/panel-container.controller.d.ts.map +1 -0
- package/es/panel-component/panel-container/panel-container.controller.mjs +12 -0
- package/es/panel-component/panel-container/panel-container.css +1 -0
- package/es/panel-component/panel-container/panel-container.d.ts +27 -0
- package/es/panel-component/panel-container/panel-container.d.ts.map +1 -0
- package/es/panel-component/panel-container/panel-container.mjs +70 -0
- package/es/panel-component/panel-container/panel-container.provider.d.ts +16 -0
- package/es/panel-component/panel-container/panel-container.provider.d.ts.map +1 -0
- package/es/panel-component/panel-container/panel-container.provider.mjs +15 -0
- package/es/panel-component/panel-container/panel-container.state.d.ts +13 -0
- package/es/panel-component/panel-container/panel-container.state.d.ts.map +1 -0
- package/es/panel-component/panel-container/panel-container.state.mjs +7 -0
- package/es/panel-component/panel-ctrl-pos/index.d.ts +26 -0
- package/es/panel-component/panel-ctrl-pos/index.d.ts.map +1 -0
- package/es/panel-component/panel-ctrl-pos/index.mjs +14 -0
- package/es/panel-component/panel-ctrl-pos/panel-ctrl-pos.controller.d.ts +36 -0
- package/es/panel-component/panel-ctrl-pos/panel-ctrl-pos.controller.d.ts.map +1 -0
- package/es/panel-component/panel-ctrl-pos/panel-ctrl-pos.controller.mjs +23 -0
- package/es/panel-component/panel-ctrl-pos/panel-ctrl-pos.css +1 -0
- package/es/panel-component/panel-ctrl-pos/panel-ctrl-pos.d.ts +25 -0
- package/es/panel-component/panel-ctrl-pos/panel-ctrl-pos.d.ts.map +1 -0
- package/es/panel-component/panel-ctrl-pos/panel-ctrl-pos.mjs +45 -0
- package/es/panel-component/panel-ctrl-pos/panel-ctrl-pos.provider.d.ts +17 -0
- package/es/panel-component/panel-ctrl-pos/panel-ctrl-pos.provider.d.ts.map +1 -0
- package/es/panel-component/panel-ctrl-pos/panel-ctrl-pos.provider.mjs +15 -0
- package/es/panel-component/panel-field/index.d.ts +27 -0
- package/es/panel-component/panel-field/index.d.ts.map +1 -0
- package/es/panel-component/panel-field/index.mjs +14 -0
- package/es/panel-component/panel-field/panel-field.controller.d.ts +75 -0
- package/es/panel-component/panel-field/panel-field.controller.d.ts.map +1 -0
- package/es/panel-component/panel-field/panel-field.controller.mjs +90 -0
- package/es/panel-component/panel-field/panel-field.css +1 -0
- package/es/panel-component/panel-field/panel-field.d.ts +28 -0
- package/es/panel-component/panel-field/panel-field.d.ts.map +1 -0
- package/es/panel-component/panel-field/panel-field.mjs +73 -0
- package/es/panel-component/panel-field/panel-field.provider.d.ts +15 -0
- package/es/panel-component/panel-field/panel-field.provider.d.ts.map +1 -0
- package/es/panel-component/panel-field/panel-field.provider.mjs +15 -0
- package/es/panel-component/panel-field/panel-field.state.d.ts +13 -0
- package/es/panel-component/panel-field/panel-field.state.d.ts.map +1 -0
- package/es/panel-component/panel-field/panel-field.state.mjs +7 -0
- package/es/panel-component/panel-rawitem/index.d.ts +26 -0
- package/es/panel-component/panel-rawitem/index.d.ts.map +1 -0
- package/es/panel-component/panel-rawitem/index.mjs +18 -0
- package/es/panel-component/panel-rawitem/panel-rawitem.controller.d.ts +29 -0
- package/es/panel-component/panel-rawitem/panel-rawitem.controller.d.ts.map +1 -0
- package/es/panel-component/panel-rawitem/panel-rawitem.controller.mjs +28 -0
- package/es/panel-component/panel-rawitem/panel-rawitem.css +1 -0
- package/es/panel-component/panel-rawitem/panel-rawitem.d.ts +27 -0
- package/es/panel-component/panel-rawitem/panel-rawitem.d.ts.map +1 -0
- package/es/panel-component/panel-rawitem/panel-rawitem.mjs +50 -0
- package/es/panel-component/panel-rawitem/panel-rawitem.provider.d.ts +15 -0
- package/es/panel-component/panel-rawitem/panel-rawitem.provider.d.ts.map +1 -0
- package/es/panel-component/panel-rawitem/panel-rawitem.provider.mjs +15 -0
- package/es/panel-component/scroll-container/index.d.ts +26 -0
- package/es/panel-component/scroll-container/index.d.ts.map +1 -0
- package/es/panel-component/scroll-container/index.mjs +46 -0
- package/es/panel-component/scroll-container/scroll-container/index.d.ts +4 -0
- package/es/panel-component/scroll-container/scroll-container/index.d.ts.map +1 -0
- package/es/panel-component/scroll-container/scroll-container/index.mjs +5 -0
- package/es/panel-component/scroll-container/scroll-container/scroll-container.controller.d.ts +23 -0
- package/es/panel-component/scroll-container/scroll-container/scroll-container.controller.d.ts.map +1 -0
- package/es/panel-component/scroll-container/scroll-container/scroll-container.controller.mjs +12 -0
- package/es/panel-component/scroll-container/scroll-container/scroll-container.css +1 -0
- package/es/panel-component/scroll-container/scroll-container/scroll-container.d.ts +27 -0
- package/es/panel-component/scroll-container/scroll-container/scroll-container.d.ts.map +1 -0
- package/es/panel-component/scroll-container/scroll-container/scroll-container.mjs +112 -0
- package/es/panel-component/scroll-container/scroll-container/scroll-container.provider.d.ts +17 -0
- package/es/panel-component/scroll-container/scroll-container/scroll-container.provider.d.ts.map +1 -0
- package/es/panel-component/scroll-container/scroll-container/scroll-container.provider.mjs +15 -0
- package/es/panel-component/scroll-container/scroll-container-item/index.d.ts +4 -0
- package/es/panel-component/scroll-container/scroll-container-item/index.d.ts.map +1 -0
- package/es/panel-component/scroll-container/scroll-container-item/index.mjs +5 -0
- package/es/panel-component/scroll-container/scroll-container-item/scroll-container-item.controller.d.ts +22 -0
- package/es/panel-component/scroll-container/scroll-container-item/scroll-container-item.controller.d.ts.map +1 -0
- package/es/panel-component/scroll-container/scroll-container-item/scroll-container-item.controller.mjs +7 -0
- package/es/panel-component/scroll-container/scroll-container-item/scroll-container-item.css +1 -0
- package/es/panel-component/scroll-container/scroll-container-item/scroll-container-item.d.ts +27 -0
- package/es/panel-component/scroll-container/scroll-container-item/scroll-container-item.d.ts.map +1 -0
- package/es/panel-component/scroll-container/scroll-container-item/scroll-container-item.mjs +64 -0
- package/es/panel-component/scroll-container/scroll-container-item/scroll-container-item.provider.d.ts +17 -0
- package/es/panel-component/scroll-container/scroll-container-item/scroll-container-item.provider.d.ts.map +1 -0
- package/es/panel-component/scroll-container/scroll-container-item/scroll-container-item.provider.mjs +15 -0
- package/es/panel-component/single-data-container/index.d.ts +38 -0
- package/es/panel-component/single-data-container/index.d.ts.map +1 -0
- package/es/panel-component/single-data-container/index.mjs +21 -0
- package/es/panel-component/single-data-container/single-data-container.controller.d.ts +122 -0
- package/es/panel-component/single-data-container/single-data-container.controller.d.ts.map +1 -0
- package/es/panel-component/single-data-container/single-data-container.controller.mjs +285 -0
- package/es/panel-component/single-data-container/single-data-container.css +1 -0
- package/es/panel-component/single-data-container/single-data-container.d.ts +36 -0
- package/es/panel-component/single-data-container/single-data-container.d.ts.map +1 -0
- package/es/panel-component/single-data-container/single-data-container.mjs +77 -0
- package/es/panel-component/single-data-container/single-data-container.provider.d.ts +16 -0
- package/es/panel-component/single-data-container/single-data-container.provider.d.ts.map +1 -0
- package/es/panel-component/single-data-container/single-data-container.provider.mjs +15 -0
- package/es/panel-component/single-data-container/single-data-container.state.d.ts +20 -0
- package/es/panel-component/single-data-container/single-data-container.state.d.ts.map +1 -0
- package/es/panel-component/single-data-container/single-data-container.state.mjs +17 -0
- package/es/plugin/index.mjs +3 -0
- package/es/plugin/plugin-factory/plugin-factory.mjs +292 -0
- package/es/props/common.mjs +15 -0
- package/es/props/editor/array.mjs +11 -0
- package/es/props/editor/autocomplete.mjs +11 -0
- package/es/props/editor/cascader.mjs +11 -0
- package/es/props/editor/check-box-list.mjs +11 -0
- package/es/props/editor/check-box.mjs +11 -0
- package/es/props/editor/code.mjs +20 -0
- package/es/props/editor/color-picker.mjs +11 -0
- package/es/props/editor/common.mjs +48 -0
- package/es/props/editor/data-picker.mjs +11 -0
- package/es/props/editor/date-picker.mjs +11 -0
- package/es/props/editor/date-range.mjs +11 -0
- package/es/props/editor/dropdown-list.mjs +11 -0
- package/es/props/editor/html.mjs +11 -0
- package/es/props/editor/index.mjs +27 -0
- package/es/props/editor/list-box.mjs +11 -0
- package/es/props/editor/markdown.mjs +19 -0
- package/es/props/editor/number-range.mjs +11 -0
- package/es/props/editor/radio-button-list.mjs +11 -0
- package/es/props/editor/rate.mjs +11 -0
- package/es/props/editor/raw.mjs +11 -0
- package/es/props/editor/slider.mjs +11 -0
- package/{out → es}/props/editor/span.d.ts +2 -2
- package/es/props/editor/span.mjs +11 -0
- package/es/props/editor/stepper.mjs +11 -0
- package/es/props/editor/switch.mjs +11 -0
- package/es/props/editor/text-box.mjs +23 -0
- package/es/props/editor/upload.mjs +11 -0
- package/es/props/index.mjs +29 -0
- package/es/use/click-outside/click-outside.mjs +48 -0
- package/es/use/control/index.mjs +3 -0
- package/es/use/control/use-control-controller/use-control-controller.mjs +74 -0
- package/es/use/event/event.mjs +37 -0
- package/es/use/focus-blur/focus-blur.mjs +46 -0
- package/es/use/index.mjs +13 -0
- package/es/use/namespace/namespace.mjs +8 -0
- package/es/use/route/route.mjs +28 -0
- package/es/use/util/index.mjs +11 -0
- package/{out/use/view/index.js → es/use/view/index.mjs} +3 -1
- package/es/use/view/use-view-controller/use-view-controller.mjs +72 -0
- package/es/use/vue/vue.mjs +55 -0
- package/es/util/control/prepare-control.mjs +22 -0
- package/es/util/index.d.ts +11 -0
- package/es/util/index.d.ts.map +1 -0
- package/es/util/index.mjs +14 -0
- package/es/util/install.mjs +9 -0
- package/es/util/overlay-container/overlay-container.d.ts +93 -0
- package/es/util/overlay-container/overlay-container.d.ts.map +1 -0
- package/es/util/overlay-container/overlay-container.mjs +114 -0
- package/es/util/overlay-popover-container/overlay-popover-container.d.ts +17 -0
- package/es/util/overlay-popover-container/overlay-popover-container.d.ts.map +1 -0
- package/es/util/overlay-popover-container/overlay-popover-container.mjs +10 -0
- package/es/util/overlay-view-util/overlay-view-util.d.ts +9 -0
- package/es/util/overlay-view-util/overlay-view-util.d.ts.map +1 -0
- package/es/util/overlay-view-util/overlay-view-util.mjs +63 -0
- package/es/util/render/render.mjs +20 -0
- package/es/util/route/route-listener.mjs +73 -0
- package/{out → es}/util/route/route.d.ts +20 -20
- package/es/util/route/route.d.ts.map +1 -0
- package/es/util/route/route.mjs +252 -0
- package/es/util/router-callback/router-callback-item.d.ts +62 -0
- package/es/util/router-callback/router-callback-item.d.ts.map +1 -0
- package/es/util/router-callback/router-callback-item.mjs +72 -0
- package/es/util/router-callback/router-callback.d.ts +60 -0
- package/es/util/router-callback/router-callback.d.ts.map +1 -0
- package/es/util/router-callback/router-callback.mjs +86 -0
- package/es/util/store/app-store/app-store.d.ts +10 -0
- package/es/util/store/app-store/app-store.d.ts.map +1 -0
- package/es/util/store/app-store/app-store.mjs +10 -0
- package/es/util/store/index.d.ts +4 -0
- package/es/util/store/index.d.ts.map +1 -0
- package/es/util/store/index.mjs +8 -0
- package/es/util/store/ui-store/ui-store.d.ts +32 -0
- package/es/util/store/ui-store/ui-store.d.ts.map +1 -0
- package/es/util/store/ui-store/ui-store.mjs +15 -0
- package/es/util/store/ui-store/z-index.d.ts +35 -0
- package/es/util/store/ui-store/z-index.d.ts.map +1 -0
- package/es/util/store/ui-store/z-index.mjs +18 -0
- package/es/view/app-redirect-view/app-redirect-view.d.ts +2 -0
- package/es/view/app-redirect-view/app-redirect-view.d.ts.map +1 -0
- package/es/view/app-redirect-view/app-redirect-view.mjs +27 -0
- package/es/view/common/index.d.ts +51 -0
- package/es/view/common/index.d.ts.map +1 -0
- package/es/view/common/index.mjs +13 -0
- package/es/view/common/view.css +1 -0
- package/es/view/common/view.d.ts +53 -0
- package/es/view/common/view.d.ts.map +1 -0
- package/es/view/common/view.mjs +143 -0
- package/es/view/common/view.provider.d.ts +14 -0
- package/es/view/common/view.provider.d.ts.map +1 -0
- package/es/view/common/view.provider.mjs +8 -0
- package/es/view/index.d.ts +5 -0
- package/es/view/index.d.ts.map +1 -0
- package/es/view/index.mjs +8 -0
- package/es/view/portal-view/index.d.ts +43 -0
- package/es/view/portal-view/index.d.ts.map +1 -0
- package/es/view/portal-view/index.mjs +21 -0
- package/es/view/portal-view/portal-view.d.ts +44 -0
- package/es/view/portal-view/portal-view.d.ts.map +1 -0
- package/es/view/portal-view/portal-view.mjs +93 -0
- package/es/view/portal-view/portal-view.provider.d.ts +14 -0
- package/es/view/portal-view/portal-view.provider.d.ts.map +1 -0
- package/es/view/portal-view/portal-view.provider.mjs +8 -0
- package/es/view/todo-redirect/todo-redirect.d.ts +2 -0
- package/es/view/todo-redirect/todo-redirect.d.ts.map +1 -0
- package/es/view/todo-redirect/todo-redirect.mjs +52 -0
- package/lib/index.cjs +260 -0
- package/package.json +19 -14
- package/src/common/code-list/code-list.scss +5 -0
- package/src/common/code-list/code-list.tsx +108 -0
- package/src/common/control-base/control-base.scss +4 -0
- package/src/common/control-base/control-base.tsx +129 -0
- package/src/common/control-loading-placeholder/control-loading-placeholder.tsx +22 -0
- package/src/common/control-shell/control-shell.scss +5 -0
- package/src/common/control-shell/control-shell.tsx +70 -0
- package/src/common/icon/icon.tsx +69 -0
- package/src/common/index.ts +8 -0
- package/src/common/router-view/router-view.tsx +74 -0
- package/src/common/view-shell/view-shell.scss +5 -0
- package/src/common/view-shell/view-shell.tsx +70 -0
- package/src/index.ts +3 -0
- package/src/panel-component/grid-container/grid-container.controller.ts +18 -0
- package/src/panel-component/grid-container/grid-container.provider.ts +30 -0
- package/src/panel-component/grid-container/grid-container.scss +17 -0
- package/src/panel-component/grid-container/grid-container.state.ts +12 -0
- package/src/panel-component/grid-container/grid-container.tsx +119 -0
- package/src/panel-component/grid-container/index.ts +19 -0
- package/src/panel-component/index.ts +9 -0
- package/src/panel-component/multi-data-container/index.ts +26 -0
- package/src/panel-component/multi-data-container/multi-data-container-item.controller.ts +166 -0
- package/src/panel-component/multi-data-container/multi-data-container-itm.state.ts +20 -0
- package/src/panel-component/multi-data-container/multi-data-container.controller.ts +308 -0
- package/src/panel-component/multi-data-container/multi-data-container.provider.ts +30 -0
- package/src/panel-component/multi-data-container/multi-data-container.scss +10 -0
- package/src/panel-component/multi-data-container/multi-data-container.state.ts +20 -0
- package/src/panel-component/multi-data-container/multi-data-container.tsx +109 -0
- package/src/panel-component/nav-pos/index.ts +16 -0
- package/src/panel-component/nav-pos/nav-pos.controller.ts +351 -0
- package/src/panel-component/nav-pos/nav-pos.provider.ts +38 -0
- package/src/panel-component/nav-pos/nav-pos.scss +4 -0
- package/src/panel-component/nav-pos/nav-pos.state.ts +52 -0
- package/src/panel-component/nav-pos/nav-pos.tsx +121 -0
- package/src/panel-component/panel-container/index.ts +31 -0
- package/src/panel-component/panel-container/panel-container.controller.ts +18 -0
- package/src/panel-component/panel-container/panel-container.provider.ts +30 -0
- package/src/panel-component/panel-container/panel-container.scss +15 -0
- package/src/panel-component/panel-container/panel-container.state.ts +12 -0
- package/src/panel-component/panel-container/panel-container.tsx +72 -0
- package/src/panel-component/panel-ctrl-pos/index.ts +14 -0
- package/src/panel-component/panel-ctrl-pos/panel-ctrl-pos.controller.ts +53 -0
- package/src/panel-component/panel-ctrl-pos/panel-ctrl-pos.provider.ts +30 -0
- package/src/panel-component/panel-ctrl-pos/panel-ctrl-pos.scss +8 -0
- package/src/panel-component/panel-ctrl-pos/panel-ctrl-pos.tsx +53 -0
- package/src/panel-component/panel-field/index.ts +15 -0
- package/src/panel-component/panel-field/panel-field.controller.ts +130 -0
- package/src/panel-component/panel-field/panel-field.provider.ts +28 -0
- package/src/panel-component/panel-field/panel-field.scss +36 -0
- package/src/panel-component/panel-field/panel-field.state.ts +12 -0
- package/src/panel-component/panel-field/panel-field.tsx +78 -0
- package/src/panel-component/panel-rawitem/index.ts +19 -0
- package/src/panel-component/panel-rawitem/panel-rawitem.controller.ts +34 -0
- package/src/panel-component/panel-rawitem/panel-rawitem.provider.ts +28 -0
- package/src/panel-component/panel-rawitem/panel-rawitem.scss +8 -0
- package/src/panel-component/panel-rawitem/panel-rawitem.tsx +51 -0
- package/src/panel-component/scroll-container/index.ts +44 -0
- package/src/panel-component/scroll-container/scroll-container/index.ts +3 -0
- package/src/panel-component/scroll-container/scroll-container/scroll-container.controller.ts +32 -0
- package/src/panel-component/scroll-container/scroll-container/scroll-container.provider.ts +30 -0
- package/src/panel-component/scroll-container/scroll-container/scroll-container.scss +34 -0
- package/src/panel-component/scroll-container/scroll-container/scroll-container.tsx +110 -0
- package/src/panel-component/scroll-container/scroll-container-item/index.ts +3 -0
- package/src/panel-component/scroll-container/scroll-container-item/scroll-container-item.controller.ts +25 -0
- package/src/panel-component/scroll-container/scroll-container-item/scroll-container-item.provider.ts +30 -0
- package/src/panel-component/scroll-container/scroll-container-item/scroll-container-item.scss +9 -0
- package/src/panel-component/scroll-container/scroll-container-item/scroll-container-item.tsx +60 -0
- package/src/panel-component/single-data-container/index.ts +26 -0
- package/src/panel-component/single-data-container/single-data-container.controller.ts +345 -0
- package/src/panel-component/single-data-container/single-data-container.provider.ts +30 -0
- package/src/panel-component/single-data-container/single-data-container.scss +10 -0
- package/src/panel-component/single-data-container/single-data-container.state.ts +20 -0
- package/src/panel-component/single-data-container/single-data-container.tsx +95 -0
- package/src/props/editor/span.ts +1 -1
- package/src/util/index.ts +5 -0
- package/src/util/overlay-container/overlay-container.ts +155 -0
- package/src/util/overlay-popover-container/overlay-popover-container.ts +30 -0
- package/src/util/overlay-view-util/overlay-view-util.ts +89 -0
- package/src/util/route/route.ts +140 -140
- package/src/util/router-callback/router-callback-item.ts +98 -0
- package/src/util/router-callback/router-callback.ts +97 -0
- package/src/util/store/app-store/app-store.ts +10 -0
- package/src/util/store/index.ts +6 -0
- package/src/util/store/ui-store/ui-store.ts +27 -0
- package/src/util/store/ui-store/z-index.ts +53 -0
- package/src/view/app-redirect-view/app-redirect-view.tsx +26 -0
- package/src/view/common/index.ts +12 -0
- package/src/view/common/view.provider.ts +14 -0
- package/src/view/common/view.scss +38 -0
- package/src/view/common/view.tsx +180 -0
- package/src/view/index.ts +4 -0
- package/src/view/portal-view/index.ts +20 -0
- package/src/view/portal-view/portal-view.provider.ts +14 -0
- package/src/view/portal-view/portal-view.tsx +79 -0
- package/src/view/todo-redirect/todo-redirect.tsx +51 -0
- package/dist/index.esm.js +0 -1859
- package/out/index.d.ts.map +0 -1
- package/out/index.js +0 -5
- package/out/interface/index.js +0 -1
- package/out/interface/util/index.js +0 -1
- package/out/interface/util/route/route.js +0 -1
- package/out/plugin/index.js +0 -1
- package/out/plugin/plugin-factory/plugin-factory.js +0 -297
- package/out/props/common.js +0 -23
- package/out/props/editor/array.js +0 -25
- package/out/props/editor/autocomplete.js +0 -25
- package/out/props/editor/cascader.js +0 -25
- package/out/props/editor/check-box-list.js +0 -25
- package/out/props/editor/check-box.js +0 -25
- package/out/props/editor/code.js +0 -29
- package/out/props/editor/color-picker.js +0 -25
- package/out/props/editor/common.js +0 -79
- package/out/props/editor/data-picker.js +0 -25
- package/out/props/editor/date-picker.js +0 -25
- package/out/props/editor/date-range.js +0 -21
- package/out/props/editor/dropdown-list.js +0 -25
- package/out/props/editor/html.js +0 -25
- package/out/props/editor/index.js +0 -25
- package/out/props/editor/list-box.js +0 -25
- package/out/props/editor/markdown.js +0 -28
- package/out/props/editor/number-range.js +0 -21
- package/out/props/editor/radio-button-list.js +0 -25
- package/out/props/editor/rate.js +0 -21
- package/out/props/editor/raw.js +0 -21
- package/out/props/editor/slider.js +0 -21
- package/out/props/editor/span.js +0 -25
- package/out/props/editor/stepper.js +0 -21
- package/out/props/editor/switch.js +0 -21
- package/out/props/editor/text-box.js +0 -73
- package/out/props/editor/upload.js +0 -25
- package/out/props/index.js +0 -2
- package/out/use/click-outside/click-outside.js +0 -50
- package/out/use/control/index.js +0 -1
- package/out/use/control/use-control-controller/use-control-controller.js +0 -94
- package/out/use/event/event.js +0 -39
- package/out/use/focus-blur/focus-blur.js +0 -63
- package/out/use/index.js +0 -9
- package/out/use/namespace/namespace.js +0 -13
- package/out/use/route/route.js +0 -41
- package/out/use/util/index.js +0 -23
- package/out/use/view/use-view-controller/use-view-controller.js +0 -94
- package/out/use/vue/vue.js +0 -112
- package/out/util/control/prepare-control.js +0 -25
- package/out/util/index.d.ts +0 -6
- package/out/util/index.d.ts.map +0 -1
- package/out/util/index.js +0 -5
- package/out/util/install.js +0 -6
- package/out/util/render/render.js +0 -28
- package/out/util/route/route-listener.js +0 -76
- package/out/util/route/route.d.ts.map +0 -1
- package/out/util/route/route.js +0 -385
- /package/{out → es}/interface/index.d.ts +0 -0
- /package/{out → es}/interface/index.d.ts.map +0 -0
- /package/{out → es}/interface/util/index.d.ts +0 -0
- /package/{out → es}/interface/util/index.d.ts.map +0 -0
- /package/{out → es}/interface/util/route/route.d.ts +0 -0
- /package/{out → es}/interface/util/route/route.d.ts.map +0 -0
- /package/{out → es}/plugin/index.d.ts +0 -0
- /package/{out → es}/plugin/index.d.ts.map +0 -0
- /package/{out → es}/plugin/plugin-factory/plugin-factory.d.ts +0 -0
- /package/{out → es}/plugin/plugin-factory/plugin-factory.d.ts.map +0 -0
- /package/{out → es}/props/common.d.ts +0 -0
- /package/{out → es}/props/common.d.ts.map +0 -0
- /package/{out → es}/props/editor/array.d.ts +0 -0
- /package/{out → es}/props/editor/array.d.ts.map +0 -0
- /package/{out → es}/props/editor/autocomplete.d.ts +0 -0
- /package/{out → es}/props/editor/autocomplete.d.ts.map +0 -0
- /package/{out → es}/props/editor/cascader.d.ts +0 -0
- /package/{out → es}/props/editor/cascader.d.ts.map +0 -0
- /package/{out → es}/props/editor/check-box-list.d.ts +0 -0
- /package/{out → es}/props/editor/check-box-list.d.ts.map +0 -0
- /package/{out → es}/props/editor/check-box.d.ts +0 -0
- /package/{out → es}/props/editor/check-box.d.ts.map +0 -0
- /package/{out → es}/props/editor/code.d.ts +0 -0
- /package/{out → es}/props/editor/code.d.ts.map +0 -0
- /package/{out → es}/props/editor/color-picker.d.ts +0 -0
- /package/{out → es}/props/editor/color-picker.d.ts.map +0 -0
- /package/{out → es}/props/editor/common.d.ts +0 -0
- /package/{out → es}/props/editor/common.d.ts.map +0 -0
- /package/{out → es}/props/editor/data-picker.d.ts +0 -0
- /package/{out → es}/props/editor/data-picker.d.ts.map +0 -0
- /package/{out → es}/props/editor/date-picker.d.ts +0 -0
- /package/{out → es}/props/editor/date-picker.d.ts.map +0 -0
- /package/{out → es}/props/editor/date-range.d.ts +0 -0
- /package/{out → es}/props/editor/date-range.d.ts.map +0 -0
- /package/{out → es}/props/editor/dropdown-list.d.ts +0 -0
- /package/{out → es}/props/editor/dropdown-list.d.ts.map +0 -0
- /package/{out → es}/props/editor/html.d.ts +0 -0
- /package/{out → es}/props/editor/html.d.ts.map +0 -0
- /package/{out → es}/props/editor/index.d.ts +0 -0
- /package/{out → es}/props/editor/index.d.ts.map +0 -0
- /package/{out → es}/props/editor/list-box.d.ts +0 -0
- /package/{out → es}/props/editor/list-box.d.ts.map +0 -0
- /package/{out → es}/props/editor/markdown.d.ts +0 -0
- /package/{out → es}/props/editor/markdown.d.ts.map +0 -0
- /package/{out → es}/props/editor/number-range.d.ts +0 -0
- /package/{out → es}/props/editor/number-range.d.ts.map +0 -0
- /package/{out → es}/props/editor/radio-button-list.d.ts +0 -0
- /package/{out → es}/props/editor/radio-button-list.d.ts.map +0 -0
- /package/{out → es}/props/editor/rate.d.ts +0 -0
- /package/{out → es}/props/editor/rate.d.ts.map +0 -0
- /package/{out → es}/props/editor/raw.d.ts +0 -0
- /package/{out → es}/props/editor/raw.d.ts.map +0 -0
- /package/{out → es}/props/editor/slider.d.ts +0 -0
- /package/{out → es}/props/editor/slider.d.ts.map +0 -0
- /package/{out → es}/props/editor/span.d.ts.map +0 -0
- /package/{out → es}/props/editor/stepper.d.ts +0 -0
- /package/{out → es}/props/editor/stepper.d.ts.map +0 -0
- /package/{out → es}/props/editor/switch.d.ts +0 -0
- /package/{out → es}/props/editor/switch.d.ts.map +0 -0
- /package/{out → es}/props/editor/text-box.d.ts +0 -0
- /package/{out → es}/props/editor/text-box.d.ts.map +0 -0
- /package/{out → es}/props/editor/upload.d.ts +0 -0
- /package/{out → es}/props/editor/upload.d.ts.map +0 -0
- /package/{out → es}/props/index.d.ts +0 -0
- /package/{out → es}/props/index.d.ts.map +0 -0
- /package/{out → es}/use/click-outside/click-outside.d.ts +0 -0
- /package/{out → es}/use/click-outside/click-outside.d.ts.map +0 -0
- /package/{out → es}/use/control/index.d.ts +0 -0
- /package/{out → es}/use/control/index.d.ts.map +0 -0
- /package/{out → es}/use/control/use-control-controller/use-control-controller.d.ts +0 -0
- /package/{out → es}/use/control/use-control-controller/use-control-controller.d.ts.map +0 -0
- /package/{out → es}/use/event/event.d.ts +0 -0
- /package/{out → es}/use/event/event.d.ts.map +0 -0
- /package/{out → es}/use/focus-blur/focus-blur.d.ts +0 -0
- /package/{out → es}/use/focus-blur/focus-blur.d.ts.map +0 -0
- /package/{out → es}/use/index.d.ts +0 -0
- /package/{out → es}/use/index.d.ts.map +0 -0
- /package/{out → es}/use/namespace/namespace.d.ts +0 -0
- /package/{out → es}/use/namespace/namespace.d.ts.map +0 -0
- /package/{out → es}/use/route/route.d.ts +0 -0
- /package/{out → es}/use/route/route.d.ts.map +0 -0
- /package/{out → es}/use/util/index.d.ts +0 -0
- /package/{out → es}/use/util/index.d.ts.map +0 -0
- /package/{out → es}/use/view/index.d.ts +0 -0
- /package/{out → es}/use/view/index.d.ts.map +0 -0
- /package/{out → es}/use/view/use-view-controller/use-view-controller.d.ts +0 -0
- /package/{out → es}/use/view/use-view-controller/use-view-controller.d.ts.map +0 -0
- /package/{out → es}/use/vue/vue.d.ts +0 -0
- /package/{out → es}/use/vue/vue.d.ts.map +0 -0
- /package/{out → es}/util/control/prepare-control.d.ts +0 -0
- /package/{out → es}/util/control/prepare-control.d.ts.map +0 -0
- /package/{out → es}/util/install.d.ts +0 -0
- /package/{out → es}/util/install.d.ts.map +0 -0
- /package/{out → es}/util/render/render.d.ts +0 -0
- /package/{out → es}/util/render/render.d.ts.map +0 -0
- /package/{out → es}/util/route/route-listener.d.ts +0 -0
- /package/{out → es}/util/route/route-listener.d.ts.map +0 -0
package/out/util/route/route.js
DELETED
|
@@ -1,385 +0,0 @@
|
|
|
1
|
-
import { notNilEmpty } from 'qx-util';
|
|
2
|
-
import { RuntimeError } from '@ibiz-template/core';
|
|
3
|
-
import qs from 'qs';
|
|
4
|
-
import { useRoute } from 'vue-router';
|
|
5
|
-
import { watch } from 'vue';
|
|
6
|
-
import { calcDeCodeNameById, getMatchResPath, ViewType, } from '@ibiz-template/runtime';
|
|
7
|
-
/**
|
|
8
|
-
* 获取自身的路由上下文,排除了部分不需要路由携带的参数
|
|
9
|
-
*
|
|
10
|
-
* @author lxm
|
|
11
|
-
* @date 2023-03-14 02:07:41
|
|
12
|
-
* @export
|
|
13
|
-
* @param {IContext} context
|
|
14
|
-
* @returns {*} {IParams}
|
|
15
|
-
*/
|
|
16
|
-
export function getOwnRouteContext(context) {
|
|
17
|
-
const ownContext = context.getOwnContext();
|
|
18
|
-
const excludeKeys = ['srfsessionid', 'srfappid'];
|
|
19
|
-
Object.keys(ownContext).forEach(key => {
|
|
20
|
-
if (excludeKeys.includes(key)) {
|
|
21
|
-
delete ownContext[key];
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
return ownContext;
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* 计算资源上下文时,需要排除自身实体codeName的视图(导航类视图和多数据视图)
|
|
28
|
-
* @return {*}
|
|
29
|
-
* @author: zhujiamin
|
|
30
|
-
* @Date: 2023-02-20 15:45:46
|
|
31
|
-
*/
|
|
32
|
-
export const excludeViewTypes = [
|
|
33
|
-
ViewType.DE_GRID_VIEW,
|
|
34
|
-
ViewType.DE_GRID_EXP_VIEW,
|
|
35
|
-
ViewType.DE_LIST_VIEW,
|
|
36
|
-
ViewType.DE_LIST_EXP_VIEW,
|
|
37
|
-
ViewType.DE_DATA_VIEW,
|
|
38
|
-
ViewType.DE_DATAVIEW_EXP_VIEW,
|
|
39
|
-
ViewType.DE_CALENDAR_VIEW,
|
|
40
|
-
ViewType.DE_CALENDAR_EXP_VIEW,
|
|
41
|
-
ViewType.DE_CHART_VIEW,
|
|
42
|
-
ViewType.DE_CHART_EXP_VIEW,
|
|
43
|
-
ViewType.DE_KANBAN_VIEW,
|
|
44
|
-
];
|
|
45
|
-
/**
|
|
46
|
-
* 计算资源路径,把首页后面的资源路径上下文算出来,并把第二层中对应的上下文删掉。
|
|
47
|
-
* @author lxm
|
|
48
|
-
* @date 2023-07-13 06:37:10
|
|
49
|
-
* @export
|
|
50
|
-
* @param {IRoutePath} routePath
|
|
51
|
-
* @param {IContext} context
|
|
52
|
-
* @param {string} appDataEntityId
|
|
53
|
-
* @return {*} {Promise<void>}
|
|
54
|
-
*/
|
|
55
|
-
export async function calcResRoutePath(routePath, context, appDataEntityId) {
|
|
56
|
-
if (!appDataEntityId) {
|
|
57
|
-
// 无实体的视图清空资源上下文
|
|
58
|
-
routePath.pathNodes[0].context = undefined;
|
|
59
|
-
}
|
|
60
|
-
else {
|
|
61
|
-
const entity = await ibiz.hub.getAppDataEntity(appDataEntityId);
|
|
62
|
-
let match = getMatchResPath(context, entity);
|
|
63
|
-
// 有实体有没有匹配到的,补一个包含自身实体主键的match
|
|
64
|
-
if (!match) {
|
|
65
|
-
match = { path: '', keys: [entity.codeName.toLowerCase()] };
|
|
66
|
-
}
|
|
67
|
-
if (match) {
|
|
68
|
-
const currentContext = routePath.pathNodes[1].context;
|
|
69
|
-
const resContext = {};
|
|
70
|
-
// 资源路径不为空,二级视图的上下文删掉多余的资源上下文
|
|
71
|
-
match.keys.forEach(key => {
|
|
72
|
-
if (context && Object.prototype.hasOwnProperty.call(context, key)) {
|
|
73
|
-
resContext[key] = context[key];
|
|
74
|
-
if (currentContext) {
|
|
75
|
-
delete currentContext[key];
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
});
|
|
79
|
-
// 把资源路径填充到一级路由上
|
|
80
|
-
routePath.pathNodes[0].context = resContext;
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
/**
|
|
85
|
-
* 生成route路径
|
|
86
|
-
*
|
|
87
|
-
* @author lxm
|
|
88
|
-
* @date 2022-08-17 21:08:00
|
|
89
|
-
* @export
|
|
90
|
-
* @param {IAppView} appView 视图模型
|
|
91
|
-
* @param {Route} route 路由对象
|
|
92
|
-
* @param {(IContext | undefined)} [context] 上下文对象
|
|
93
|
-
* @param {(IParams | undefined)} [_params] 视图参数
|
|
94
|
-
* @returns {*} {string}
|
|
95
|
-
*/
|
|
96
|
-
export async function generateRoutePath(appView, route, context, params) {
|
|
97
|
-
const routePath = route2routePath(route);
|
|
98
|
-
// 如果上下文存在toRouteDepth时,使用上下文的层级,否则使用默认层级
|
|
99
|
-
let depth = 2; // 默认都是从二级开始计算
|
|
100
|
-
if (context.toRouteDepth) {
|
|
101
|
-
depth = context.toRouteDepth;
|
|
102
|
-
// 使用完后删除,避免添加到上下文里
|
|
103
|
-
delete context.toRouteDepth;
|
|
104
|
-
}
|
|
105
|
-
else if (ibiz.env.isMob) {
|
|
106
|
-
// 移动端默认补充home层级
|
|
107
|
-
routePath.pathNodes[0] = {
|
|
108
|
-
viewName: 'home',
|
|
109
|
-
};
|
|
110
|
-
}
|
|
111
|
-
// 删除目标层级和之后的路由,保留之前层级的路由
|
|
112
|
-
routePath.pathNodes.splice(depth - 1, routePath.pathNodes.length - depth + 1);
|
|
113
|
-
// 导航视图的导航参数,加在目标层级之前的一个层级的视图参数里
|
|
114
|
-
if (context.currentSrfNav) {
|
|
115
|
-
const currentNode = routePath.pathNodes[routePath.pathNodes.length - 1];
|
|
116
|
-
currentNode.params = currentNode.params || {};
|
|
117
|
-
currentNode.srfnav = context.currentSrfNav;
|
|
118
|
-
// 使用完后删除,避免添加到上下文里
|
|
119
|
-
delete context.currentSrfNav;
|
|
120
|
-
}
|
|
121
|
-
// 重定向视图跳转的一级首页路由
|
|
122
|
-
if (route.fullPath.startsWith('/appredirectview')) {
|
|
123
|
-
if (params === null || params === void 0 ? void 0 : params.srfindexname) {
|
|
124
|
-
routePath.pathNodes[0].viewName = params.srfindexname;
|
|
125
|
-
delete params.srfindexname;
|
|
126
|
-
}
|
|
127
|
-
else {
|
|
128
|
-
routePath.pathNodes[0].viewName = 'index';
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
// 计算目标视图path路径
|
|
132
|
-
routePath.pathNodes.push({
|
|
133
|
-
viewName: appView.codeName.toLowerCase(),
|
|
134
|
-
context: getOwnRouteContext(context),
|
|
135
|
-
params,
|
|
136
|
-
});
|
|
137
|
-
// 计算二级视图的资源路径加到index后面
|
|
138
|
-
if (depth === 2) {
|
|
139
|
-
await calcResRoutePath(routePath, context, appView.appDataEntityId);
|
|
140
|
-
// 多数据和导航视图,删除自身的主键上下文
|
|
141
|
-
if (excludeViewTypes.includes(appView.viewType)) {
|
|
142
|
-
const deName = calcDeCodeNameById(appView.appDataEntityId);
|
|
143
|
-
delete routePath.pathNodes[0].context[deName];
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
return { path: routePath2string(routePath) };
|
|
147
|
-
}
|
|
148
|
-
/**
|
|
149
|
-
* 解析路由获取对应视图数据
|
|
150
|
-
*
|
|
151
|
-
* @author lxm
|
|
152
|
-
* @date 2022-08-17 22:08:51
|
|
153
|
-
* @export
|
|
154
|
-
* @param {IApplication} appModel 视图模型
|
|
155
|
-
* @param {Route} route 路由对象
|
|
156
|
-
* @param {number} depth 层级
|
|
157
|
-
* @returns {*} {IRouteViewData}
|
|
158
|
-
*/
|
|
159
|
-
export async function parseRouteViewData(route, depth) {
|
|
160
|
-
var _a;
|
|
161
|
-
// 解析路由的视图参数
|
|
162
|
-
const routePath = route2routePath(route);
|
|
163
|
-
// 获取对应层级的视图名称参数
|
|
164
|
-
let viewCodeName = routePath.pathNodes[depth - 1].viewName;
|
|
165
|
-
if (!viewCodeName) {
|
|
166
|
-
throw new RuntimeError(`第${depth}级路由不存在视图标识`);
|
|
167
|
-
}
|
|
168
|
-
if (viewCodeName === 'index') {
|
|
169
|
-
viewCodeName = ibiz.hub.defaultAppIndexViewName;
|
|
170
|
-
}
|
|
171
|
-
// 根据路由视图名称参数查询视图模型
|
|
172
|
-
const viewModel = await ibiz.hub.getAppView(viewCodeName);
|
|
173
|
-
// 找不到视图模型的返回空对象
|
|
174
|
-
if (!viewModel) {
|
|
175
|
-
throw new RuntimeError(`找不到视图${viewCodeName}`);
|
|
176
|
-
}
|
|
177
|
-
// !解析上下文参数,整合当前层级之前所有的上下文参数
|
|
178
|
-
const context = {};
|
|
179
|
-
// 合并appData里的应用上下文
|
|
180
|
-
if ((_a = ibiz.appData) === null || _a === void 0 ? void 0 : _a.context) {
|
|
181
|
-
Object.assign(context, ibiz.appData.context);
|
|
182
|
-
}
|
|
183
|
-
// 合并路由上下文
|
|
184
|
-
// 合并路由应用上下文
|
|
185
|
-
if (routePath.appContext) {
|
|
186
|
-
Object.assign(context, routePath.appContext);
|
|
187
|
-
}
|
|
188
|
-
// 逐层合并视图上下文,第一层首页不合,它的上下文是资源路径属于子视图。
|
|
189
|
-
if (depth !== 1) {
|
|
190
|
-
for (let index = 0; index < depth; index++) {
|
|
191
|
-
const pathNode = routePath.pathNodes[index];
|
|
192
|
-
if (notNilEmpty(pathNode.context)) {
|
|
193
|
-
Object.assign(context, pathNode.context);
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
// 最后一级路由对应的视图才会解析视图参数
|
|
198
|
-
const { params, srfnav } = routePath.pathNodes[depth - 1];
|
|
199
|
-
return {
|
|
200
|
-
viewModel,
|
|
201
|
-
context,
|
|
202
|
-
params,
|
|
203
|
-
srfnav,
|
|
204
|
-
};
|
|
205
|
-
}
|
|
206
|
-
/**
|
|
207
|
-
* 路径字符串转换成路由路径对象
|
|
208
|
-
*
|
|
209
|
-
* @author lxm
|
|
210
|
-
* @date 2022-08-18 11:08:08
|
|
211
|
-
* @export
|
|
212
|
-
* @param {string} pathStr 以/开头的路径,即router的path
|
|
213
|
-
* @returns {*} {IRoutePath}
|
|
214
|
-
*/
|
|
215
|
-
export function route2routePath(route) {
|
|
216
|
-
// 一共匹配了几级路由
|
|
217
|
-
const depth = route.matched.length;
|
|
218
|
-
// 解析路径节点
|
|
219
|
-
const pathNodes = [];
|
|
220
|
-
for (let index = 1; index <= depth; index++) {
|
|
221
|
-
const viewName = route.path.split('/')[index * 2];
|
|
222
|
-
const paramsStr = route.params[`params${index}`];
|
|
223
|
-
/** 路由参数,默认是视图参数 */
|
|
224
|
-
let params;
|
|
225
|
-
/** 上下文参数 */
|
|
226
|
-
let context;
|
|
227
|
-
let srfnav;
|
|
228
|
-
// params为占位符时置空
|
|
229
|
-
if (!paramsStr || paramsStr === ibiz.env.routePlaceholder) {
|
|
230
|
-
params = undefined;
|
|
231
|
-
}
|
|
232
|
-
else {
|
|
233
|
-
// 首页上下文要解析
|
|
234
|
-
params = qs.parse(paramsStr, {
|
|
235
|
-
strictNullHandling: true,
|
|
236
|
-
delimiter: ';',
|
|
237
|
-
});
|
|
238
|
-
}
|
|
239
|
-
// 路由参数存在的时候,解析里面的上下文。
|
|
240
|
-
if (params) {
|
|
241
|
-
if (index === 1) {
|
|
242
|
-
// 首页的时候,路由上的参数是资源路径,属于上下文
|
|
243
|
-
context = params;
|
|
244
|
-
params = undefined;
|
|
245
|
-
}
|
|
246
|
-
else {
|
|
247
|
-
if (params.srfnavctx) {
|
|
248
|
-
// 解析额外上下文
|
|
249
|
-
context = JSON.parse(decodeURIComponent(params.srfnavctx));
|
|
250
|
-
delete params.srfnavctx;
|
|
251
|
-
}
|
|
252
|
-
if (params.srfnav) {
|
|
253
|
-
// 解析额外自身视图导航参数
|
|
254
|
-
srfnav = params.srfnav;
|
|
255
|
-
delete params.srfnav;
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
|
-
pathNodes.push({ viewName, context, params, srfnav });
|
|
260
|
-
}
|
|
261
|
-
// 解析应用上下文
|
|
262
|
-
let appContext;
|
|
263
|
-
if (route.params.appContext &&
|
|
264
|
-
route.params.appContext !== ibiz.env.routePlaceholder) {
|
|
265
|
-
appContext = qs.parse(route.params.appContext, {
|
|
266
|
-
strictNullHandling: true,
|
|
267
|
-
delimiter: ';',
|
|
268
|
-
});
|
|
269
|
-
}
|
|
270
|
-
return { appContext, pathNodes };
|
|
271
|
-
}
|
|
272
|
-
/**
|
|
273
|
-
* 路由路径对象转路径字符串
|
|
274
|
-
*
|
|
275
|
-
* @author lxm
|
|
276
|
-
* @date 2022-08-18 13:08:57
|
|
277
|
-
* @export
|
|
278
|
-
* @param {IRoutePath} routePath 路由路径对象
|
|
279
|
-
* @returns {*} {string}
|
|
280
|
-
*/
|
|
281
|
-
export function routePath2string(routePath) {
|
|
282
|
-
let pathStr = '';
|
|
283
|
-
// 应用上下文
|
|
284
|
-
if (routePath.appContext) {
|
|
285
|
-
pathStr += `/${qs.stringify(routePath.appContext, {
|
|
286
|
-
delimiter: ';',
|
|
287
|
-
strictNullHandling: true,
|
|
288
|
-
})}`;
|
|
289
|
-
}
|
|
290
|
-
else {
|
|
291
|
-
pathStr += `/${ibiz.env.routePlaceholder}`;
|
|
292
|
-
}
|
|
293
|
-
// 每一层级的视图路由的拼装
|
|
294
|
-
routePath.pathNodes.forEach((pathNode, index) => {
|
|
295
|
-
pathStr += `/${pathNode.viewName}/`;
|
|
296
|
-
let routeParams = {};
|
|
297
|
-
// 首页路由
|
|
298
|
-
if (index === 0) {
|
|
299
|
-
if (notNilEmpty(pathNode.context)) {
|
|
300
|
-
// 对象转成a=11;b=222的格式,字符串直接附加在后面
|
|
301
|
-
routeParams = pathNode.context;
|
|
302
|
-
}
|
|
303
|
-
}
|
|
304
|
-
else {
|
|
305
|
-
// 非首页路由,视图参数直接放到路由参数上,上下文转换后放到路由参数的srfnavctx上
|
|
306
|
-
routeParams = notNilEmpty(pathNode.params) ? pathNode.params : {};
|
|
307
|
-
// 合并视图上下文
|
|
308
|
-
if (notNilEmpty(pathNode.context)) {
|
|
309
|
-
const objStr = JSON.stringify(pathNode.context);
|
|
310
|
-
// undefined 的vlaue会被JSON.stringify删除,可能会转成{}
|
|
311
|
-
if (objStr !== '{}') {
|
|
312
|
-
routeParams.srfnavctx = encodeURIComponent(objStr);
|
|
313
|
-
}
|
|
314
|
-
}
|
|
315
|
-
// 合并视图导航参数
|
|
316
|
-
if (pathNode.srfnav) {
|
|
317
|
-
routeParams.srfnav = pathNode.srfnav;
|
|
318
|
-
}
|
|
319
|
-
}
|
|
320
|
-
const paramsStr = qs.stringify(routeParams, {
|
|
321
|
-
delimiter: ';',
|
|
322
|
-
strictNullHandling: true,
|
|
323
|
-
skipNulls: true,
|
|
324
|
-
});
|
|
325
|
-
// 把路由参数转换到路由路径上去
|
|
326
|
-
if (notNilEmpty(paramsStr)) {
|
|
327
|
-
pathStr += paramsStr;
|
|
328
|
-
}
|
|
329
|
-
else {
|
|
330
|
-
pathStr += ibiz.env.routePlaceholder;
|
|
331
|
-
}
|
|
332
|
-
});
|
|
333
|
-
return pathStr;
|
|
334
|
-
}
|
|
335
|
-
/**
|
|
336
|
-
* 获取指定层级的路由路径
|
|
337
|
-
* @author lxm
|
|
338
|
-
* @date 2023-06-21 06:08:32
|
|
339
|
-
* @export
|
|
340
|
-
* @param {Route} route
|
|
341
|
-
* @param {number} depth
|
|
342
|
-
* @return {*} {string}
|
|
343
|
-
*/
|
|
344
|
-
export function getNestedRoutePath(route, depth, noSrfNav = true) {
|
|
345
|
-
// 当前路由层级低于指定层级的返回空
|
|
346
|
-
if (route.matched.length < depth) {
|
|
347
|
-
return '';
|
|
348
|
-
}
|
|
349
|
-
// 有名称的路由返回空,如login,404等
|
|
350
|
-
if (route.name) {
|
|
351
|
-
return route.path;
|
|
352
|
-
}
|
|
353
|
-
const routePath = route2routePath(route);
|
|
354
|
-
if (routePath.pathNodes.length < depth) {
|
|
355
|
-
// 当前路由层级比指定层级少时,直接返回空字符串
|
|
356
|
-
return route.path;
|
|
357
|
-
}
|
|
358
|
-
if (routePath.pathNodes.length > depth) {
|
|
359
|
-
// 删除depth后面的节点
|
|
360
|
-
routePath.pathNodes = routePath.pathNodes.slice(0, depth);
|
|
361
|
-
}
|
|
362
|
-
if (noSrfNav) {
|
|
363
|
-
// 删除至nav
|
|
364
|
-
delete routePath.pathNodes[depth - 1].srfnav;
|
|
365
|
-
}
|
|
366
|
-
return routePath2string(routePath);
|
|
367
|
-
}
|
|
368
|
-
/**
|
|
369
|
-
* 监听路由的变更,每次变更后都会触发回调
|
|
370
|
-
* 回调函数提供根据视图层级计算好的唯一标识currentKey,只有变了视图才需要刷新
|
|
371
|
-
* @author lxm
|
|
372
|
-
* @date 2023-05-09 12:52:36
|
|
373
|
-
* @param {(args: { currentKey: string; fullPath: string }) => void} callback
|
|
374
|
-
* @param {number} depth
|
|
375
|
-
*/
|
|
376
|
-
export function onRouteChange(callback, depth) {
|
|
377
|
-
const route = useRoute();
|
|
378
|
-
if (!route) {
|
|
379
|
-
throw new RuntimeError('无法正确获取route,可能是依赖问题');
|
|
380
|
-
}
|
|
381
|
-
watch(() => route === null || route === void 0 ? void 0 : route.path, () => {
|
|
382
|
-
const currentKey = getNestedRoutePath(route, depth);
|
|
383
|
-
callback({ currentKey, fullPath: route.fullPath });
|
|
384
|
-
}, { immediate: true });
|
|
385
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|