@ibiz-template/vue3-util 0.6.1-dev.0 → 0.6.1-dev.1
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/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} +28 -40
- 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 +5 -5
- 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 -401
- 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,127 +0,0 @@
|
|
|
1
|
-
import { CodeListItem } from '@ibiz-template/runtime';
|
|
2
|
-
import { isNil } from 'ramda';
|
|
3
|
-
import { defineComponent, PropType, ref, watch } from 'vue';
|
|
4
|
-
import { IAppCodeList } from '@ibiz/model-core';
|
|
5
|
-
import './code-list.scss';
|
|
6
|
-
import { useNamespace } from '../../use';
|
|
7
|
-
|
|
8
|
-
export const IBizCodeList = defineComponent({
|
|
9
|
-
name: 'IBizCodeList',
|
|
10
|
-
props: {
|
|
11
|
-
codeListItems: {
|
|
12
|
-
type: Array<CodeListItem>,
|
|
13
|
-
},
|
|
14
|
-
codeList: {
|
|
15
|
-
type: Object as PropType<IAppCodeList>,
|
|
16
|
-
required: true,
|
|
17
|
-
},
|
|
18
|
-
value: {
|
|
19
|
-
type: [String, Number],
|
|
20
|
-
},
|
|
21
|
-
},
|
|
22
|
-
emits: {
|
|
23
|
-
infoTextChange: (_text: string) => true,
|
|
24
|
-
},
|
|
25
|
-
setup(props, { emit }) {
|
|
26
|
-
const ns = useNamespace('code-list');
|
|
27
|
-
const items = ref<IData[]>([]);
|
|
28
|
-
const textSeparator = props.codeList?.textSeparator || '、';
|
|
29
|
-
const valueSeparator = props.codeList?.valueSeparator || ',';
|
|
30
|
-
|
|
31
|
-
watch(items, newVal => {
|
|
32
|
-
let infoText = '';
|
|
33
|
-
if (newVal.length > 0) {
|
|
34
|
-
infoText = newVal.map(item => item.text).join(textSeparator);
|
|
35
|
-
}
|
|
36
|
-
emit('infoTextChange', infoText);
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
const findCodeListItem = (
|
|
40
|
-
codelist: CodeListItem[] | undefined,
|
|
41
|
-
value: string | number,
|
|
42
|
-
) => {
|
|
43
|
-
if (codelist) {
|
|
44
|
-
// eslint-disable-next-line eqeqeq
|
|
45
|
-
const findItem = codelist.find(item => item.value == value);
|
|
46
|
-
if (findItem) {
|
|
47
|
-
return findItem;
|
|
48
|
-
}
|
|
49
|
-
for (let i = 0; i < codelist.length; i++) {
|
|
50
|
-
const childrenItem = findCodeListItem(
|
|
51
|
-
codelist[i].children,
|
|
52
|
-
value,
|
|
53
|
-
) as CodeListItem;
|
|
54
|
-
if (childrenItem) {
|
|
55
|
-
return childrenItem;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
watch(
|
|
62
|
-
() => props.value,
|
|
63
|
-
(newVal, oldVal) => {
|
|
64
|
-
if (newVal !== oldVal) {
|
|
65
|
-
if (isNil(newVal) || newVal === '') {
|
|
66
|
-
// 空值置空
|
|
67
|
-
items.value = [];
|
|
68
|
-
} else {
|
|
69
|
-
// 非空值解析代码表
|
|
70
|
-
let values: string[] | number[];
|
|
71
|
-
if (typeof newVal === 'string') {
|
|
72
|
-
values = newVal.split(valueSeparator);
|
|
73
|
-
} else {
|
|
74
|
-
values = [newVal];
|
|
75
|
-
}
|
|
76
|
-
items.value = values.map(val => {
|
|
77
|
-
const findItem = findCodeListItem(props.codeListItems, val);
|
|
78
|
-
return {
|
|
79
|
-
text: findItem?.text || val,
|
|
80
|
-
color: findItem?.color,
|
|
81
|
-
textCls: findItem?.textCls,
|
|
82
|
-
sysImage: findItem?.sysImage,
|
|
83
|
-
};
|
|
84
|
-
});
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
},
|
|
88
|
-
{ immediate: true },
|
|
89
|
-
);
|
|
90
|
-
|
|
91
|
-
const emptyText =
|
|
92
|
-
props.codeList.emptyText === '未定义'
|
|
93
|
-
? '- - -'
|
|
94
|
-
: props.codeList.emptyText;
|
|
95
|
-
|
|
96
|
-
return { items, ns, emptyText, textSeparator };
|
|
97
|
-
},
|
|
98
|
-
render() {
|
|
99
|
-
return (
|
|
100
|
-
<span class={this.ns.b()}>
|
|
101
|
-
{this.items.length === 0
|
|
102
|
-
? this.emptyText
|
|
103
|
-
: this.items.map((item, index) => {
|
|
104
|
-
return [
|
|
105
|
-
index !== 0 ? this.textSeparator : null,
|
|
106
|
-
<span
|
|
107
|
-
class={[
|
|
108
|
-
this.ns.e('item'),
|
|
109
|
-
item.textCls ? item.textCls : null,
|
|
110
|
-
]}
|
|
111
|
-
style={
|
|
112
|
-
item.color
|
|
113
|
-
? this.ns.cssVarBlock({
|
|
114
|
-
'item-color': `${item.color}`,
|
|
115
|
-
})
|
|
116
|
-
: null
|
|
117
|
-
}
|
|
118
|
-
>
|
|
119
|
-
{item.sysImage && <iBizIcon icon={item.sysImage}></iBizIcon>}
|
|
120
|
-
{item.text}
|
|
121
|
-
</span>,
|
|
122
|
-
];
|
|
123
|
-
})}
|
|
124
|
-
</span>
|
|
125
|
-
);
|
|
126
|
-
},
|
|
127
|
-
});
|
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ControlController,
|
|
3
|
-
IControlProvider,
|
|
4
|
-
IViewLayoutPanelController,
|
|
5
|
-
} from '@ibiz-template/runtime';
|
|
6
|
-
import { IControlContainer } from '@ibiz/model-core';
|
|
7
|
-
import { isNil } from 'ramda';
|
|
8
|
-
import {
|
|
9
|
-
CSSProperties,
|
|
10
|
-
defineComponent,
|
|
11
|
-
h,
|
|
12
|
-
PropType,
|
|
13
|
-
reactive,
|
|
14
|
-
resolveComponent,
|
|
15
|
-
VNode,
|
|
16
|
-
} from 'vue';
|
|
17
|
-
import { useNamespace } from '../../use';
|
|
18
|
-
|
|
19
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
20
|
-
export const IBizControlBase: any = defineComponent({
|
|
21
|
-
name: 'IBizControlBase',
|
|
22
|
-
props: {
|
|
23
|
-
controller: {
|
|
24
|
-
type: Object as PropType<ControlController>,
|
|
25
|
-
required: true,
|
|
26
|
-
},
|
|
27
|
-
},
|
|
28
|
-
setup(props) {
|
|
29
|
-
const ns = useNamespace('control');
|
|
30
|
-
const { controlType, sysCss, codeName } = props.controller.model;
|
|
31
|
-
const typeClass = controlType!.toLowerCase();
|
|
32
|
-
const sysCssName = sysCss?.cssName;
|
|
33
|
-
const model = props.controller.model;
|
|
34
|
-
|
|
35
|
-
/** 子部件模型 */
|
|
36
|
-
const controls = (props.controller.model as IControlContainer).controls;
|
|
37
|
-
|
|
38
|
-
const onLayoutPanelCreated = (
|
|
39
|
-
controller: IViewLayoutPanelController,
|
|
40
|
-
): void => {
|
|
41
|
-
props.controller.setLayoutPanel(controller as IViewLayoutPanelController);
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
const inlineStyle = reactive<CSSProperties>({});
|
|
45
|
-
// 非导航栏时才输出宽高
|
|
46
|
-
if (model.controlType!.endsWith('EXPBAR') === false) {
|
|
47
|
-
if (!isNil(model.width)) {
|
|
48
|
-
inlineStyle.width = `${model.width}px`;
|
|
49
|
-
}
|
|
50
|
-
if (!isNil(model.height)) {
|
|
51
|
-
inlineStyle.height = `${model.height}px`;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
return {
|
|
56
|
-
ns,
|
|
57
|
-
typeClass,
|
|
58
|
-
sysCssName,
|
|
59
|
-
inlineStyle,
|
|
60
|
-
codeName,
|
|
61
|
-
controls,
|
|
62
|
-
onLayoutPanelCreated,
|
|
63
|
-
};
|
|
64
|
-
},
|
|
65
|
-
render() {
|
|
66
|
-
const { state, controlPanel, providers } = this.controller;
|
|
67
|
-
let layoutPanel = null;
|
|
68
|
-
// 有部件布局的绘制布局面板
|
|
69
|
-
if (state.isCreated && controlPanel) {
|
|
70
|
-
// 绘制部件插槽,外部插槽优先
|
|
71
|
-
const slots: IData = {
|
|
72
|
-
...this.$slots,
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
if (this.controls?.length) {
|
|
76
|
-
this.controls.forEach(ctrl => {
|
|
77
|
-
const slotKey = ctrl.name!;
|
|
78
|
-
const ctrlProps = {
|
|
79
|
-
context: this.controller.context,
|
|
80
|
-
params: this.controller.params,
|
|
81
|
-
};
|
|
82
|
-
// 已经有插槽的不用自己绘制了。
|
|
83
|
-
const outCtrlSlot = slots[slotKey];
|
|
84
|
-
if (outCtrlSlot) {
|
|
85
|
-
slots[slotKey] = (): VNode => {
|
|
86
|
-
return outCtrlSlot(ctrlProps);
|
|
87
|
-
};
|
|
88
|
-
} else {
|
|
89
|
-
slots[slotKey] = (): VNode => {
|
|
90
|
-
const comp = resolveComponent('IBizControlShell') as string;
|
|
91
|
-
return h(comp, {
|
|
92
|
-
modelData: ctrl,
|
|
93
|
-
...ctrlProps,
|
|
94
|
-
});
|
|
95
|
-
};
|
|
96
|
-
}
|
|
97
|
-
});
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
// 绘制布局面板
|
|
101
|
-
const provider = providers[controlPanel.name!] as IControlProvider;
|
|
102
|
-
layoutPanel = h(
|
|
103
|
-
resolveComponent(provider.component) as string,
|
|
104
|
-
{
|
|
105
|
-
modelData: controlPanel,
|
|
106
|
-
context: this.controller.context,
|
|
107
|
-
params: this.controller.params,
|
|
108
|
-
provider,
|
|
109
|
-
container: this.controller,
|
|
110
|
-
onControllerAppear: this.onLayoutPanelCreated,
|
|
111
|
-
},
|
|
112
|
-
slots,
|
|
113
|
-
);
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
return (
|
|
117
|
-
<div
|
|
118
|
-
class={[
|
|
119
|
-
this.ns.b(),
|
|
120
|
-
this.ns.b(this.typeClass),
|
|
121
|
-
this.ns.m(this.codeName),
|
|
122
|
-
this.sysCssName,
|
|
123
|
-
]}
|
|
124
|
-
style={this.inlineStyle}
|
|
125
|
-
>
|
|
126
|
-
{layoutPanel || this.$slots.default?.()}
|
|
127
|
-
</div>
|
|
128
|
-
);
|
|
129
|
-
},
|
|
130
|
-
});
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { CTX } from '@ibiz-template/runtime';
|
|
2
|
-
import { defineComponent, inject, PropType } from 'vue';
|
|
3
|
-
|
|
4
|
-
export const ControlLoadingPlaceholder = defineComponent({
|
|
5
|
-
name: 'ControlLoadingPlaceholder',
|
|
6
|
-
props: {
|
|
7
|
-
modelData: { type: Object as PropType<IData>, required: true },
|
|
8
|
-
context: { type: Object as PropType<IContext>, required: true },
|
|
9
|
-
params: { type: Object as PropType<IParams>, default: () => ({}) },
|
|
10
|
-
},
|
|
11
|
-
setup(props) {
|
|
12
|
-
// 上下文里提前预告部件
|
|
13
|
-
const ctx = inject('ctx') as CTX;
|
|
14
|
-
|
|
15
|
-
ctx.evt.emit('onForecast', props.modelData.name!);
|
|
16
|
-
|
|
17
|
-
return {};
|
|
18
|
-
},
|
|
19
|
-
render() {
|
|
20
|
-
return null;
|
|
21
|
-
},
|
|
22
|
-
});
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
/* eslint-disable no-param-reassign */
|
|
2
|
-
/* eslint-disable vue/no-mutating-props */
|
|
3
|
-
import {
|
|
4
|
-
CTX,
|
|
5
|
-
getControlProvider,
|
|
6
|
-
IControlProvider,
|
|
7
|
-
} from '@ibiz-template/runtime';
|
|
8
|
-
import {
|
|
9
|
-
defineComponent,
|
|
10
|
-
h,
|
|
11
|
-
inject,
|
|
12
|
-
PropType,
|
|
13
|
-
ref,
|
|
14
|
-
resolveComponent,
|
|
15
|
-
} from 'vue';
|
|
16
|
-
import './control-shell.scss';
|
|
17
|
-
import { IControl } from '@ibiz/model-core';
|
|
18
|
-
import { useNamespace } from '../../use';
|
|
19
|
-
|
|
20
|
-
export const IBizControlShell = defineComponent({
|
|
21
|
-
name: 'IBizControlShell',
|
|
22
|
-
props: {
|
|
23
|
-
modelData: { type: Object as PropType<IControl>, required: true },
|
|
24
|
-
},
|
|
25
|
-
setup(props) {
|
|
26
|
-
// 上下文里提前预告部件
|
|
27
|
-
const ctx = inject('ctx') as CTX;
|
|
28
|
-
|
|
29
|
-
ctx.evt.emit('onForecast', props.modelData.name!);
|
|
30
|
-
|
|
31
|
-
const isComplete = ref(false);
|
|
32
|
-
const errMsg = ref('');
|
|
33
|
-
const provider = ref<IControlProvider>();
|
|
34
|
-
getControlProvider(props.modelData)
|
|
35
|
-
.then(item => {
|
|
36
|
-
if (!item) {
|
|
37
|
-
errMsg.value = `未找到对应部件的适配器`;
|
|
38
|
-
} else {
|
|
39
|
-
provider.value = item;
|
|
40
|
-
}
|
|
41
|
-
isComplete.value = true;
|
|
42
|
-
})
|
|
43
|
-
.catch(err => {
|
|
44
|
-
ibiz.log.error(err);
|
|
45
|
-
errMsg.value = err.message;
|
|
46
|
-
isComplete.value = true;
|
|
47
|
-
});
|
|
48
|
-
const ns = useNamespace('control-shell');
|
|
49
|
-
|
|
50
|
-
return { ns, isComplete, errMsg, provider };
|
|
51
|
-
},
|
|
52
|
-
render() {
|
|
53
|
-
if (this.isComplete && this.provider) {
|
|
54
|
-
return h(
|
|
55
|
-
resolveComponent(this.provider.component) as string,
|
|
56
|
-
{
|
|
57
|
-
provider: this.provider,
|
|
58
|
-
...this.$props,
|
|
59
|
-
...this.$attrs,
|
|
60
|
-
},
|
|
61
|
-
this.$slots,
|
|
62
|
-
);
|
|
63
|
-
}
|
|
64
|
-
return (
|
|
65
|
-
<div class={this.ns.b()} v-loading={!this.isComplete}>
|
|
66
|
-
{this.isComplete ? this.errMsg : null}
|
|
67
|
-
</div>
|
|
68
|
-
);
|
|
69
|
-
},
|
|
70
|
-
});
|
package/src/common/icon/icon.tsx
DELETED
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import { defineComponent, PropType, VNode, computed } from 'vue';
|
|
2
|
-
import { ISysImage } from '@ibiz/model-core';
|
|
3
|
-
import { IIcon } from '@ibiz-template/runtime';
|
|
4
|
-
import { isBase64Image, isSvg } from '@ibiz-template/core';
|
|
5
|
-
import { useNamespace } from '../../use';
|
|
6
|
-
|
|
7
|
-
export const IBizIcon = defineComponent({
|
|
8
|
-
name: 'IBizIcon',
|
|
9
|
-
props: {
|
|
10
|
-
icon: {
|
|
11
|
-
type: Object as PropType<ISysImage | IIcon>,
|
|
12
|
-
},
|
|
13
|
-
size: {
|
|
14
|
-
type: String as PropType<'small' | 'medium' | 'large'>,
|
|
15
|
-
},
|
|
16
|
-
baseDir: {
|
|
17
|
-
type: String,
|
|
18
|
-
default: 'images',
|
|
19
|
-
},
|
|
20
|
-
},
|
|
21
|
-
setup(props) {
|
|
22
|
-
const ns = useNamespace('icon');
|
|
23
|
-
const BaseUrl = `${ibiz.env.assetsUrl}/${props.baseDir}/`;
|
|
24
|
-
|
|
25
|
-
function getContent(icon?: IData): VNode | null {
|
|
26
|
-
if (icon) {
|
|
27
|
-
if (icon.htmlStr) {
|
|
28
|
-
return <span class={ns.b()} v-html={icon.htmlStr}></span>;
|
|
29
|
-
}
|
|
30
|
-
if (icon.cssClass) {
|
|
31
|
-
if (icon.cssClass.indexOf('fa-') !== -1) {
|
|
32
|
-
return <i class={[ns.b(), icon.cssClass]} />;
|
|
33
|
-
}
|
|
34
|
-
return <ion-icon class={ns.b()} name={icon.cssClass}></ion-icon>;
|
|
35
|
-
}
|
|
36
|
-
if (icon.imagePath) {
|
|
37
|
-
// base64格式内容
|
|
38
|
-
if (isBase64Image(icon.imagePath)) {
|
|
39
|
-
return <img class={ns.b()} src={icon.imagePath}></img>;
|
|
40
|
-
}
|
|
41
|
-
// svg内容
|
|
42
|
-
if (isSvg(icon.imagePath)) {
|
|
43
|
-
return <div class={ns.b()} v-html={icon.imagePath}></div>;
|
|
44
|
-
}
|
|
45
|
-
// 以svg结尾
|
|
46
|
-
if (icon.imagePath.endsWith('svg')) {
|
|
47
|
-
// 远程svg
|
|
48
|
-
if (icon.imagePath.startsWith('http')) {
|
|
49
|
-
return <img class={ns.b()} src={icon.imagePath}></img>;
|
|
50
|
-
}
|
|
51
|
-
// 本地svg
|
|
52
|
-
return (
|
|
53
|
-
<ion-icon
|
|
54
|
-
src={BaseUrl + icon.imagePath}
|
|
55
|
-
class={ns.b()}
|
|
56
|
-
></ion-icon>
|
|
57
|
-
);
|
|
58
|
-
}
|
|
59
|
-
// 远程图片
|
|
60
|
-
if (icon.imagePath.startsWith('http')) {
|
|
61
|
-
return <img class={ns.b()} src={icon.imagePath} />;
|
|
62
|
-
}
|
|
63
|
-
// 本地图片
|
|
64
|
-
return <img class={ns.b()} src={BaseUrl + icon.imagePath} />;
|
|
65
|
-
}
|
|
66
|
-
if (icon.rawContent) {
|
|
67
|
-
if (isSvg(icon.rawContent)) {
|
|
68
|
-
return <div class={ns.b()} v-html={icon.rawContent}></div>;
|
|
69
|
-
}
|
|
70
|
-
return <img class={ns.b()} src={icon.rawContent} />;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
return null;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
const content = computed<VNode | null>(() => {
|
|
77
|
-
return getContent(props.icon);
|
|
78
|
-
});
|
|
79
|
-
|
|
80
|
-
return (): VNode | null => content.value;
|
|
81
|
-
},
|
|
82
|
-
});
|
package/src/common/index.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export * from './icon/icon';
|
|
2
|
-
export * from './router-view/router-view';
|
|
3
|
-
export * from './control-base/control-base';
|
|
4
|
-
export * from './control-shell/control-shell';
|
|
5
|
-
export * from './view-shell/view-shell';
|
|
6
|
-
export * from './code-list/code-list';
|
|
7
|
-
export * from './control-loading-placeholder/control-loading-placeholder';
|
|
8
|
-
export * from './badge/badge';
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
|
-
import { isNotNil } from 'ramda';
|
|
3
|
-
import { defineComponent, h, PropType, VNode, watch } from 'vue';
|
|
4
|
-
import { RouteLocationNormalizedLoaded } from 'vue-router';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* 只会第一次绘制的时候绘制路由相关的内容,后面路由导致的router-view的回调都屏蔽了。
|
|
8
|
-
* 通过变更manualKey,来强制刷新router-view的slot回调。并且吧manualKey传给Component的key,搭配AppKeepAlive可以缓存组件
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
export const IBizRouterView = defineComponent({
|
|
12
|
-
name: 'IBizRouterView',
|
|
13
|
-
inheritAttrs: false,
|
|
14
|
-
props: {
|
|
15
|
-
name: {
|
|
16
|
-
type: String as PropType<string>,
|
|
17
|
-
default: 'default',
|
|
18
|
-
},
|
|
19
|
-
route: Object as PropType<RouteLocationNormalizedLoaded>,
|
|
20
|
-
manualKey: {
|
|
21
|
-
type: String,
|
|
22
|
-
},
|
|
23
|
-
},
|
|
24
|
-
setup(props, { attrs }) {
|
|
25
|
-
const cache: { vNode?: VNode } = {};
|
|
26
|
-
|
|
27
|
-
let isActive = true;
|
|
28
|
-
|
|
29
|
-
watch(
|
|
30
|
-
() => props.manualKey,
|
|
31
|
-
(newVal, oldVal) => {
|
|
32
|
-
if (isNotNil(newVal) && newVal !== oldVal) {
|
|
33
|
-
isActive = true;
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
);
|
|
37
|
-
|
|
38
|
-
const renderComp = (Component: VNode, _route: any): VNode | undefined => {
|
|
39
|
-
// 非激活时返回缓存
|
|
40
|
-
if (!isActive) {
|
|
41
|
-
return cache.vNode;
|
|
42
|
-
}
|
|
43
|
-
isActive = false;
|
|
44
|
-
if (Component) {
|
|
45
|
-
const tempProps = { ...Component.props };
|
|
46
|
-
delete tempProps.onVnodeUnmounted;
|
|
47
|
-
delete tempProps.ref;
|
|
48
|
-
const hNode = h(Component.type as string, {
|
|
49
|
-
...tempProps,
|
|
50
|
-
...attrs,
|
|
51
|
-
key: props.manualKey,
|
|
52
|
-
});
|
|
53
|
-
cache.vNode = hNode;
|
|
54
|
-
return hNode;
|
|
55
|
-
}
|
|
56
|
-
return undefined;
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
return { renderComp };
|
|
60
|
-
},
|
|
61
|
-
render() {
|
|
62
|
-
return (
|
|
63
|
-
<router-view name={this.name} route={this.route}>
|
|
64
|
-
{({ Component, route }: any): VNode | VNode[] | undefined => {
|
|
65
|
-
const newComp = this.renderComp(Component, route);
|
|
66
|
-
if (this.$slots.default) {
|
|
67
|
-
return this.$slots.default({ Component: newComp, route });
|
|
68
|
-
}
|
|
69
|
-
return newComp;
|
|
70
|
-
}}
|
|
71
|
-
</router-view>
|
|
72
|
-
);
|
|
73
|
-
},
|
|
74
|
-
});
|
|
@@ -1,163 +0,0 @@
|
|
|
1
|
-
/* eslint-disable no-param-reassign */
|
|
2
|
-
/* eslint-disable vue/no-mutating-props */
|
|
3
|
-
import {
|
|
4
|
-
getViewProvider,
|
|
5
|
-
IViewProvider,
|
|
6
|
-
calcDynaSysParams,
|
|
7
|
-
} from '@ibiz-template/runtime';
|
|
8
|
-
import { defineComponent, h, PropType, ref, resolveComponent } from 'vue';
|
|
9
|
-
import { IAppView } from '@ibiz/model-core';
|
|
10
|
-
import { RuntimeError } from '@ibiz-template/core';
|
|
11
|
-
import { createUUID } from 'qx-util';
|
|
12
|
-
import { isEmpty, isNil } from 'ramda';
|
|
13
|
-
import { useNamespace } from '../../use';
|
|
14
|
-
import './view-shell.scss';
|
|
15
|
-
|
|
16
|
-
export const IBizViewShell = defineComponent({
|
|
17
|
-
name: 'IBizViewShell',
|
|
18
|
-
props: {
|
|
19
|
-
context: { type: Object as PropType<IContext>, required: true },
|
|
20
|
-
params: { type: Object as PropType<IParams> },
|
|
21
|
-
modelData: { type: Object as PropType<IAppView> },
|
|
22
|
-
viewId: { type: String },
|
|
23
|
-
},
|
|
24
|
-
setup(props) {
|
|
25
|
-
const ns = useNamespace('view-shell');
|
|
26
|
-
const isComplete = ref(false);
|
|
27
|
-
const errMsg = ref('');
|
|
28
|
-
const provider = ref<IViewProvider>();
|
|
29
|
-
const viewModelData = ref<IAppView | undefined>();
|
|
30
|
-
// 初始化方法
|
|
31
|
-
const init = async (): Promise<void> => {
|
|
32
|
-
let viewModel: IAppView | undefined;
|
|
33
|
-
if (props.modelData) {
|
|
34
|
-
viewModel = props.modelData;
|
|
35
|
-
} else {
|
|
36
|
-
viewModel = await ibiz.hub.getAppView(props.viewId!);
|
|
37
|
-
}
|
|
38
|
-
if (!viewModel) {
|
|
39
|
-
throw new RuntimeError('未找到视图模型');
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
if (viewModel.dynaSysMode === 1) {
|
|
43
|
-
//* 计算实体资源路径上下文参数
|
|
44
|
-
const appDataEntityId = viewModel.appDataEntityId;
|
|
45
|
-
if (!appDataEntityId) {
|
|
46
|
-
throw new RuntimeError(
|
|
47
|
-
`${viewModel.codeName}无实体,暂不支持加载动态模型`,
|
|
48
|
-
);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
const params = props.params || {};
|
|
52
|
-
|
|
53
|
-
/** 加载动态模型的请求参数 */
|
|
54
|
-
const loadModelParams: IParams = await calcDynaSysParams(
|
|
55
|
-
appDataEntityId,
|
|
56
|
-
props.context,
|
|
57
|
-
{ viewParams: params, appId: viewModel.appId },
|
|
58
|
-
);
|
|
59
|
-
|
|
60
|
-
if (params.srfdatatype) {
|
|
61
|
-
loadModelParams.srfdatatype = params.srfdatatype;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
// 如果视图参数中存在 srfwftag 则直接使用视图参数
|
|
65
|
-
if (params.srfwftag) {
|
|
66
|
-
loadModelParams.srfwftag = params.srfwftag;
|
|
67
|
-
} else if (appDataEntityId && viewModel.enableWF) {
|
|
68
|
-
// 处理数据请求的上下文
|
|
69
|
-
const context: IContext = { ...props.context };
|
|
70
|
-
// 存在主键则加载数据计算对应的参数
|
|
71
|
-
if (loadModelParams.srfkey) {
|
|
72
|
-
const noSrfSessionId =
|
|
73
|
-
isNil(props.context.srfsessionid) ||
|
|
74
|
-
isEmpty(props.context.srfsessionid);
|
|
75
|
-
const id = createUUID();
|
|
76
|
-
// 只要上下文中无 srfsessionid 则生成一个
|
|
77
|
-
if (noSrfSessionId) {
|
|
78
|
-
// 生成一个界面域,界面域标识为当前控制器实例的标识
|
|
79
|
-
const domain = ibiz.uiDomainManager.create(id);
|
|
80
|
-
context.srfsessionid = domain.id;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
const app = ibiz.hub.getApp(viewModel.appId);
|
|
84
|
-
const service = await app.deService.getService(
|
|
85
|
-
props.context,
|
|
86
|
-
appDataEntityId!,
|
|
87
|
-
);
|
|
88
|
-
const res = await service.get(context, props.params || {});
|
|
89
|
-
if (res.ok && res.data) {
|
|
90
|
-
const { srfwftag, processdefinitionkey, taskdefinitionkey } =
|
|
91
|
-
res.data;
|
|
92
|
-
if (srfwftag) {
|
|
93
|
-
loadModelParams.srfwftag = srfwftag;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
// *动态工作流编辑视图从数据里额外获取参数
|
|
97
|
-
if (
|
|
98
|
-
['DEWFDYNAEDITVIEW3', 'DEWFDYNAEDITVIEW'].includes(
|
|
99
|
-
viewModel.viewType!,
|
|
100
|
-
)
|
|
101
|
-
) {
|
|
102
|
-
const viewParams = props.params!;
|
|
103
|
-
// 如果视图参数中没有获取到对应流程实例标识与步骤标识,则从请求回来的数据中获取对应信息
|
|
104
|
-
if (isNil(viewParams.processDefinitionKey)) {
|
|
105
|
-
viewParams.processDefinitionKey = processdefinitionkey;
|
|
106
|
-
}
|
|
107
|
-
if (isNil(viewParams.taskDefinitionKey)) {
|
|
108
|
-
viewParams.taskDefinitionKey = taskdefinitionkey;
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
if (noSrfSessionId) {
|
|
114
|
-
ibiz.uiDomainManager.destroy(id);
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
// *加载动态模型
|
|
120
|
-
viewModelData.value = await ibiz.hub.loadAppView(
|
|
121
|
-
viewModel.appId,
|
|
122
|
-
viewModel.id!,
|
|
123
|
-
loadModelParams,
|
|
124
|
-
);
|
|
125
|
-
} else {
|
|
126
|
-
viewModelData.value = viewModel;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
try {
|
|
130
|
-
provider.value = await getViewProvider(viewModel);
|
|
131
|
-
} catch (error) {
|
|
132
|
-
ibiz.log.error(error);
|
|
133
|
-
errMsg.value = (error as IData).message;
|
|
134
|
-
} finally {
|
|
135
|
-
isComplete.value = true;
|
|
136
|
-
}
|
|
137
|
-
};
|
|
138
|
-
|
|
139
|
-
init();
|
|
140
|
-
|
|
141
|
-
return { ns, isComplete, errMsg, viewModelData, provider };
|
|
142
|
-
},
|
|
143
|
-
render() {
|
|
144
|
-
if (this.isComplete && this.provider) {
|
|
145
|
-
return h(
|
|
146
|
-
resolveComponent(this.provider.component) as string,
|
|
147
|
-
{
|
|
148
|
-
context: this.$props.context,
|
|
149
|
-
params: this.$props.params,
|
|
150
|
-
modelData: this.viewModelData,
|
|
151
|
-
...this.$attrs,
|
|
152
|
-
provider: this.provider,
|
|
153
|
-
},
|
|
154
|
-
this.$slots,
|
|
155
|
-
);
|
|
156
|
-
}
|
|
157
|
-
return (
|
|
158
|
-
<div class={this.ns.b()} v-loading={!this.isComplete}>
|
|
159
|
-
{this.isComplete ? this.errMsg : null}
|
|
160
|
-
</div>
|
|
161
|
-
);
|
|
162
|
-
},
|
|
163
|
-
});
|
package/src/control/index.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './panel';
|