@ibiz-template/vue3-util 0.6.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/dist/index.system.min.js +1 -1
- package/es/panel-component/nav-pos/nav-pos.controller.d.ts.map +1 -1
- package/es/panel-component/nav-pos/nav-pos.controller.mjs +12 -3
- package/es/util/overlay-container/overlay-container.mjs +1 -1
- package/es/util/router-callback/router-callback.d.ts +1 -1
- package/es/util/router-callback/router-callback.d.ts.map +1 -1
- package/es/util/router-callback/router-callback.mjs +6 -2
- package/lib/_virtual/_commonjsHelpers.cjs +46 -0
- package/lib/common/badge/badge.cjs +34 -0
- package/lib/common/badge/badge.css +1 -0
- package/lib/common/code-list/code-list.cjs +105 -0
- package/lib/common/code-list/code-list.css +1 -0
- package/lib/common/control-base/control-base.cjs +102 -0
- package/lib/common/control-base/control-base.css +1 -0
- package/lib/common/control-loading-placeholder/control-loading-placeholder.cjs +32 -0
- package/lib/common/control-shell/control-shell.cjs +58 -0
- package/lib/common/control-shell/control-shell.css +1 -0
- package/lib/common/icon/icon.cjs +103 -0
- package/lib/common/index.cjs +21 -0
- package/lib/common/router-view/router-view.cjs +77 -0
- package/lib/common/view-shell/view-shell.cjs +137 -0
- package/lib/common/view-shell/view-shell.css +1 -0
- package/lib/control/index.cjs +10 -0
- package/lib/control/panel/index.cjs +9 -0
- package/lib/control/panel/panel/index.cjs +18 -0
- package/lib/control/panel/panel/panel.cjs +142 -0
- package/lib/control/panel/panel/panel.css +1 -0
- package/lib/control/panel/panel/panel.provider.cjs +10 -0
- package/lib/control/panel/view-layout-panel/index.cjs +24 -0
- package/lib/control/panel/view-layout-panel/view-layout-panel.cjs +144 -0
- package/lib/control/panel/view-layout-panel/view-layout-panel.css +1 -0
- package/lib/control/panel/view-layout-panel/view-layout-panel.provider.cjs +10 -0
- package/lib/hooks/app/app.hooks.cjs +26 -0
- package/lib/hooks/index.cjs +7 -0
- package/lib/interface/index.cjs +5 -0
- package/lib/interface/util/index.cjs +5 -0
- package/lib/interface/util/route/route.cjs +3 -0
- package/lib/node_modules/.pnpm/path-browserify@1.0.1/node_modules/path-browserify/index.cjs +540 -0
- package/lib/panel-component/grid-container/grid-container.cjs +108 -0
- package/lib/panel-component/grid-container/grid-container.controller.cjs +14 -0
- package/lib/panel-component/grid-container/grid-container.css +1 -0
- package/lib/panel-component/grid-container/grid-container.provider.cjs +17 -0
- package/lib/panel-component/grid-container/grid-container.state.cjs +9 -0
- package/lib/panel-component/grid-container/index.cjs +25 -0
- package/lib/panel-component/index.cjs +73 -0
- package/lib/panel-component/multi-data-container/index.cjs +28 -0
- package/lib/panel-component/multi-data-container/multi-data-container-item.controller.cjs +119 -0
- package/lib/panel-component/multi-data-container/multi-data-container-itm.state.cjs +19 -0
- package/lib/panel-component/multi-data-container/multi-data-container.cjs +89 -0
- package/lib/panel-component/multi-data-container/multi-data-container.controller.cjs +262 -0
- package/lib/panel-component/multi-data-container/multi-data-container.css +1 -0
- package/lib/panel-component/multi-data-container/multi-data-container.provider.cjs +17 -0
- package/lib/panel-component/multi-data-container/multi-data-container.state.cjs +19 -0
- package/lib/panel-component/nav-pos/index.cjs +22 -0
- package/lib/panel-component/nav-pos/nav-pos.cjs +107 -0
- package/lib/panel-component/nav-pos/nav-pos.controller.cjs +312 -0
- package/lib/panel-component/nav-pos/nav-pos.css +1 -0
- package/lib/panel-component/nav-pos/nav-pos.provider.cjs +26 -0
- package/lib/panel-component/nav-pos/nav-pos.state.cjs +49 -0
- package/lib/panel-component/panel-container/index.cjs +29 -0
- package/lib/panel-component/panel-container/panel-container.cjs +72 -0
- package/lib/panel-component/panel-container/panel-container.controller.cjs +14 -0
- package/lib/panel-component/panel-container/panel-container.css +1 -0
- package/lib/panel-component/panel-container/panel-container.provider.cjs +17 -0
- package/lib/panel-component/panel-container/panel-container.state.cjs +9 -0
- package/lib/panel-component/panel-container-group/index.cjs +28 -0
- package/lib/panel-component/panel-container-group/panel-container-group.cjs +110 -0
- package/lib/panel-component/panel-container-group/panel-container-group.controller.cjs +37 -0
- package/lib/panel-component/panel-container-group/panel-container-group.css +1 -0
- package/lib/panel-component/panel-container-group/panel-container-group.provider.cjs +17 -0
- package/lib/panel-component/panel-container-group/panel-container-group.state.cjs +9 -0
- package/lib/panel-component/panel-container-image/index.cjs +28 -0
- package/lib/panel-component/panel-container-image/panel-container-image.cjs +95 -0
- package/lib/panel-component/panel-container-image/panel-container-image.controller.cjs +14 -0
- package/lib/panel-component/panel-container-image/panel-container-image.css +1 -0
- package/lib/panel-component/panel-container-image/panel-container-image.provider.cjs +17 -0
- package/lib/panel-component/panel-container-image/panel-container-image.state.cjs +9 -0
- package/lib/panel-component/panel-ctrl-pos/index.cjs +20 -0
- package/lib/panel-component/panel-ctrl-pos/panel-ctrl-pos.cjs +47 -0
- package/lib/panel-component/panel-ctrl-pos/panel-ctrl-pos.controller.cjs +25 -0
- package/lib/panel-component/panel-ctrl-pos/panel-ctrl-pos.css +1 -0
- package/lib/panel-component/panel-ctrl-pos/panel-ctrl-pos.provider.cjs +17 -0
- package/lib/panel-component/panel-field/index.cjs +20 -0
- package/lib/panel-component/panel-field/panel-field.cjs +78 -0
- package/lib/panel-component/panel-field/panel-field.controller.cjs +132 -0
- package/lib/panel-component/panel-field/panel-field.css +1 -0
- package/lib/panel-component/panel-field/panel-field.provider.cjs +17 -0
- package/lib/panel-component/panel-field/panel-field.state.cjs +9 -0
- package/lib/panel-component/panel-item-render/index.cjs +24 -0
- package/lib/panel-component/panel-item-render/panel-item-render.cjs +49 -0
- package/lib/panel-component/panel-item-render/panel-item-render.controller.cjs +31 -0
- package/lib/panel-component/panel-item-render/panel-item-render.provider.cjs +17 -0
- package/lib/panel-component/panel-rawitem/index.cjs +32 -0
- package/lib/panel-component/panel-rawitem/panel-rawitem.cjs +61 -0
- package/lib/panel-component/panel-rawitem/panel-rawitem.controller.cjs +30 -0
- package/lib/panel-component/panel-rawitem/panel-rawitem.css +1 -0
- package/lib/panel-component/panel-rawitem/panel-rawitem.provider.cjs +17 -0
- package/lib/panel-component/panel-tab-page/index.cjs +18 -0
- package/lib/panel-component/panel-tab-page/panel-tab-page.cjs +65 -0
- package/lib/panel-component/panel-tab-page/panel-tab-page.provider.cjs +17 -0
- package/lib/panel-component/scroll-container/index.cjs +55 -0
- package/lib/panel-component/scroll-container/scroll-container/index.cjs +9 -0
- package/lib/panel-component/scroll-container/scroll-container/scroll-container.cjs +114 -0
- package/lib/panel-component/scroll-container/scroll-container/scroll-container.controller.cjs +14 -0
- package/lib/panel-component/scroll-container/scroll-container/scroll-container.css +1 -0
- package/lib/panel-component/scroll-container/scroll-container/scroll-container.provider.cjs +17 -0
- package/lib/panel-component/scroll-container/scroll-container-item/index.cjs +9 -0
- package/lib/panel-component/scroll-container/scroll-container-item/scroll-container-item.cjs +66 -0
- package/lib/panel-component/scroll-container/scroll-container-item/scroll-container-item.controller.cjs +9 -0
- package/lib/panel-component/scroll-container/scroll-container-item/scroll-container-item.css +1 -0
- package/lib/panel-component/scroll-container/scroll-container-item/scroll-container-item.provider.cjs +17 -0
- package/lib/panel-component/single-data-container/index.cjs +28 -0
- package/lib/panel-component/single-data-container/single-data-container.cjs +79 -0
- package/lib/panel-component/single-data-container/single-data-container.controller.cjs +287 -0
- package/lib/panel-component/single-data-container/single-data-container.css +1 -0
- package/lib/panel-component/single-data-container/single-data-container.provider.cjs +17 -0
- package/lib/panel-component/single-data-container/single-data-container.state.cjs +19 -0
- package/lib/plugin/index.cjs +7 -0
- package/{src/plugin/plugin-factory/plugin-factory.ts → lib/plugin/plugin-factory/plugin-factory.cjs} +137 -182
- package/lib/props/common.cjs +17 -0
- package/lib/props/editor/array.cjs +14 -0
- package/lib/props/editor/autocomplete.cjs +14 -0
- package/lib/props/editor/cascader.cjs +14 -0
- package/lib/props/editor/check-box-list.cjs +14 -0
- package/lib/props/editor/check-box.cjs +14 -0
- package/lib/props/editor/code.cjs +23 -0
- package/lib/props/editor/color-picker.cjs +14 -0
- package/lib/props/editor/common.cjs +62 -0
- package/lib/props/editor/data-picker.cjs +14 -0
- package/lib/props/editor/date-picker.cjs +14 -0
- package/lib/props/editor/date-range.cjs +14 -0
- package/lib/props/editor/dropdown-list.cjs +14 -0
- package/lib/props/editor/html.cjs +14 -0
- package/lib/props/editor/index.cjs +86 -0
- package/lib/props/editor/list-box.cjs +14 -0
- package/lib/props/editor/markdown.cjs +22 -0
- package/lib/props/editor/number-range.cjs +14 -0
- package/lib/props/editor/radio-button-list.cjs +14 -0
- package/lib/props/editor/rate.cjs +14 -0
- package/lib/props/editor/raw.cjs +14 -0
- package/lib/props/editor/slider.cjs +14 -0
- package/lib/props/editor/span.cjs +14 -0
- package/lib/props/editor/stepper.cjs +14 -0
- package/lib/props/editor/switch.cjs +14 -0
- package/lib/props/editor/text-box.cjs +30 -0
- package/lib/props/editor/upload.cjs +14 -0
- package/lib/props/index.cjs +89 -0
- package/lib/use/click-outside/click-outside.cjs +50 -0
- package/lib/use/control/index.cjs +7 -0
- package/lib/use/control/use-control-controller/use-control-controller.cjs +78 -0
- package/lib/use/event/event.cjs +39 -0
- package/lib/use/focus-blur/focus-blur.cjs +48 -0
- package/lib/use/index.cjs +34 -0
- package/lib/use/namespace/namespace.cjs +10 -0
- package/lib/use/route/route.cjs +31 -0
- package/lib/use/util/index.cjs +14 -0
- package/lib/use/view/index.cjs +7 -0
- package/lib/use/view/use-view-controller/use-view-controller.cjs +86 -0
- package/lib/use/vue/vue.cjs +64 -0
- package/lib/util/control/prepare-control.cjs +24 -0
- package/lib/util/index.cjs +43 -0
- package/lib/util/install.cjs +11 -0
- package/lib/util/overlay-container/overlay-container.cjs +116 -0
- package/lib/util/overlay-popover-container/overlay-popover-container.cjs +12 -0
- package/lib/util/overlay-view-util/overlay-view-util.cjs +70 -0
- package/lib/util/render/render.cjs +22 -0
- package/lib/util/route/route-listener.cjs +75 -0
- package/lib/util/route/route.cjs +302 -0
- package/lib/util/router-callback/router-callback-item.cjs +74 -0
- package/{src/util/router-callback/router-callback.ts → lib/util/router-callback/router-callback.cjs} +33 -37
- package/lib/util/store/app-store/app-store.cjs +12 -0
- package/lib/util/store/index.cjs +12 -0
- package/lib/util/store/ui-store/ui-store.cjs +17 -0
- package/lib/util/store/ui-store/z-index.cjs +20 -0
- package/lib/view/app-redirect-view/app-redirect-view.cjs +29 -0
- package/lib/view/common/index.cjs +15 -0
- package/lib/view/common/view.cjs +129 -0
- package/lib/view/common/view.css +1 -0
- package/lib/view/common/view.provider.cjs +10 -0
- package/lib/view/de-redirect-view/de-redirect-view.cjs +64 -0
- package/lib/view/de-redirect-view/de-redirect-view.provider.cjs +10 -0
- package/lib/view/de-redirect-view/index.cjs +22 -0
- package/lib/view/index.cjs +15 -0
- package/lib/view/portal-view/index.cjs +23 -0
- package/lib/view/portal-view/portal-view.cjs +95 -0
- package/lib/view/portal-view/portal-view.provider.cjs +10 -0
- package/lib/view/todo-redirect/todo-redirect.cjs +54 -0
- package/package.json +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 -393
- package/src/panel-component/nav-pos/nav-pos.provider.ts +0 -38
- package/src/panel-component/nav-pos/nav-pos.scss +0 -4
- package/src/panel-component/nav-pos/nav-pos.state.ts +0 -52
- package/src/panel-component/nav-pos/nav-pos.tsx +0 -121
- package/src/panel-component/panel-container/index.ts +0 -27
- package/src/panel-component/panel-container/panel-container.controller.ts +0 -18
- package/src/panel-component/panel-container/panel-container.provider.ts +0 -30
- package/src/panel-component/panel-container/panel-container.scss +0 -15
- package/src/panel-component/panel-container/panel-container.state.ts +0 -12
- package/src/panel-component/panel-container/panel-container.tsx +0 -72
- package/src/panel-component/panel-container-group/index.ts +0 -22
- package/src/panel-component/panel-container-group/panel-container-group.controller.ts +0 -43
- package/src/panel-component/panel-container-group/panel-container-group.provider.ts +0 -30
- package/src/panel-component/panel-container-group/panel-container-group.scss +0 -91
- package/src/panel-component/panel-container-group/panel-container-group.state.ts +0 -12
- package/src/panel-component/panel-container-group/panel-container-group.tsx +0 -112
- package/src/panel-component/panel-container-image/index.ts +0 -22
- package/src/panel-component/panel-container-image/panel-container-image.controller.ts +0 -18
- package/src/panel-component/panel-container-image/panel-container-image.provider.ts +0 -30
- package/src/panel-component/panel-container-image/panel-container-image.scss +0 -18
- package/src/panel-component/panel-container-image/panel-container-image.state.ts +0 -12
- package/src/panel-component/panel-container-image/panel-container-image.tsx +0 -95
- package/src/panel-component/panel-ctrl-pos/index.ts +0 -14
- package/src/panel-component/panel-ctrl-pos/panel-ctrl-pos.controller.ts +0 -53
- package/src/panel-component/panel-ctrl-pos/panel-ctrl-pos.provider.ts +0 -30
- package/src/panel-component/panel-ctrl-pos/panel-ctrl-pos.scss +0 -8
- package/src/panel-component/panel-ctrl-pos/panel-ctrl-pos.tsx +0 -53
- package/src/panel-component/panel-field/index.ts +0 -14
- package/src/panel-component/panel-field/panel-field.controller.ts +0 -174
- package/src/panel-component/panel-field/panel-field.provider.ts +0 -28
- package/src/panel-component/panel-field/panel-field.scss +0 -36
- package/src/panel-component/panel-field/panel-field.state.ts +0 -12
- package/src/panel-component/panel-field/panel-field.tsx +0 -81
- package/src/panel-component/panel-item-render/index.ts +0 -18
- package/src/panel-component/panel-item-render/panel-item-render.controller.ts +0 -52
- package/src/panel-component/panel-item-render/panel-item-render.provider.ts +0 -30
- package/src/panel-component/panel-item-render/panel-item-render.tsx +0 -50
- package/src/panel-component/panel-rawitem/index.ts +0 -26
- package/src/panel-component/panel-rawitem/panel-rawitem.controller.ts +0 -34
- package/src/panel-component/panel-rawitem/panel-rawitem.provider.ts +0 -28
- package/src/panel-component/panel-rawitem/panel-rawitem.scss +0 -8
- package/src/panel-component/panel-rawitem/panel-rawitem.tsx +0 -61
- package/src/panel-component/panel-tab-page/index.ts +0 -12
- package/src/panel-component/panel-tab-page/panel-tab-page.provider.ts +0 -27
- package/src/panel-component/panel-tab-page/panel-tab-page.tsx +0 -55
- package/src/panel-component/scroll-container/index.ts +0 -44
- package/src/panel-component/scroll-container/scroll-container/index.ts +0 -2
- package/src/panel-component/scroll-container/scroll-container/scroll-container.controller.ts +0 -32
- package/src/panel-component/scroll-container/scroll-container/scroll-container.provider.ts +0 -30
- package/src/panel-component/scroll-container/scroll-container/scroll-container.scss +0 -34
- package/src/panel-component/scroll-container/scroll-container/scroll-container.tsx +0 -110
- package/src/panel-component/scroll-container/scroll-container-item/index.ts +0 -2
- package/src/panel-component/scroll-container/scroll-container-item/scroll-container-item.controller.ts +0 -25
- package/src/panel-component/scroll-container/scroll-container-item/scroll-container-item.provider.ts +0 -30
- package/src/panel-component/scroll-container/scroll-container-item/scroll-container-item.scss +0 -9
- package/src/panel-component/scroll-container/scroll-container-item/scroll-container-item.tsx +0 -60
- package/src/panel-component/single-data-container/index.ts +0 -22
- package/src/panel-component/single-data-container/single-data-container.controller.ts +0 -345
- package/src/panel-component/single-data-container/single-data-container.provider.ts +0 -30
- package/src/panel-component/single-data-container/single-data-container.scss +0 -10
- package/src/panel-component/single-data-container/single-data-container.state.ts +0 -20
- package/src/panel-component/single-data-container/single-data-container.tsx +0 -95
- package/src/plugin/index.ts +0 -1
- package/src/props/common.ts +0 -30
- package/src/props/editor/array.ts +0 -27
- package/src/props/editor/autocomplete.ts +0 -27
- package/src/props/editor/cascader.ts +0 -27
- package/src/props/editor/check-box-list.ts +0 -27
- package/src/props/editor/check-box.ts +0 -27
- package/src/props/editor/code.ts +0 -36
- package/src/props/editor/color-picker.ts +0 -27
- package/src/props/editor/common.ts +0 -94
- package/src/props/editor/data-picker.ts +0 -27
- package/src/props/editor/date-picker.ts +0 -27
- package/src/props/editor/date-range.ts +0 -23
- package/src/props/editor/dropdown-list.ts +0 -27
- package/src/props/editor/html.ts +0 -27
- package/src/props/editor/index.ts +0 -25
- package/src/props/editor/list-box.ts +0 -27
- package/src/props/editor/markdown.ts +0 -35
- package/src/props/editor/number-range.ts +0 -23
- package/src/props/editor/radio-button-list.ts +0 -27
- package/src/props/editor/rate.ts +0 -23
- package/src/props/editor/raw.ts +0 -23
- package/src/props/editor/slider.ts +0 -23
- package/src/props/editor/span.ts +0 -27
- package/src/props/editor/stepper.ts +0 -23
- package/src/props/editor/switch.ts +0 -23
- package/src/props/editor/text-box.ts +0 -79
- package/src/props/editor/upload.ts +0 -27
- package/src/props/index.ts +0 -2
- package/src/types/index.d.ts +0 -8
- package/src/use/click-outside/click-outside.ts +0 -72
- package/src/use/control/index.ts +0 -1
- package/src/use/control/use-control-controller/use-control-controller.ts +0 -153
- package/src/use/event/event.ts +0 -57
- package/src/use/focus-blur/focus-blur.ts +0 -83
- package/src/use/index.ts +0 -9
- package/src/use/namespace/namespace.ts +0 -14
- package/src/use/route/route.ts +0 -47
- package/src/use/util/index.ts +0 -26
- package/src/use/view/index.ts +0 -1
- package/src/use/view/use-view-controller/use-view-controller.ts +0 -153
- package/src/use/vue/vue.ts +0 -142
- package/src/util/control/prepare-control.ts +0 -33
- package/src/util/index.ts +0 -10
- package/src/util/install.ts +0 -14
- package/src/util/overlay-container/overlay-container.ts +0 -155
- package/src/util/overlay-popover-container/overlay-popover-container.ts +0 -30
- package/src/util/overlay-view-util/overlay-view-util.ts +0 -89
- package/src/util/render/render.ts +0 -28
- package/src/util/route/route-listener.ts +0 -91
- package/src/util/route/route.ts +0 -520
- package/src/util/router-callback/router-callback-item.ts +0 -98
- package/src/util/store/app-store/app-store.ts +0 -10
- package/src/util/store/index.ts +0 -6
- package/src/util/store/ui-store/ui-store.ts +0 -27
- package/src/util/store/ui-store/z-index.ts +0 -53
- package/src/view/app-redirect-view/app-redirect-view.tsx +0 -26
- package/src/view/common/index.ts +0 -10
- package/src/view/common/view.provider.ts +0 -14
- package/src/view/common/view.scss +0 -38
- package/src/view/common/view.tsx +0 -152
- package/src/view/de-redirect-view/de-redirect-view.provider.ts +0 -14
- package/src/view/de-redirect-view/de-redirect-view.tsx +0 -62
- package/src/view/de-redirect-view/index.ts +0 -17
- package/src/view/index.ts +0 -5
- package/src/view/portal-view/index.ts +0 -18
- package/src/view/portal-view/portal-view.provider.ts +0 -14
- package/src/view/portal-view/portal-view.tsx +0 -79
- package/src/view/todo-redirect/todo-redirect.tsx +0 -51
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
defineComponent,
|
|
3
|
-
h,
|
|
4
|
-
PropType,
|
|
5
|
-
resolveComponent,
|
|
6
|
-
VNode,
|
|
7
|
-
watch,
|
|
8
|
-
} from 'vue';
|
|
9
|
-
import { IPanelRawItem } from '@ibiz/model-core';
|
|
10
|
-
import { EventBase } from '@ibiz-template/runtime';
|
|
11
|
-
import { useRoute, useRouter } from 'vue-router';
|
|
12
|
-
import { NavPosController } from './nav-pos.controller';
|
|
13
|
-
import './nav-pos.scss';
|
|
14
|
-
import { useNamespace } from '../../use';
|
|
15
|
-
import { getNestedRoutePath } from '../../util';
|
|
16
|
-
|
|
17
|
-
export const NavPos = defineComponent({
|
|
18
|
-
name: 'IBizNavPos',
|
|
19
|
-
props: {
|
|
20
|
-
modelData: {
|
|
21
|
-
type: Object as PropType<IPanelRawItem>,
|
|
22
|
-
required: true,
|
|
23
|
-
},
|
|
24
|
-
controller: {
|
|
25
|
-
type: NavPosController,
|
|
26
|
-
required: true,
|
|
27
|
-
},
|
|
28
|
-
},
|
|
29
|
-
setup(props) {
|
|
30
|
-
const c = props.controller;
|
|
31
|
-
const ns = useNamespace('nav-pos');
|
|
32
|
-
const onViewCreated = (event: EventBase): void => {
|
|
33
|
-
c.onViewCreated(event);
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
const router = useRouter();
|
|
37
|
-
const route = useRoute();
|
|
38
|
-
|
|
39
|
-
c.setRouter(router);
|
|
40
|
-
|
|
41
|
-
if (c.routeDepth) {
|
|
42
|
-
// 计算当前导航视图对应层级路由的路径,删除了srfnav
|
|
43
|
-
const expViewRoutePath = getNestedRoutePath(route, c.routeDepth!);
|
|
44
|
-
watch(
|
|
45
|
-
() => route.fullPath,
|
|
46
|
-
() => {
|
|
47
|
-
const currentRoutePath = getNestedRoutePath(route, c.routeDepth!);
|
|
48
|
-
// 前面路由不是当前导航视图的不走
|
|
49
|
-
// 路由跳转匹配层级不比导航视图层级高的不走。如分页关系的表单对应的事导航视图的路由。
|
|
50
|
-
if (
|
|
51
|
-
expViewRoutePath === currentRoutePath &&
|
|
52
|
-
route.matched.length > c.routeDepth!
|
|
53
|
-
) {
|
|
54
|
-
c.onRouteChange(route);
|
|
55
|
-
}
|
|
56
|
-
},
|
|
57
|
-
{ immediate: true },
|
|
58
|
-
);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
return { ns, c, onViewCreated };
|
|
62
|
-
},
|
|
63
|
-
render() {
|
|
64
|
-
const { viewModals, state } = this.c;
|
|
65
|
-
const { currentKey, cacheKeys, navViewMsgs, cache } = state;
|
|
66
|
-
let content: VNode | null = null;
|
|
67
|
-
if (state.routeOpen) {
|
|
68
|
-
content = (
|
|
69
|
-
<iBizRouterView
|
|
70
|
-
manualKey={currentKey}
|
|
71
|
-
modal={viewModals[currentKey]}
|
|
72
|
-
onCreated={this.onViewCreated}
|
|
73
|
-
>
|
|
74
|
-
{({ Component }: { Component: string }): VNode | null => {
|
|
75
|
-
const routerContent =
|
|
76
|
-
currentKey === '' || !Component
|
|
77
|
-
? null
|
|
78
|
-
: ((<Component />) as VNode);
|
|
79
|
-
|
|
80
|
-
return cache ? (
|
|
81
|
-
<keepAlive include={cacheKeys} max={30} isKey>
|
|
82
|
-
{routerContent}
|
|
83
|
-
</keepAlive>
|
|
84
|
-
) : (
|
|
85
|
-
routerContent
|
|
86
|
-
);
|
|
87
|
-
}}
|
|
88
|
-
</iBizRouterView>
|
|
89
|
-
);
|
|
90
|
-
} else {
|
|
91
|
-
const view = currentKey
|
|
92
|
-
? h(resolveComponent('IBizViewShell'), {
|
|
93
|
-
context: navViewMsgs[currentKey].context,
|
|
94
|
-
params: navViewMsgs[currentKey].params,
|
|
95
|
-
key: currentKey,
|
|
96
|
-
viewId: navViewMsgs[currentKey].viewId,
|
|
97
|
-
onCreated: this.onViewCreated,
|
|
98
|
-
})
|
|
99
|
-
: null;
|
|
100
|
-
content = cache ? (
|
|
101
|
-
<keepAlive include={cacheKeys} max={30} isKey>
|
|
102
|
-
{view}
|
|
103
|
-
</keepAlive>
|
|
104
|
-
) : (
|
|
105
|
-
view
|
|
106
|
-
);
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
return (
|
|
110
|
-
<div
|
|
111
|
-
class={[
|
|
112
|
-
this.ns.b(),
|
|
113
|
-
this.ns.m(this.modelData.id),
|
|
114
|
-
...this.controller.containerClass,
|
|
115
|
-
]}
|
|
116
|
-
>
|
|
117
|
-
{content}
|
|
118
|
-
</div>
|
|
119
|
-
);
|
|
120
|
-
},
|
|
121
|
-
});
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { App } from 'vue';
|
|
2
|
-
import { registerPanelItemProvider } from '@ibiz-template/runtime';
|
|
3
|
-
import { withInstall } from '../../util';
|
|
4
|
-
import { PanelContainer } from './panel-container';
|
|
5
|
-
import { PanelContainerProvider } from './panel-container.provider';
|
|
6
|
-
import { PanelContainerState } from './panel-container.state';
|
|
7
|
-
import { PanelContainerController } from './panel-container.controller';
|
|
8
|
-
|
|
9
|
-
export { PanelContainerState, PanelContainerController };
|
|
10
|
-
|
|
11
|
-
export const IBizPanelContainer = withInstall(
|
|
12
|
-
PanelContainer,
|
|
13
|
-
function (v: App) {
|
|
14
|
-
v.component(PanelContainer.name, PanelContainer);
|
|
15
|
-
registerPanelItemProvider('CONTAINER', () => new PanelContainerProvider());
|
|
16
|
-
registerPanelItemProvider(
|
|
17
|
-
'CONTAINER_DEFAULT',
|
|
18
|
-
() => new PanelContainerProvider(),
|
|
19
|
-
);
|
|
20
|
-
// registerPanelItemProvider(
|
|
21
|
-
// 'CONTAINER_CONTAINER_GRID',
|
|
22
|
-
// () => new PanelContainerProvider(),
|
|
23
|
-
// );
|
|
24
|
-
},
|
|
25
|
-
);
|
|
26
|
-
|
|
27
|
-
export default IBizPanelContainer;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { PanelItemController } from '@ibiz-template/runtime';
|
|
2
|
-
import { IPanelContainer } from '@ibiz/model-core';
|
|
3
|
-
import { PanelContainerState } from './panel-container.state';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* 面板容器控制器
|
|
7
|
-
*
|
|
8
|
-
* @export
|
|
9
|
-
* @class PanelContainerController
|
|
10
|
-
* @extends {PanelItemController}
|
|
11
|
-
*/
|
|
12
|
-
export class PanelContainerController extends PanelItemController<IPanelContainer> {
|
|
13
|
-
declare state: PanelContainerState;
|
|
14
|
-
|
|
15
|
-
protected createState(): PanelContainerState {
|
|
16
|
-
return new PanelContainerState(this.parent?.state);
|
|
17
|
-
}
|
|
18
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
IPanelItemProvider,
|
|
3
|
-
PanelController,
|
|
4
|
-
PanelItemController,
|
|
5
|
-
} from '@ibiz-template/runtime';
|
|
6
|
-
import { IPanelContainer } from '@ibiz/model-core';
|
|
7
|
-
import { PanelContainerController } from './panel-container.controller';
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* 面板容器适配器
|
|
11
|
-
*
|
|
12
|
-
* @author lxm
|
|
13
|
-
* @date 2022-09-19 22:09:03
|
|
14
|
-
* @export
|
|
15
|
-
* @class PanelContainerProvider
|
|
16
|
-
* @implements {EditorProvider}
|
|
17
|
-
*/
|
|
18
|
-
export class PanelContainerProvider implements IPanelItemProvider {
|
|
19
|
-
component: string = 'IBizPanelContainer';
|
|
20
|
-
|
|
21
|
-
async createController(
|
|
22
|
-
panelItem: IPanelContainer,
|
|
23
|
-
panel: PanelController,
|
|
24
|
-
parent: PanelItemController | undefined,
|
|
25
|
-
): Promise<PanelItemController> {
|
|
26
|
-
const c = new PanelContainerController(panelItem, panel, parent);
|
|
27
|
-
await c.init();
|
|
28
|
-
return c;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { PanelItemState } from '@ibiz-template/runtime';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* 面板容器状态
|
|
5
|
-
*
|
|
6
|
-
* @author lxm
|
|
7
|
-
* @date 2023-02-07 06:04:27
|
|
8
|
-
* @export
|
|
9
|
-
* @class PanelContainerState
|
|
10
|
-
* @extends {PanelItemState}
|
|
11
|
-
*/
|
|
12
|
-
export class PanelContainerState extends PanelItemState {}
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import { IPanelContainer } from '@ibiz/model-core';
|
|
2
|
-
import { computed, defineComponent, PropType, VNode } from 'vue';
|
|
3
|
-
import { useNamespace } from '../../use';
|
|
4
|
-
import { PanelContainerController } from './panel-container.controller';
|
|
5
|
-
import './panel-container.scss';
|
|
6
|
-
|
|
7
|
-
export const PanelContainer = defineComponent({
|
|
8
|
-
name: 'IBizPanelContainer',
|
|
9
|
-
props: {
|
|
10
|
-
modelData: {
|
|
11
|
-
type: Object as PropType<IPanelContainer>,
|
|
12
|
-
required: true,
|
|
13
|
-
},
|
|
14
|
-
controller: {
|
|
15
|
-
type: PanelContainerController,
|
|
16
|
-
required: true,
|
|
17
|
-
},
|
|
18
|
-
},
|
|
19
|
-
setup(props) {
|
|
20
|
-
const ns = useNamespace('panel-container');
|
|
21
|
-
const { id } = props.modelData;
|
|
22
|
-
|
|
23
|
-
// 类名控制
|
|
24
|
-
const classArr = computed(() => {
|
|
25
|
-
let result: Array<string | false> = [ns.b(), ns.m(id)];
|
|
26
|
-
result = [
|
|
27
|
-
...result,
|
|
28
|
-
...props.controller.containerClass,
|
|
29
|
-
ns.is('hidden', !props.controller.state.visible),
|
|
30
|
-
];
|
|
31
|
-
return result;
|
|
32
|
-
});
|
|
33
|
-
|
|
34
|
-
return { ns, classArr };
|
|
35
|
-
},
|
|
36
|
-
render() {
|
|
37
|
-
// 内容区默认插槽处理,封装app-col
|
|
38
|
-
const defaultSlots: VNode[] = this.$slots.default?.() || [];
|
|
39
|
-
const content = (
|
|
40
|
-
<iBizRow slot='content' layout={this.modelData.layout}>
|
|
41
|
-
{defaultSlots.map(slot => {
|
|
42
|
-
const props = slot.props as IData;
|
|
43
|
-
if (!props || !props.controller) {
|
|
44
|
-
return slot;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
return (
|
|
48
|
-
<iBizCol
|
|
49
|
-
layoutPos={props.modelData.layoutPos}
|
|
50
|
-
state={props.controller.state}
|
|
51
|
-
>
|
|
52
|
-
{slot}
|
|
53
|
-
</iBizCol>
|
|
54
|
-
);
|
|
55
|
-
})}
|
|
56
|
-
</iBizRow>
|
|
57
|
-
);
|
|
58
|
-
return (
|
|
59
|
-
<div
|
|
60
|
-
class={this.classArr}
|
|
61
|
-
onClick={() => {
|
|
62
|
-
this.controller.onClick();
|
|
63
|
-
}}
|
|
64
|
-
>
|
|
65
|
-
{this.controller.model.cssStyle ? (
|
|
66
|
-
<style type='text/css'>{this.controller.model.cssStyle}</style>
|
|
67
|
-
) : null}
|
|
68
|
-
{content}
|
|
69
|
-
</div>
|
|
70
|
-
);
|
|
71
|
-
},
|
|
72
|
-
});
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { App } from 'vue';
|
|
2
|
-
import { registerPanelItemProvider } from '@ibiz-template/runtime';
|
|
3
|
-
import { PanelContainerGroupState } from './panel-container-group.state';
|
|
4
|
-
import { PanelContainerGroupProvider } from './panel-container-group.provider';
|
|
5
|
-
import { PanelContainerGroupController } from './panel-container-group.controller';
|
|
6
|
-
import { PanelContainerGroup } from './panel-container-group';
|
|
7
|
-
import { withInstall } from '../../util';
|
|
8
|
-
|
|
9
|
-
export { PanelContainerGroupState, PanelContainerGroupController };
|
|
10
|
-
|
|
11
|
-
export const IBizPanelContainerGroup = withInstall(
|
|
12
|
-
PanelContainerGroup,
|
|
13
|
-
function (v: App) {
|
|
14
|
-
v.component(PanelContainerGroup.name, PanelContainerGroup);
|
|
15
|
-
registerPanelItemProvider(
|
|
16
|
-
'CONTAINER_CONTAINER_GROUP',
|
|
17
|
-
() => new PanelContainerGroupProvider(),
|
|
18
|
-
);
|
|
19
|
-
},
|
|
20
|
-
);
|
|
21
|
-
|
|
22
|
-
export default IBizPanelContainerGroup;
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { PanelItemController } from '@ibiz-template/runtime';
|
|
2
|
-
import { IPanelContainer } from '@ibiz/model-core';
|
|
3
|
-
import { PanelContainerGroupState } from './panel-container-group.state';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* 面板分组容器控制器
|
|
7
|
-
*
|
|
8
|
-
* @export
|
|
9
|
-
* @class PanelContainerGroupController
|
|
10
|
-
* @extends {PanelItemController}
|
|
11
|
-
*/
|
|
12
|
-
export class PanelContainerGroupController extends PanelItemController<IPanelContainer> {
|
|
13
|
-
declare state: PanelContainerGroupState;
|
|
14
|
-
|
|
15
|
-
protected createState(): PanelContainerGroupState {
|
|
16
|
-
return new PanelContainerGroupState(this.parent?.state);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* 禁用关闭
|
|
21
|
-
*
|
|
22
|
-
* @author chitanda
|
|
23
|
-
* @date 2022-09-14 14:09:51
|
|
24
|
-
* @readonly
|
|
25
|
-
* @type {boolean}
|
|
26
|
-
*/
|
|
27
|
-
get disableClose(): boolean {
|
|
28
|
-
const { titleBarCloseMode: mode } = this.model;
|
|
29
|
-
return mode === 0 || mode === undefined;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* 是否默认展开分组
|
|
34
|
-
*
|
|
35
|
-
* @author chitanda
|
|
36
|
-
* @date 2022-09-14 14:09:09
|
|
37
|
-
* @readonly
|
|
38
|
-
*/
|
|
39
|
-
get defaultExpansion(): boolean {
|
|
40
|
-
const { titleBarCloseMode: mode } = this.model;
|
|
41
|
-
return this.disableClose || mode === 1;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
IPanelItemProvider,
|
|
3
|
-
PanelController,
|
|
4
|
-
PanelItemController,
|
|
5
|
-
} from '@ibiz-template/runtime';
|
|
6
|
-
import { IPanelContainer } from '@ibiz/model-core';
|
|
7
|
-
import { PanelContainerGroupController } from './panel-container-group.controller';
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* 面板分组容器适配器
|
|
11
|
-
*
|
|
12
|
-
* @author lxm
|
|
13
|
-
* @date 2022-09-19 22:09:03
|
|
14
|
-
* @export
|
|
15
|
-
* @class PanelContainerGroupProvider
|
|
16
|
-
* @implements {EditorProvider}
|
|
17
|
-
*/
|
|
18
|
-
export class PanelContainerGroupProvider implements IPanelItemProvider {
|
|
19
|
-
component: string = 'IBizPanelContainerGroup';
|
|
20
|
-
|
|
21
|
-
async createController(
|
|
22
|
-
panelItem: IPanelContainer,
|
|
23
|
-
panel: PanelController,
|
|
24
|
-
parent: PanelItemController | undefined,
|
|
25
|
-
): Promise<PanelItemController> {
|
|
26
|
-
const c = new PanelContainerGroupController(panelItem, panel, parent);
|
|
27
|
-
await c.init();
|
|
28
|
-
return c;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
$panel-container-group: (
|
|
2
|
-
'bg-color': transparent,
|
|
3
|
-
);
|
|
4
|
-
|
|
5
|
-
$panel-container-group-header: (
|
|
6
|
-
'bg-color': transparent,
|
|
7
|
-
'padding': getCssVar(spacing, base, tight),
|
|
8
|
-
'border-color': getCssVar('color', 'border'),
|
|
9
|
-
'height': 49px,
|
|
10
|
-
);
|
|
11
|
-
|
|
12
|
-
$panel-container-group-caption: (
|
|
13
|
-
'text-color': getCssVar(color, text, 0),
|
|
14
|
-
'font-size': getCssVar('font-size', 'header-5'),
|
|
15
|
-
'font-weight': getCssVar(font-weight, bold),
|
|
16
|
-
);
|
|
17
|
-
|
|
18
|
-
$panel-container-group-content: (
|
|
19
|
-
'bg-color': transparent,
|
|
20
|
-
'padding': getCssVar(spacing, tight),
|
|
21
|
-
);
|
|
22
|
-
|
|
23
|
-
@include b(panel-container-group) {
|
|
24
|
-
@include set-component-css-var('panel-container-group', $panel-container-group);
|
|
25
|
-
@include set-component-css-var('panel-container-group-header', $panel-container-group-header);
|
|
26
|
-
@include set-component-css-var('panel-container-group-caption', $panel-container-group-caption);
|
|
27
|
-
@include set-component-css-var('panel-container-group-content', $panel-container-group-content);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
@include b(panel-container-group) {
|
|
31
|
-
height: 100%;
|
|
32
|
-
background-color: getCssVar('panel-container-group', 'bg-color');
|
|
33
|
-
border-radius: getCssVar('border-radius', 'base');
|
|
34
|
-
|
|
35
|
-
@include e(caption) {
|
|
36
|
-
@include utils-ellipsis;
|
|
37
|
-
|
|
38
|
-
font-size: getCssVar('panel-container-group-caption', 'font-size');
|
|
39
|
-
font-weight: getCssVar('panel-container-group-caption', 'font-weight');
|
|
40
|
-
color: getCssVar('panel-container-group-caption', 'text-color');
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
// 折叠相关样式
|
|
45
|
-
@include b(panel-container-group-collapse) {
|
|
46
|
-
> .#{bem(panel-container-group-content)} {
|
|
47
|
-
display: block;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
@include when(collapse) {
|
|
51
|
-
> .#{bem(panel-container-group-content)} {
|
|
52
|
-
display: none;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
@include b(panel-container-group-header) {
|
|
58
|
-
@include flex;
|
|
59
|
-
|
|
60
|
-
height: getCssVar('panel-container-group-header', 'height');
|
|
61
|
-
padding: getCssVar('panel-container-group-header', 'padding');
|
|
62
|
-
margin: getCssVar('panel-container-group-header', 'margin');
|
|
63
|
-
border-bottom: 1px solid getCssVar('panel-container-group-header', 'border-color');
|
|
64
|
-
|
|
65
|
-
@include e((left, right)) {
|
|
66
|
-
display: inline-block;
|
|
67
|
-
width: 50%;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
@include e(right) {
|
|
71
|
-
text-align: right;
|
|
72
|
-
@include flex(row, flex-end, center);
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
@include b(panel-container-group-content) {
|
|
77
|
-
width: 100%;
|
|
78
|
-
height: 100%;
|
|
79
|
-
> .#{bem('row')}{
|
|
80
|
-
width: 100%;
|
|
81
|
-
height: 100%;
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
.#{bem('panel-container-group', '', 'show-header')} {
|
|
86
|
-
> .#{bem('panel-container-group-content')} {
|
|
87
|
-
height: calc(100% - getCssVar('panel-container-group-header', 'height'));
|
|
88
|
-
padding: getCssVar('panel-container-group-content', 'padding');
|
|
89
|
-
background-color: getCssVar('panel-container-group-content', 'bg-color');
|
|
90
|
-
}
|
|
91
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { PanelItemState } from '@ibiz-template/runtime';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* 面板分组容器状态
|
|
5
|
-
*
|
|
6
|
-
* @author lxm
|
|
7
|
-
* @date 2023-02-07 06:04:27
|
|
8
|
-
* @export
|
|
9
|
-
* @class PanelContainerGroupState
|
|
10
|
-
* @extends {PanelItemState}
|
|
11
|
-
*/
|
|
12
|
-
export class PanelContainerGroupState extends PanelItemState {}
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
import { IPanelContainer } from '@ibiz/model-core';
|
|
2
|
-
import { computed, defineComponent, PropType, ref, VNode } from 'vue';
|
|
3
|
-
import { PanelContainerGroupController } from './panel-container-group.controller';
|
|
4
|
-
import './panel-container-group.scss';
|
|
5
|
-
import { useNamespace } from '../../use';
|
|
6
|
-
|
|
7
|
-
export const PanelContainerGroup = defineComponent({
|
|
8
|
-
name: 'IBizPanelContainerGroup',
|
|
9
|
-
props: {
|
|
10
|
-
modelData: {
|
|
11
|
-
type: Object as PropType<IPanelContainer>,
|
|
12
|
-
required: true,
|
|
13
|
-
},
|
|
14
|
-
controller: {
|
|
15
|
-
type: PanelContainerGroupController,
|
|
16
|
-
required: true,
|
|
17
|
-
},
|
|
18
|
-
},
|
|
19
|
-
setup(props) {
|
|
20
|
-
const ns = useNamespace('panel-container-group');
|
|
21
|
-
|
|
22
|
-
const isCollapse = ref(!props.controller.defaultExpansion);
|
|
23
|
-
|
|
24
|
-
const changeCollapse = (): void => {
|
|
25
|
-
if (!props.controller.disableClose) {
|
|
26
|
-
isCollapse.value = !isCollapse.value;
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
const captionText = computed(() => {
|
|
31
|
-
const { captionItemName, caption, capLanguageRes } = props.modelData;
|
|
32
|
-
if (captionItemName) {
|
|
33
|
-
return props.controller.data[captionItemName];
|
|
34
|
-
}
|
|
35
|
-
let text = caption;
|
|
36
|
-
if (capLanguageRes) {
|
|
37
|
-
text = ibiz.i18n.t(capLanguageRes.lanResTag!, caption);
|
|
38
|
-
}
|
|
39
|
-
return text;
|
|
40
|
-
});
|
|
41
|
-
|
|
42
|
-
return { ns, captionText, changeCollapse, isCollapse };
|
|
43
|
-
},
|
|
44
|
-
render() {
|
|
45
|
-
const classArr: string[] = [
|
|
46
|
-
this.ns.b(),
|
|
47
|
-
this.ns.m(this.modelData.id),
|
|
48
|
-
...this.controller.containerClass,
|
|
49
|
-
this.ns.is('hidden', !this.controller.state.visible),
|
|
50
|
-
];
|
|
51
|
-
if (this.modelData.showCaption === true) {
|
|
52
|
-
classArr.push(this.ns.m('show-header'));
|
|
53
|
-
classArr.push(this.ns.b('collapse'));
|
|
54
|
-
classArr.push(this.ns.is('collapse', this.isCollapse));
|
|
55
|
-
if (this.controller.disableClose) {
|
|
56
|
-
classArr.push(this.ns.bm('collapse', 'disable-close'));
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
// 内容区默认插槽处理,封装app-col
|
|
61
|
-
const defaultSlots: VNode[] = this.$slots.default?.() || [];
|
|
62
|
-
const content = (
|
|
63
|
-
<iBizRow slot='content' layout={this.modelData.layout}>
|
|
64
|
-
{defaultSlots.map(slot => {
|
|
65
|
-
const props = slot.props as IData;
|
|
66
|
-
if (!props || !props.controller) {
|
|
67
|
-
return slot;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
return (
|
|
71
|
-
<iBizCol
|
|
72
|
-
layoutPos={props.modelData.layoutPos}
|
|
73
|
-
state={props.controller.state}
|
|
74
|
-
>
|
|
75
|
-
{slot}
|
|
76
|
-
</iBizCol>
|
|
77
|
-
);
|
|
78
|
-
})}
|
|
79
|
-
</iBizRow>
|
|
80
|
-
);
|
|
81
|
-
|
|
82
|
-
// 头部绘制
|
|
83
|
-
let header: unknown = null;
|
|
84
|
-
if (this.modelData.showCaption) {
|
|
85
|
-
header = (
|
|
86
|
-
<div class={[this.ns.b('header')]} onClick={this.changeCollapse}>
|
|
87
|
-
<div class={[this.ns.be('header', 'left')]}>
|
|
88
|
-
<div class={[this.ns.e('caption'), ...this.controller.labelClass]}>
|
|
89
|
-
{this.captionText}
|
|
90
|
-
</div>
|
|
91
|
-
</div>
|
|
92
|
-
<div class={[this.ns.be('header', 'right')]}>
|
|
93
|
-
{this.modelData.titleBarCloseMode !== undefined &&
|
|
94
|
-
this.modelData.titleBarCloseMode !== 0 &&
|
|
95
|
-
(this.isCollapse ? (
|
|
96
|
-
<ion-icon name='caret-forward-sharp' />
|
|
97
|
-
) : (
|
|
98
|
-
<ion-icon name='caret-down-sharp' />
|
|
99
|
-
))}
|
|
100
|
-
</div>
|
|
101
|
-
</div>
|
|
102
|
-
);
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
return (
|
|
106
|
-
<div class={classArr}>
|
|
107
|
-
{header}
|
|
108
|
-
<div class={[this.ns.b('content')]}>{content}</div>
|
|
109
|
-
</div>
|
|
110
|
-
);
|
|
111
|
-
},
|
|
112
|
-
});
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { App } from 'vue';
|
|
2
|
-
import { registerPanelItemProvider } from '@ibiz-template/runtime';
|
|
3
|
-
import { withInstall } from '../../util';
|
|
4
|
-
import { PanelContainerImage } from './panel-container-image';
|
|
5
|
-
import { PanelContainerImageProvider } from './panel-container-image.provider';
|
|
6
|
-
import { PanelContainerImageState } from './panel-container-image.state';
|
|
7
|
-
import { PanelContainerImageController } from './panel-container-image.controller';
|
|
8
|
-
|
|
9
|
-
export { PanelContainerImageState, PanelContainerImageController };
|
|
10
|
-
|
|
11
|
-
export const IBizPanelContainerImage = withInstall(
|
|
12
|
-
PanelContainerImage,
|
|
13
|
-
function (v: App) {
|
|
14
|
-
v.component(PanelContainerImage.name, PanelContainerImage);
|
|
15
|
-
registerPanelItemProvider(
|
|
16
|
-
'CONTAINER_CONTAINER_IMAGE',
|
|
17
|
-
() => new PanelContainerImageProvider(),
|
|
18
|
-
);
|
|
19
|
-
},
|
|
20
|
-
);
|
|
21
|
-
|
|
22
|
-
export default IBizPanelContainerImage;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { PanelItemController } from '@ibiz-template/runtime';
|
|
2
|
-
import { IPanelContainer } from '@ibiz/model-core';
|
|
3
|
-
import { PanelContainerImageState } from './panel-container-image.state';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* 面板图片容器控制器
|
|
7
|
-
*
|
|
8
|
-
* @export
|
|
9
|
-
* @class PanelContainerImageController
|
|
10
|
-
* @extends {PanelItemController}
|
|
11
|
-
*/
|
|
12
|
-
export class PanelContainerImageController extends PanelItemController<IPanelContainer> {
|
|
13
|
-
declare state: PanelContainerImageState;
|
|
14
|
-
|
|
15
|
-
protected createState(): PanelContainerImageState {
|
|
16
|
-
return new PanelContainerImageState(this.parent?.state);
|
|
17
|
-
}
|
|
18
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
IPanelItemProvider,
|
|
3
|
-
PanelController,
|
|
4
|
-
PanelItemController,
|
|
5
|
-
} from '@ibiz-template/runtime';
|
|
6
|
-
import { IPanelContainer } from '@ibiz/model-core';
|
|
7
|
-
import { PanelContainerImageController } from './panel-container-image.controller';
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* 面板图片容器适配器
|
|
11
|
-
*
|
|
12
|
-
* @author lxm
|
|
13
|
-
* @date 2022-09-19 22:09:03
|
|
14
|
-
* @export
|
|
15
|
-
* @class PanelContainerImageProvider
|
|
16
|
-
* @implements {EditorProvider}
|
|
17
|
-
*/
|
|
18
|
-
export class PanelContainerImageProvider implements IPanelItemProvider {
|
|
19
|
-
component: string = 'IBizPanelContainerImage';
|
|
20
|
-
|
|
21
|
-
async createController(
|
|
22
|
-
panelItem: IPanelContainer,
|
|
23
|
-
panel: PanelController,
|
|
24
|
-
parent: PanelItemController | undefined,
|
|
25
|
-
): Promise<PanelItemController> {
|
|
26
|
-
const c = new PanelContainerImageController(panelItem, panel, parent);
|
|
27
|
-
await c.init();
|
|
28
|
-
return c;
|
|
29
|
-
}
|
|
30
|
-
}
|