@ibiz-template/vue3-util 0.7.41-alpha.13 → 0.7.41-alpha.131
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/common/badge/badge.css +1 -1
- package/es/common/badge/badge.d.ts +6 -8
- package/es/common/badge/badge.d.ts.map +1 -1
- package/es/common/badge/badge.mjs +13 -7
- package/es/common/code-list/code-list.d.ts +10 -10
- package/es/common/code-list/code-list.d.ts.map +1 -1
- package/es/common/code-list/code-list.mjs +1 -1
- package/es/common/control-base/control-base.d.ts.map +1 -1
- package/es/common/control-base/control-base.mjs +9 -15
- package/es/common/control-loading-placeholder/control-loading-placeholder.d.ts +4 -4
- package/es/common/control-loading-placeholder/control-loading-placeholder.d.ts.map +1 -1
- package/es/common/control-shell/control-shell.d.ts +7 -7
- package/es/common/control-shell/control-shell.d.ts.map +1 -1
- package/es/common/control-shell/control-shell.mjs +1 -1
- package/es/common/custom-render/custom-render.d.ts +4 -4
- package/es/common/custom-render/custom-render.d.ts.map +1 -1
- package/es/common/icon/icon.d.ts +4 -4
- package/es/common/icon/icon.d.ts.map +1 -1
- package/es/common/icon/icon.mjs +12 -0
- package/es/common/index.d.ts +1 -0
- package/es/common/index.d.ts.map +1 -1
- package/es/common/index.mjs +1 -0
- package/es/common/router-view/router-view.d.ts +7 -8
- package/es/common/router-view/router-view.d.ts.map +1 -1
- package/es/common/router-view/router-view.mjs +1 -1
- package/es/common/signature-pad/signature-pad.css +1 -0
- package/es/common/signature-pad/signature-pad.d.ts +19 -0
- package/es/common/signature-pad/signature-pad.d.ts.map +1 -0
- package/es/common/signature-pad/signature-pad.mjs +165 -0
- package/es/common/signature-pad/util/bezier.d.ts +58 -0
- package/es/common/signature-pad/util/bezier.d.ts.map +1 -0
- package/es/common/signature-pad/util/bezier.mjs +109 -0
- package/es/common/signature-pad/util/point.d.ts +55 -0
- package/es/common/signature-pad/util/point.d.ts.map +1 -0
- package/es/common/signature-pad/util/point.mjs +51 -0
- package/es/common/signature-pad/util/signature_pad.d.ts +593 -0
- package/es/common/signature-pad/util/signature_pad.d.ts.map +1 -0
- package/es/common/signature-pad/util/signature_pad.mjs +1018 -0
- package/es/common/view-shell/view-shell.d.ts +19 -12
- package/es/common/view-shell/view-shell.d.ts.map +1 -1
- package/es/common/view-shell/view-shell.mjs +42 -23
- package/es/control/panel/panel/index.d.ts +5 -5
- package/es/control/panel/panel/index.d.ts.map +1 -1
- package/es/control/panel/panel/panel.d.ts +6 -6
- package/es/control/panel/panel/panel.d.ts.map +1 -1
- package/es/control/panel/panel/panel.mjs +13 -5
- package/es/control/panel/view-layout-panel/index.d.ts +5 -5
- package/es/control/panel/view-layout-panel/index.d.ts.map +1 -1
- package/es/control/panel/view-layout-panel/view-layout-panel.d.ts +7 -7
- package/es/control/panel/view-layout-panel/view-layout-panel.d.ts.map +1 -1
- package/es/control/panel/view-layout-panel/view-layout-panel.mjs +6 -6
- package/es/index.mjs +9 -11
- package/es/locale/en/index.d.ts +1 -0
- package/es/locale/en/index.d.ts.map +1 -1
- package/es/locale/en/index.mjs +2 -1
- package/es/locale/zh-CN/index.d.ts +1 -0
- package/es/locale/zh-CN/index.d.ts.map +1 -1
- package/es/locale/zh-CN/index.mjs +2 -1
- package/es/node_modules/.pnpm/path-browserify@1.0.1/node_modules/path-browserify/index.mjs +2 -2
- package/es/panel-component/auth-wxmp-qrcode/auth-wxmp-qrcode.controller.d.ts.map +1 -1
- package/es/panel-component/auth-wxmp-qrcode/auth-wxmp-qrcode.controller.mjs +3 -1
- package/es/panel-component/auth-wxmp-qrcode/auth-wxmp-qrcode.css +1 -1
- package/es/panel-component/auth-wxmp-qrcode/auth-wxmp-qrcode.d.ts +6 -4
- package/es/panel-component/auth-wxmp-qrcode/auth-wxmp-qrcode.d.ts.map +1 -1
- package/es/panel-component/auth-wxmp-qrcode/auth-wxmp-qrcode.mjs +17 -6
- package/es/panel-component/auth-wxmp-qrcode/index.d.ts +6 -4
- package/es/panel-component/auth-wxmp-qrcode/index.d.ts.map +1 -1
- package/es/panel-component/grid-container/grid-container.controller.d.ts +3 -3
- package/es/panel-component/grid-container/grid-container.controller.d.ts.map +1 -1
- package/es/panel-component/grid-container/grid-container.controller.mjs +2 -2
- package/es/panel-component/grid-container/grid-container.d.ts +8 -6
- package/es/panel-component/grid-container/grid-container.d.ts.map +1 -1
- package/es/panel-component/grid-container/grid-container.mjs +17 -6
- package/es/panel-component/grid-container/grid-container.state.d.ts +3 -3
- package/es/panel-component/grid-container/grid-container.state.d.ts.map +1 -1
- package/es/panel-component/grid-container/grid-container.state.mjs +2 -2
- package/es/panel-component/grid-container/index.d.ts +8 -6
- package/es/panel-component/grid-container/index.d.ts.map +1 -1
- package/es/panel-component/index.d.ts +0 -1
- package/es/panel-component/index.d.ts.map +1 -1
- package/es/panel-component/index.mjs +1 -5
- package/es/panel-component/multi-data-container/index.d.ts +6 -4
- package/es/panel-component/multi-data-container/index.d.ts.map +1 -1
- package/es/panel-component/multi-data-container/multi-data-container.controller.d.ts +4 -4
- package/es/panel-component/multi-data-container/multi-data-container.controller.d.ts.map +1 -1
- package/es/panel-component/multi-data-container/multi-data-container.controller.mjs +88 -69
- package/es/panel-component/multi-data-container/multi-data-container.d.ts +7 -5
- package/es/panel-component/multi-data-container/multi-data-container.d.ts.map +1 -1
- package/es/panel-component/multi-data-container/multi-data-container.mjs +20 -6
- package/es/panel-component/multi-data-container/multi-data-container.state.d.ts +3 -3
- package/es/panel-component/multi-data-container/multi-data-container.state.d.ts.map +1 -1
- package/es/panel-component/multi-data-container/multi-data-container.state.mjs +2 -2
- package/es/panel-component/multi-data-container-raw/index.d.ts +6 -4
- package/es/panel-component/multi-data-container-raw/index.d.ts.map +1 -1
- package/es/panel-component/multi-data-container-raw/multi-data-container-raw.controller.d.ts +4 -4
- package/es/panel-component/multi-data-container-raw/multi-data-container-raw.controller.d.ts.map +1 -1
- package/es/panel-component/multi-data-container-raw/multi-data-container-raw.controller.mjs +88 -69
- package/es/panel-component/multi-data-container-raw/multi-data-container-raw.d.ts +7 -5
- package/es/panel-component/multi-data-container-raw/multi-data-container-raw.d.ts.map +1 -1
- package/es/panel-component/multi-data-container-raw/multi-data-container-raw.mjs +23 -7
- package/es/panel-component/multi-data-container-raw/multi-data-container-raw.state.d.ts +3 -3
- package/es/panel-component/multi-data-container-raw/multi-data-container-raw.state.d.ts.map +1 -1
- package/es/panel-component/multi-data-container-raw/multi-data-container-raw.state.mjs +2 -2
- package/es/panel-component/nav-pos/index.d.ts +7 -5
- package/es/panel-component/nav-pos/index.d.ts.map +1 -1
- package/es/panel-component/nav-pos/nav-pos.controller.d.ts +1 -1
- package/es/panel-component/nav-pos/nav-pos.d.ts +8 -6
- package/es/panel-component/nav-pos/nav-pos.d.ts.map +1 -1
- package/es/panel-component/nav-pos/nav-pos.mjs +20 -5
- package/es/panel-component/panel-container/index.d.ts +7 -6
- package/es/panel-component/panel-container/index.d.ts.map +1 -1
- package/es/panel-component/panel-container/index.mjs +1 -2
- package/es/panel-component/panel-container/panel-container.d.ts +7 -5
- package/es/panel-component/panel-container/panel-container.d.ts.map +1 -1
- package/es/panel-component/panel-container/panel-container.mjs +36 -15
- package/es/panel-component/panel-container/panel-container.provider.d.ts +2 -2
- package/es/panel-component/panel-container/panel-container.provider.d.ts.map +1 -1
- package/es/panel-component/panel-container/panel-container.provider.mjs +1 -1
- package/es/panel-component/panel-container-image/index.d.ts +6 -4
- package/es/panel-component/panel-container-image/index.d.ts.map +1 -1
- package/es/panel-component/panel-container-image/panel-container-image.controller.d.ts +3 -3
- package/es/panel-component/panel-container-image/panel-container-image.controller.d.ts.map +1 -1
- package/es/panel-component/panel-container-image/panel-container-image.controller.mjs +2 -2
- package/es/panel-component/panel-container-image/panel-container-image.css +1 -1
- package/es/panel-component/panel-container-image/panel-container-image.d.ts +6 -4
- package/es/panel-component/panel-container-image/panel-container-image.d.ts.map +1 -1
- package/es/panel-component/panel-container-image/panel-container-image.mjs +24 -10
- package/es/panel-component/panel-container-image/panel-container-image.state.d.ts +3 -3
- package/es/panel-component/panel-container-image/panel-container-image.state.d.ts.map +1 -1
- package/es/panel-component/panel-container-image/panel-container-image.state.mjs +2 -2
- package/es/panel-component/panel-container-tabs/index.d.ts +6 -6
- package/es/panel-component/panel-container-tabs/index.d.ts.map +1 -1
- package/es/panel-component/panel-container-tabs/panel-container-tabs.d.ts +5 -5
- package/es/panel-component/panel-container-tabs/panel-container-tabs.d.ts.map +1 -1
- package/es/panel-component/panel-container-tabs/panel-container-tabs.mjs +1 -1
- package/es/panel-component/panel-container-tabs/panel-container-tabs.provider.d.ts +2 -2
- package/es/panel-component/panel-container-tabs/panel-container-tabs.provider.d.ts.map +1 -1
- package/es/panel-component/panel-container-tabs/panel-container-tabs.provider.mjs +1 -1
- package/es/panel-component/panel-ctrl-pos/index.d.ts +6 -4
- package/es/panel-component/panel-ctrl-pos/index.d.ts.map +1 -1
- package/es/panel-component/panel-ctrl-pos/panel-ctrl-pos.d.ts +6 -4
- package/es/panel-component/panel-ctrl-pos/panel-ctrl-pos.d.ts.map +1 -1
- package/es/panel-component/panel-ctrl-pos/panel-ctrl-pos.mjs +12 -4
- package/es/panel-component/panel-ctrl-view-page-caption/index.d.ts +6 -4
- package/es/panel-component/panel-ctrl-view-page-caption/index.d.ts.map +1 -1
- package/es/panel-component/panel-ctrl-view-page-caption/panel-ctrl-view-page-caption.css +1 -0
- package/es/panel-component/panel-ctrl-view-page-caption/panel-ctrl-view-page-caption.d.ts +7 -4
- package/es/panel-component/panel-ctrl-view-page-caption/panel-ctrl-view-page-caption.d.ts.map +1 -1
- package/es/panel-component/panel-ctrl-view-page-caption/panel-ctrl-view-page-caption.mjs +16 -8
- package/es/panel-component/panel-field/index.d.ts +7 -4
- package/es/panel-component/panel-field/index.d.ts.map +1 -1
- package/es/panel-component/panel-field/panel-field.controller.d.ts +12 -0
- package/es/panel-component/panel-field/panel-field.controller.d.ts.map +1 -1
- package/es/panel-component/panel-field/panel-field.controller.mjs +37 -3
- package/es/panel-component/panel-field/panel-field.css +1 -1
- package/es/panel-component/panel-field/panel-field.d.ts +7 -4
- package/es/panel-component/panel-field/panel-field.d.ts.map +1 -1
- package/es/panel-component/panel-field/panel-field.mjs +29 -12
- package/es/panel-component/panel-item-render/index.d.ts +6 -4
- package/es/panel-component/panel-item-render/index.d.ts.map +1 -1
- package/es/panel-component/panel-item-render/panel-item-render.controller.d.ts.map +1 -1
- package/es/panel-component/panel-item-render/panel-item-render.controller.mjs +7 -5
- package/es/panel-component/panel-item-render/panel-item-render.d.ts +6 -4
- package/es/panel-component/panel-item-render/panel-item-render.d.ts.map +1 -1
- package/es/panel-component/panel-item-render/panel-item-render.mjs +13 -4
- package/es/panel-component/panel-rawitem/index.d.ts +8 -6
- package/es/panel-component/panel-rawitem/index.d.ts.map +1 -1
- package/es/panel-component/panel-rawitem/panel-rawitem.d.ts +8 -6
- package/es/panel-component/panel-rawitem/panel-rawitem.d.ts.map +1 -1
- package/es/panel-component/panel-rawitem/panel-rawitem.mjs +15 -10
- package/es/panel-component/panel-tab-page/index.d.ts +8 -6
- package/es/panel-component/panel-tab-page/index.d.ts.map +1 -1
- package/es/panel-component/panel-tab-page/panel-tab-page.d.ts +10 -8
- package/es/panel-component/panel-tab-page/panel-tab-page.d.ts.map +1 -1
- package/es/panel-component/panel-tab-page/panel-tab-page.mjs +23 -8
- package/es/panel-component/panel-tab-page/panel-tab-page.provider.d.ts +2 -2
- package/es/panel-component/panel-tab-page/panel-tab-page.provider.d.ts.map +1 -1
- package/es/panel-component/panel-tab-page/panel-tab-page.provider.mjs +2 -2
- package/es/panel-component/scroll-container/index.d.ts +6 -4
- package/es/panel-component/scroll-container/index.d.ts.map +1 -1
- package/es/panel-component/scroll-container/scroll-container/scroll-container.controller.d.ts +3 -3
- package/es/panel-component/scroll-container/scroll-container/scroll-container.controller.d.ts.map +1 -1
- package/es/panel-component/scroll-container/scroll-container/scroll-container.controller.mjs +2 -2
- package/es/panel-component/scroll-container/scroll-container/scroll-container.d.ts +6 -4
- package/es/panel-component/scroll-container/scroll-container/scroll-container.d.ts.map +1 -1
- package/es/panel-component/scroll-container/scroll-container/scroll-container.mjs +26 -15
- package/es/panel-component/scroll-container/scroll-container-item/scroll-container-item.controller.d.ts +3 -3
- package/es/panel-component/scroll-container/scroll-container-item/scroll-container-item.controller.d.ts.map +1 -1
- package/es/panel-component/scroll-container/scroll-container-item/scroll-container-item.controller.mjs +2 -2
- package/es/panel-component/scroll-container/scroll-container-item/scroll-container-item.d.ts +6 -4
- package/es/panel-component/scroll-container/scroll-container-item/scroll-container-item.d.ts.map +1 -1
- package/es/panel-component/scroll-container/scroll-container-item/scroll-container-item.mjs +21 -6
- package/es/panel-component/single-data-container/index.d.ts +6 -4
- package/es/panel-component/single-data-container/index.d.ts.map +1 -1
- package/es/panel-component/single-data-container/single-data-container.controller.d.ts +4 -4
- package/es/panel-component/single-data-container/single-data-container.controller.d.ts.map +1 -1
- package/es/panel-component/single-data-container/single-data-container.controller.mjs +98 -73
- package/es/panel-component/single-data-container/single-data-container.d.ts +7 -5
- package/es/panel-component/single-data-container/single-data-container.d.ts.map +1 -1
- package/es/panel-component/single-data-container/single-data-container.mjs +22 -6
- package/es/panel-component/single-data-container/single-data-container.state.d.ts +3 -3
- package/es/panel-component/single-data-container/single-data-container.state.d.ts.map +1 -1
- package/es/panel-component/single-data-container/single-data-container.state.mjs +2 -2
- package/es/panel-component/teleport-placeholder/index.d.ts +7 -5
- package/es/panel-component/teleport-placeholder/index.d.ts.map +1 -1
- package/es/panel-component/teleport-placeholder/teleport-placeholder.d.ts +7 -5
- package/es/panel-component/teleport-placeholder/teleport-placeholder.d.ts.map +1 -1
- package/es/panel-component/teleport-placeholder/teleport-placeholder.mjs +11 -4
- package/es/plugin/plugin-factory/plugin-factory.d.ts +15 -0
- package/es/plugin/plugin-factory/plugin-factory.d.ts.map +1 -1
- package/es/plugin/plugin-factory/plugin-factory.mjs +34 -6
- package/es/props/editor/autocomplete.d.ts +2 -2
- package/es/props/editor/check-box-list.d.ts +2 -2
- package/es/props/editor/check-box.d.ts +2 -2
- package/es/props/editor/code.d.ts +17 -0
- package/es/props/editor/code.d.ts.map +1 -1
- package/es/props/editor/code.mjs +7 -2
- package/es/props/editor/common.d.ts +7 -0
- package/es/props/editor/common.d.ts.map +1 -1
- package/es/props/editor/common.mjs +5 -1
- package/es/props/editor/data-picker.d.ts +2 -2
- package/es/props/editor/date-picker.d.ts +2 -2
- package/es/props/editor/date-range-select.d.ts +4 -0
- package/es/props/editor/date-range-select.d.ts.map +1 -1
- package/es/props/editor/date-range.d.ts +2 -2
- package/es/props/editor/dropdown-list.d.ts +2 -2
- package/es/props/editor/html.d.ts +17 -0
- package/es/props/editor/html.d.ts.map +1 -1
- package/es/props/editor/html.mjs +7 -2
- package/es/props/editor/index.mjs +3 -3
- package/es/props/editor/list-box.d.ts +2 -2
- package/es/props/editor/markdown.d.ts +89 -0
- package/es/props/editor/markdown.d.ts.map +1 -1
- package/es/props/editor/markdown.mjs +28 -3
- package/es/props/editor/number-range.d.ts +2 -2
- package/es/props/editor/radio-button-list.d.ts +2 -2
- package/es/props/editor/rate.d.ts +2 -2
- package/es/props/editor/raw.d.ts +2 -2
- package/es/props/editor/slider.d.ts +2 -2
- package/es/props/editor/span.d.ts +18 -2
- package/es/props/editor/span.d.ts.map +1 -1
- package/es/props/editor/span.mjs +6 -1
- package/es/props/editor/stepper.d.ts +2 -2
- package/es/props/editor/switch.d.ts +2 -2
- package/es/props/editor/text-box.d.ts +2 -2
- package/es/props/index.mjs +3 -3
- package/es/use/index.d.ts +2 -0
- package/es/use/index.d.ts.map +1 -1
- package/es/use/index.mjs +4 -2
- package/es/use/popover/popover.d.ts +7 -0
- package/es/use/popover/popover.d.ts.map +1 -1
- package/es/use/popover/popover.mjs +9 -2
- package/es/use/storage/index.d.ts +4 -6
- package/es/use/storage/index.d.ts.map +1 -1
- package/es/use/storage/index.mjs +16 -11
- package/es/use/tooltip/tooltip.d.ts +103 -0
- package/es/use/tooltip/tooltip.d.ts.map +1 -0
- package/es/use/tooltip/tooltip.mjs +68 -0
- package/es/use/use-semantic-node/use-semantic-node.d.ts +15 -0
- package/es/use/use-semantic-node/use-semantic-node.d.ts.map +1 -0
- package/es/use/use-semantic-node/use-semantic-node.mjs +100 -0
- package/es/use/vue/vue.d.ts +9 -0
- package/es/use/vue/vue.d.ts.map +1 -1
- package/es/use/vue/vue.mjs +15 -2
- package/es/util/index.d.ts +0 -1
- package/es/util/index.d.ts.map +1 -1
- package/es/util/index.mjs +0 -1
- package/es/util/install.d.ts.map +1 -1
- package/es/util/overlay-container/overlay-container.d.ts +1 -1
- package/es/util/overlay-container/overlay-container.d.ts.map +1 -1
- package/es/util/overlay-container/overlay-container.mjs +7 -2
- package/es/util/overlay-view-util/overlay-view-util.d.ts +2 -2
- package/es/util/overlay-view-util/overlay-view-util.d.ts.map +1 -1
- package/es/util/overlay-view-util/overlay-view-util.mjs +2 -1
- package/es/util/route/route.d.ts.map +1 -1
- package/es/util/route/route.mjs +13 -3
- package/es/util/store/app-store/app-store.d.ts +2 -2
- package/es/util/store/ui-store/ui-store.d.ts +2 -2
- package/es/view/app-redirect-view/app-redirect-view.d.ts +1 -1
- package/es/view/app-redirect-view/app-redirect-view.d.ts.map +1 -1
- package/es/view/app-redirect-view/app-redirect-view.mjs +1 -1
- package/es/view/common/index.d.ts +5 -5
- package/es/view/common/index.d.ts.map +1 -1
- package/es/view/common/view.d.ts +5 -5
- package/es/view/common/view.d.ts.map +1 -1
- package/es/view/common/view.mjs +17 -3
- package/es/view/de-redirect-view/de-redirect-view.d.ts +8 -8
- package/es/view/de-redirect-view/de-redirect-view.d.ts.map +1 -1
- package/es/view/de-redirect-view/de-redirect-view.mjs +1 -1
- package/es/view/de-redirect-view/index.d.ts +8 -8
- package/es/view/de-redirect-view/index.d.ts.map +1 -1
- package/es/view/html-view/html-view.d.ts +8 -9
- package/es/view/html-view/html-view.d.ts.map +1 -1
- package/es/view/html-view/html-view.mjs +10 -17
- package/es/view/html-view/index.d.ts +7 -8
- package/es/view/html-view/index.d.ts.map +1 -1
- package/es/view/portal-view/index.d.ts +5 -5
- package/es/view/portal-view/index.d.ts.map +1 -1
- package/es/view/portal-view/portal-view.d.ts +5 -5
- package/es/view/portal-view/portal-view.d.ts.map +1 -1
- package/es/view/todo-redirect/todo-redirect.d.ts +1 -1
- package/es/view/todo-redirect/todo-redirect.d.ts.map +1 -1
- package/lib/common/badge/badge.cjs +12 -6
- package/lib/common/badge/badge.css +1 -1
- package/lib/common/control-base/control-base.cjs +8 -14
- package/lib/common/icon/icon.cjs +12 -0
- package/lib/common/index.cjs +2 -0
- package/lib/common/signature-pad/signature-pad.cjs +167 -0
- package/lib/common/signature-pad/signature-pad.css +1 -0
- package/lib/common/signature-pad/util/bezier.cjs +111 -0
- package/lib/common/signature-pad/util/point.cjs +53 -0
- package/lib/common/signature-pad/util/signature_pad.cjs +1022 -0
- package/lib/common/view-shell/view-shell.cjs +40 -21
- package/lib/control/panel/panel/panel.cjs +11 -3
- package/lib/control/panel/view-layout-panel/view-layout-panel.cjs +4 -4
- package/lib/index.cjs +57 -47
- package/lib/locale/en/index.cjs +2 -1
- package/lib/locale/zh-CN/index.cjs +2 -1
- package/lib/node_modules/.pnpm/path-browserify@1.0.1/node_modules/path-browserify/index.cjs +2 -2
- package/lib/panel-component/auth-wxmp-qrcode/auth-wxmp-qrcode.cjs +16 -5
- package/lib/panel-component/auth-wxmp-qrcode/auth-wxmp-qrcode.controller.cjs +3 -1
- package/lib/panel-component/auth-wxmp-qrcode/auth-wxmp-qrcode.css +1 -1
- package/lib/panel-component/grid-container/grid-container.cjs +16 -5
- package/lib/panel-component/grid-container/grid-container.controller.cjs +1 -1
- package/lib/panel-component/grid-container/grid-container.state.cjs +1 -1
- package/lib/panel-component/index.cjs +21 -22
- package/lib/panel-component/multi-data-container/multi-data-container.cjs +19 -5
- package/lib/panel-component/multi-data-container/multi-data-container.controller.cjs +87 -68
- package/lib/panel-component/multi-data-container/multi-data-container.state.cjs +1 -1
- package/lib/panel-component/multi-data-container-raw/multi-data-container-raw.cjs +22 -6
- package/lib/panel-component/multi-data-container-raw/multi-data-container-raw.controller.cjs +87 -68
- package/lib/panel-component/multi-data-container-raw/multi-data-container-raw.state.cjs +1 -1
- package/lib/panel-component/nav-pos/nav-pos.cjs +18 -3
- package/lib/panel-component/panel-container/index.cjs +8 -4
- package/lib/panel-component/panel-container/panel-container.cjs +36 -15
- package/lib/panel-component/panel-container/panel-container.provider.cjs +2 -2
- package/lib/panel-component/panel-container-image/panel-container-image.cjs +23 -9
- package/lib/panel-component/panel-container-image/panel-container-image.controller.cjs +1 -1
- package/lib/panel-component/panel-container-image/panel-container-image.css +1 -1
- package/lib/panel-component/panel-container-image/panel-container-image.state.cjs +1 -1
- package/lib/panel-component/panel-container-tabs/panel-container-tabs.cjs +2 -2
- package/lib/panel-component/panel-container-tabs/panel-container-tabs.provider.cjs +2 -2
- package/lib/panel-component/panel-ctrl-pos/panel-ctrl-pos.cjs +11 -3
- package/lib/panel-component/panel-ctrl-view-page-caption/panel-ctrl-view-page-caption.cjs +15 -7
- package/lib/panel-component/panel-ctrl-view-page-caption/panel-ctrl-view-page-caption.css +1 -0
- package/lib/panel-component/panel-field/panel-field.cjs +28 -11
- package/lib/panel-component/panel-field/panel-field.controller.cjs +37 -3
- package/lib/panel-component/panel-field/panel-field.css +1 -1
- package/lib/panel-component/panel-item-render/panel-item-render.cjs +12 -3
- package/lib/panel-component/panel-item-render/panel-item-render.controller.cjs +7 -5
- package/lib/panel-component/panel-rawitem/panel-rawitem.cjs +14 -9
- package/lib/panel-component/panel-tab-page/panel-tab-page.cjs +21 -6
- package/lib/panel-component/panel-tab-page/panel-tab-page.provider.cjs +1 -1
- package/lib/panel-component/scroll-container/scroll-container/scroll-container.cjs +25 -14
- package/lib/panel-component/scroll-container/scroll-container/scroll-container.controller.cjs +1 -1
- package/lib/panel-component/scroll-container/scroll-container-item/scroll-container-item.cjs +20 -5
- package/lib/panel-component/scroll-container/scroll-container-item/scroll-container-item.controller.cjs +1 -1
- package/lib/panel-component/single-data-container/single-data-container.cjs +21 -5
- package/lib/panel-component/single-data-container/single-data-container.controller.cjs +97 -72
- package/lib/panel-component/single-data-container/single-data-container.state.cjs +1 -1
- package/lib/panel-component/teleport-placeholder/teleport-placeholder.cjs +10 -3
- package/lib/plugin/plugin-factory/plugin-factory.cjs +33 -5
- package/lib/props/editor/code.cjs +6 -0
- package/lib/props/editor/common.cjs +5 -1
- package/lib/props/editor/html.cjs +6 -0
- package/lib/props/editor/index.cjs +3 -0
- package/lib/props/editor/markdown.cjs +27 -1
- package/lib/props/editor/span.cjs +6 -1
- package/lib/props/index.cjs +3 -0
- package/lib/use/index.cjs +8 -0
- package/lib/use/popover/popover.cjs +8 -0
- package/lib/use/storage/index.cjs +16 -11
- package/lib/use/tooltip/tooltip.cjs +72 -0
- package/lib/use/use-semantic-node/use-semantic-node.cjs +102 -0
- package/lib/use/vue/vue.cjs +14 -0
- package/lib/util/index.cjs +0 -2
- package/lib/util/overlay-container/overlay-container.cjs +7 -2
- package/lib/util/overlay-view-util/overlay-view-util.cjs +2 -1
- package/lib/util/route/route.cjs +13 -3
- package/lib/view/common/view.cjs +15 -1
- package/lib/view/html-view/html-view.cjs +8 -15
- package/package.json +8 -7
- package/src/common/badge/badge.scss +49 -0
- package/src/common/badge/badge.tsx +55 -0
- package/src/common/code-list/code-list.scss +15 -0
- package/src/common/code-list/code-list.tsx +184 -0
- package/src/common/control-base/control-base.scss +42 -0
- package/src/common/control-base/control-base.tsx +308 -0
- package/src/common/control-loading-placeholder/control-loading-placeholder.tsx +22 -0
- package/src/common/control-shell/control-shell.scss +5 -0
- package/src/common/control-shell/control-shell.tsx +90 -0
- package/src/common/custom-render/custom-render.scss +4 -0
- package/src/common/custom-render/custom-render.tsx +111 -0
- package/src/common/icon/icon.scss +13 -0
- package/src/common/icon/icon.tsx +105 -0
- package/src/common/index.ts +10 -0
- package/src/common/router-view/router-view.tsx +74 -0
- package/src/common/signature-pad/signature-pad.scss +10 -0
- package/src/common/signature-pad/signature-pad.tsx +174 -0
- package/src/common/signature-pad/util/bezier.ts +164 -0
- package/src/common/signature-pad/util/point.ts +96 -0
- package/src/common/signature-pad/util/signature_pad.ts +1543 -0
- package/src/common/view-shell/view-shell.scss +5 -0
- package/src/common/view-shell/view-shell.tsx +337 -0
- package/src/control/index.ts +1 -0
- package/src/control/panel/index.ts +2 -0
- package/src/control/panel/panel/index.ts +12 -0
- package/src/control/panel/panel/panel.provider.ts +14 -0
- package/src/control/panel/panel/panel.scss +9 -0
- package/src/control/panel/panel/panel.tsx +273 -0
- package/src/control/panel/view-layout-panel/index.ts +18 -0
- package/src/control/panel/view-layout-panel/view-layout-panel.provider.ts +14 -0
- package/src/control/panel/view-layout-panel/view-layout-panel.scss +9 -0
- package/src/control/panel/view-layout-panel/view-layout-panel.tsx +266 -0
- package/src/hooks/app/app.hooks.ts +63 -0
- package/src/hooks/index.ts +1 -0
- package/src/index.ts +19 -0
- package/src/interface/index.ts +1 -0
- package/src/interface/util/index.ts +1 -0
- package/src/interface/util/route/route.ts +116 -0
- package/src/locale/en/index.ts +74 -0
- package/src/locale/index.ts +2 -0
- package/src/locale/zh-CN/index.ts +66 -0
- package/src/panel-component/auth-wxmp-qrcode/auth-wxmp-qrcode.controller.ts +248 -0
- package/src/panel-component/auth-wxmp-qrcode/auth-wxmp-qrcode.provider.ts +28 -0
- package/src/panel-component/auth-wxmp-qrcode/auth-wxmp-qrcode.scss +51 -0
- package/src/panel-component/auth-wxmp-qrcode/auth-wxmp-qrcode.state.ts +58 -0
- package/src/panel-component/auth-wxmp-qrcode/auth-wxmp-qrcode.tsx +109 -0
- package/src/panel-component/auth-wxmp-qrcode/index.ts +18 -0
- package/src/panel-component/grid-container/grid-container.controller.ts +24 -0
- package/src/panel-component/grid-container/grid-container.provider.ts +30 -0
- package/src/panel-component/grid-container/grid-container.scss +17 -0
- package/src/panel-component/grid-container/grid-container.state.ts +12 -0
- package/src/panel-component/grid-container/grid-container.tsx +141 -0
- package/src/panel-component/grid-container/index.ts +19 -0
- package/src/panel-component/index.ts +17 -0
- package/src/panel-component/multi-data-container/index.ts +22 -0
- package/src/panel-component/multi-data-container/multi-data-container-item.controller.ts +179 -0
- package/src/panel-component/multi-data-container/multi-data-container-itm.state.ts +20 -0
- package/src/panel-component/multi-data-container/multi-data-container.controller.ts +456 -0
- package/src/panel-component/multi-data-container/multi-data-container.provider.ts +30 -0
- package/src/panel-component/multi-data-container/multi-data-container.scss +10 -0
- package/src/panel-component/multi-data-container/multi-data-container.state.ts +19 -0
- package/src/panel-component/multi-data-container/multi-data-container.tsx +137 -0
- package/src/panel-component/multi-data-container-raw/index.ts +22 -0
- package/src/panel-component/multi-data-container-raw/multi-data-container-raw.controller.ts +448 -0
- package/src/panel-component/multi-data-container-raw/multi-data-container-raw.provider.ts +30 -0
- package/src/panel-component/multi-data-container-raw/multi-data-container-raw.scss +12 -0
- package/src/panel-component/multi-data-container-raw/multi-data-container-raw.state.ts +19 -0
- package/src/panel-component/multi-data-container-raw/multi-data-container-raw.tsx +129 -0
- package/src/panel-component/nav-pos/index.ts +16 -0
- package/src/panel-component/nav-pos/nav-pos.controller.ts +438 -0
- package/src/panel-component/nav-pos/nav-pos.provider.ts +38 -0
- package/src/panel-component/nav-pos/nav-pos.scss +4 -0
- package/src/panel-component/nav-pos/nav-pos.state.ts +55 -0
- package/src/panel-component/nav-pos/nav-pos.tsx +166 -0
- package/src/panel-component/panel-container/index.ts +30 -0
- package/src/panel-component/panel-container/panel-container.provider.ts +30 -0
- package/src/panel-component/panel-container/panel-container.scss +21 -0
- package/src/panel-component/panel-container/panel-container.tsx +138 -0
- package/src/panel-component/panel-container-image/index.ts +22 -0
- package/src/panel-component/panel-container-image/panel-container-image.controller.ts +24 -0
- package/src/panel-component/panel-container-image/panel-container-image.provider.ts +30 -0
- package/src/panel-component/panel-container-image/panel-container-image.scss +17 -0
- package/src/panel-component/panel-container-image/panel-container-image.state.ts +12 -0
- package/src/panel-component/panel-container-image/panel-container-image.tsx +116 -0
- package/src/panel-component/panel-container-tabs/index.ts +18 -0
- package/src/panel-component/panel-container-tabs/panel-container-tabs.provider.ts +30 -0
- package/src/panel-component/panel-container-tabs/panel-container-tabs.scss +25 -0
- package/src/panel-component/panel-container-tabs/panel-container-tabs.tsx +47 -0
- package/src/panel-component/panel-ctrl-pos/index.ts +14 -0
- package/src/panel-component/panel-ctrl-pos/panel-ctrl-pos.controller.ts +50 -0
- package/src/panel-component/panel-ctrl-pos/panel-ctrl-pos.provider.ts +30 -0
- package/src/panel-component/panel-ctrl-pos/panel-ctrl-pos.scss +8 -0
- package/src/panel-component/panel-ctrl-pos/panel-ctrl-pos.tsx +72 -0
- package/src/panel-component/panel-ctrl-view-page-caption/index.ts +18 -0
- package/src/panel-component/panel-ctrl-view-page-caption/panel-ctrl-view-page-caption.controller.ts +32 -0
- package/src/panel-component/panel-ctrl-view-page-caption/panel-ctrl-view-page-caption.provider.ts +30 -0
- package/src/panel-component/panel-ctrl-view-page-caption/panel-ctrl-view-page-caption.scss +13 -0
- package/src/panel-component/panel-ctrl-view-page-caption/panel-ctrl-view-page-caption.state.ts +17 -0
- package/src/panel-component/panel-ctrl-view-page-caption/panel-ctrl-view-page-caption.tsx +77 -0
- package/src/panel-component/panel-field/index.ts +14 -0
- package/src/panel-component/panel-field/panel-field.controller.ts +272 -0
- package/src/panel-component/panel-field/panel-field.provider.ts +28 -0
- package/src/panel-component/panel-field/panel-field.scss +79 -0
- package/src/panel-component/panel-field/panel-field.state.ts +17 -0
- package/src/panel-component/panel-field/panel-field.tsx +138 -0
- package/src/panel-component/panel-item-render/index.ts +18 -0
- package/src/panel-component/panel-item-render/panel-item-render.controller.ts +53 -0
- package/src/panel-component/panel-item-render/panel-item-render.provider.ts +30 -0
- package/src/panel-component/panel-item-render/panel-item-render.tsx +69 -0
- package/src/panel-component/panel-rawitem/index.ts +26 -0
- package/src/panel-component/panel-rawitem/panel-rawitem.controller.ts +54 -0
- package/src/panel-component/panel-rawitem/panel-rawitem.provider.ts +28 -0
- package/src/panel-component/panel-rawitem/panel-rawitem.scss +8 -0
- package/src/panel-component/panel-rawitem/panel-rawitem.tsx +126 -0
- package/src/panel-component/panel-tab-page/index.ts +12 -0
- package/src/panel-component/panel-tab-page/panel-tab-page.provider.ts +28 -0
- package/src/panel-component/panel-tab-page/panel-tab-page.tsx +83 -0
- package/src/panel-component/scroll-container/index.ts +44 -0
- package/src/panel-component/scroll-container/scroll-container/index.ts +2 -0
- package/src/panel-component/scroll-container/scroll-container/scroll-container.controller.ts +29 -0
- package/src/panel-component/scroll-container/scroll-container/scroll-container.provider.ts +30 -0
- package/src/panel-component/scroll-container/scroll-container/scroll-container.scss +40 -0
- package/src/panel-component/scroll-container/scroll-container/scroll-container.tsx +155 -0
- package/src/panel-component/scroll-container/scroll-container-item/index.ts +2 -0
- package/src/panel-component/scroll-container/scroll-container-item/scroll-container-item.controller.ts +21 -0
- package/src/panel-component/scroll-container/scroll-container-item/scroll-container-item.provider.ts +30 -0
- package/src/panel-component/scroll-container/scroll-container-item/scroll-container-item.scss +9 -0
- package/src/panel-component/scroll-container/scroll-container-item/scroll-container-item.tsx +80 -0
- package/src/panel-component/single-data-container/index.ts +22 -0
- package/src/panel-component/single-data-container/single-data-container.controller.ts +507 -0
- package/src/panel-component/single-data-container/single-data-container.provider.ts +30 -0
- package/src/panel-component/single-data-container/single-data-container.scss +10 -0
- package/src/panel-component/single-data-container/single-data-container.state.ts +17 -0
- package/src/panel-component/single-data-container/single-data-container.tsx +124 -0
- package/src/panel-component/teleport-placeholder/index.ts +20 -0
- package/src/panel-component/teleport-placeholder/teleport-placeholder.controller.ts +54 -0
- package/src/panel-component/teleport-placeholder/teleport-placeholder.provider.ts +30 -0
- package/src/panel-component/teleport-placeholder/teleport-placeholder.scss +8 -0
- package/src/panel-component/teleport-placeholder/teleport-placeholder.state.ts +17 -0
- package/src/panel-component/teleport-placeholder/teleport-placeholder.tsx +65 -0
- package/src/plugin/index.ts +1 -0
- package/src/plugin/plugin-factory/plugin-factory.ts +519 -0
- package/src/props/common.ts +30 -0
- package/src/props/editor/array.ts +28 -0
- package/src/props/editor/autocomplete.ts +28 -0
- package/src/props/editor/cascader.ts +28 -0
- package/src/props/editor/check-box-list.ts +28 -0
- package/src/props/editor/check-box.ts +28 -0
- package/src/props/editor/code.ts +56 -0
- package/src/props/editor/color-picker.ts +28 -0
- package/src/props/editor/common.ts +120 -0
- package/src/props/editor/data-picker.ts +28 -0
- package/src/props/editor/date-picker.ts +29 -0
- package/src/props/editor/date-range-select.ts +52 -0
- package/src/props/editor/date-range.ts +29 -0
- package/src/props/editor/dropdown-list.ts +28 -0
- package/src/props/editor/html.ts +44 -0
- package/src/props/editor/index.ts +29 -0
- package/src/props/editor/input-ip.ts +28 -0
- package/src/props/editor/input-number.ts +28 -0
- package/src/props/editor/list-box.ts +28 -0
- package/src/props/editor/map-picker.ts +28 -0
- package/src/props/editor/markdown.ts +74 -0
- package/src/props/editor/number-range.ts +28 -0
- package/src/props/editor/radio-button-list.ts +28 -0
- package/src/props/editor/rate.ts +28 -0
- package/src/props/editor/raw.ts +28 -0
- package/src/props/editor/slider.ts +28 -0
- package/src/props/editor/span.ts +33 -0
- package/src/props/editor/stepper.ts +28 -0
- package/src/props/editor/switch.ts +28 -0
- package/src/props/editor/text-box.ts +28 -0
- package/src/props/editor/upload.ts +28 -0
- package/src/props/index.ts +2 -0
- package/src/types/index.d.ts +8 -0
- package/src/use/autofocus-blur/autofocus-blur.ts +31 -0
- package/src/use/click-outside/click-outside.ts +72 -0
- package/src/use/codeList-listen/codelist-listen.ts +28 -0
- package/src/use/control/index.ts +1 -0
- package/src/use/control/use-control-controller/use-control-controller.ts +186 -0
- package/src/use/event/event.ts +57 -0
- package/src/use/focus-blur/focus-blur.ts +83 -0
- package/src/use/index.ts +16 -0
- package/src/use/namespace/namespace.ts +14 -0
- package/src/use/popover/popover.ts +157 -0
- package/src/use/route/route.ts +47 -0
- package/src/use/storage/index.ts +46 -0
- package/src/use/tooltip/tooltip.ts +153 -0
- package/src/use/use-semantic-node/use-semantic-node.ts +154 -0
- package/src/use/util/index.ts +26 -0
- package/src/use/view/index.ts +2 -0
- package/src/use/view/use-view-controller/use-view-controller.ts +163 -0
- package/src/use/view/use-view-operation/use-view-operation.ts +44 -0
- package/src/use/vue/vue.ts +168 -0
- package/src/use/vue-use/computed-async.ts +151 -0
- package/src/use/vue-use/index.ts +1 -0
- package/src/util/index.ts +9 -0
- package/src/util/install.ts +14 -0
- package/src/util/overlay-container/overlay-container.ts +162 -0
- package/src/util/overlay-popover-container/overlay-popover-container.ts +30 -0
- package/src/util/overlay-view-util/overlay-view-util.ts +93 -0
- package/src/util/render/render.ts +54 -0
- package/src/util/route/route-listener.ts +91 -0
- package/src/util/route/route.ts +606 -0
- package/src/util/router-callback/router-callback-item.ts +98 -0
- package/src/util/router-callback/router-callback.ts +110 -0
- package/src/util/store/app-store/app-store.ts +10 -0
- package/src/util/store/index.ts +6 -0
- package/src/util/store/ui-store/ui-store.ts +37 -0
- package/src/util/store/ui-store/z-index.ts +53 -0
- package/src/view/app-data-upload-view/app-data-upload-view.provider.ts +31 -0
- package/src/view/app-redirect-view/app-redirect-view.tsx +26 -0
- package/src/view/common/index.ts +19 -0
- package/src/view/common/view.provider.ts +14 -0
- package/src/view/common/view.scss +39 -0
- package/src/view/common/view.tsx +285 -0
- package/src/view/de-redirect-view/de-redirect-view.provider.ts +14 -0
- package/src/view/de-redirect-view/de-redirect-view.tsx +86 -0
- package/src/view/de-redirect-view/index.ts +17 -0
- package/src/view/html-view/html-view.provider.ts +14 -0
- package/src/view/html-view/html-view.scss +7 -0
- package/src/view/html-view/html-view.tsx +86 -0
- package/src/view/html-view/index.ts +10 -0
- package/src/view/index.ts +6 -0
- package/src/view/md-custom-view/md-custom-view.provider.ts +30 -0
- package/src/view/portal-view/index.ts +18 -0
- package/src/view/portal-view/portal-view.provider.ts +14 -0
- package/src/view/portal-view/portal-view.tsx +83 -0
- package/src/view/todo-redirect/todo-redirect.tsx +51 -0
- package/es/panel-component/panel-container/panel-container.controller.d.ts +0 -21
- package/es/panel-component/panel-container/panel-container.controller.d.ts.map +0 -1
- package/es/panel-component/panel-container/panel-container.controller.mjs +0 -12
- package/es/panel-component/panel-container/panel-container.state.d.ts +0 -10
- package/es/panel-component/panel-container/panel-container.state.d.ts.map +0 -1
- package/es/panel-component/panel-container/panel-container.state.mjs +0 -7
- package/es/panel-component/panel-container-group/index.d.ts +0 -29
- package/es/panel-component/panel-container-group/index.d.ts.map +0 -1
- package/es/panel-component/panel-container-group/index.mjs +0 -21
- package/es/panel-component/panel-container-group/panel-container-group.controller.d.ts +0 -34
- package/es/panel-component/panel-container-group/panel-container-group.controller.d.ts.map +0 -1
- package/es/panel-component/panel-container-group/panel-container-group.controller.mjs +0 -31
- package/es/panel-component/panel-container-group/panel-container-group.css +0 -1
- package/es/panel-component/panel-container-group/panel-container-group.d.ts +0 -46
- package/es/panel-component/panel-container-group/panel-container-group.d.ts.map +0 -1
- package/es/panel-component/panel-container-group/panel-container-group.mjs +0 -119
- package/es/panel-component/panel-container-group/panel-container-group.provider.d.ts +0 -16
- package/es/panel-component/panel-container-group/panel-container-group.provider.d.ts.map +0 -1
- package/es/panel-component/panel-container-group/panel-container-group.provider.mjs +0 -15
- package/es/panel-component/panel-container-group/panel-container-group.state.d.ts +0 -13
- package/es/panel-component/panel-container-group/panel-container-group.state.d.ts.map +0 -1
- package/es/panel-component/panel-container-group/panel-container-group.state.mjs +0 -7
- package/es/util/control/prepare-control.d.ts +0 -15
- package/es/util/control/prepare-control.d.ts.map +0 -1
- package/es/util/control/prepare-control.mjs +0 -22
- package/lib/panel-component/panel-container/panel-container.controller.cjs +0 -14
- package/lib/panel-component/panel-container/panel-container.state.cjs +0 -9
- package/lib/panel-component/panel-container-group/index.cjs +0 -28
- package/lib/panel-component/panel-container-group/panel-container-group.cjs +0 -121
- package/lib/panel-component/panel-container-group/panel-container-group.controller.cjs +0 -33
- package/lib/panel-component/panel-container-group/panel-container-group.css +0 -1
- package/lib/panel-component/panel-container-group/panel-container-group.provider.cjs +0 -17
- package/lib/panel-component/panel-container-group/panel-container-group.state.cjs +0 -9
- package/lib/util/control/prepare-control.cjs +0 -24
|
@@ -0,0 +1,337 @@
|
|
|
1
|
+
/* eslint-disable no-unused-vars */
|
|
2
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
3
|
+
/* eslint-disable no-case-declarations */
|
|
4
|
+
/* eslint-disable no-param-reassign */
|
|
5
|
+
/* eslint-disable vue/no-mutating-props */
|
|
6
|
+
import {
|
|
7
|
+
getViewProvider,
|
|
8
|
+
IViewProvider,
|
|
9
|
+
calcDynaSysParams,
|
|
10
|
+
getErrorViewProvider,
|
|
11
|
+
RedrawViewEvent,
|
|
12
|
+
IModal,
|
|
13
|
+
CTX,
|
|
14
|
+
EventBase,
|
|
15
|
+
IViewShellHooks,
|
|
16
|
+
} from '@ibiz-template/runtime';
|
|
17
|
+
import {
|
|
18
|
+
defineComponent,
|
|
19
|
+
h,
|
|
20
|
+
PropType,
|
|
21
|
+
provide,
|
|
22
|
+
Ref,
|
|
23
|
+
ref,
|
|
24
|
+
resolveComponent,
|
|
25
|
+
watch,
|
|
26
|
+
} from 'vue';
|
|
27
|
+
import { IAppView } from '@ibiz/model-core';
|
|
28
|
+
import { RuntimeError } from '@ibiz-template/core';
|
|
29
|
+
import { createUUID } from 'qx-util';
|
|
30
|
+
import { isEmpty, isNil, clone } from 'ramda';
|
|
31
|
+
import { useNamespace } from '../../use';
|
|
32
|
+
import './view-shell.scss';
|
|
33
|
+
|
|
34
|
+
export const IBizViewShell = defineComponent({
|
|
35
|
+
name: 'IBizViewShell',
|
|
36
|
+
props: {
|
|
37
|
+
context: { type: Object as PropType<IContext>, required: true },
|
|
38
|
+
params: { type: Object as PropType<IParams> },
|
|
39
|
+
modelData: { type: Object as PropType<IAppView> },
|
|
40
|
+
viewId: { type: String },
|
|
41
|
+
// 解决打开浮动容器(模态、抽屉、弹出框)ctx丢失问题
|
|
42
|
+
ctx: { type: Object as PropType<CTX> },
|
|
43
|
+
viewShellHooks: { type: Object as PropType<IViewShellHooks> },
|
|
44
|
+
},
|
|
45
|
+
setup(props, { attrs }) {
|
|
46
|
+
const ns = useNamespace('view-shell');
|
|
47
|
+
const isComplete = ref(false);
|
|
48
|
+
const errMsg = ref('');
|
|
49
|
+
const provider = ref<IViewProvider>();
|
|
50
|
+
const viewModelData = ref<IAppView | undefined>();
|
|
51
|
+
const hasAuthority = ref(true);
|
|
52
|
+
if (props.ctx) {
|
|
53
|
+
provide('ctx', props.ctx);
|
|
54
|
+
}
|
|
55
|
+
// 当前视图上下文
|
|
56
|
+
const context: Ref<IContext> = ref(props.context);
|
|
57
|
+
// 当前视图参数
|
|
58
|
+
const params: Ref<IParams> = ref(props.params || {});
|
|
59
|
+
// 动态视图加载缓存key
|
|
60
|
+
let dynaViewCacheKey: string = '';
|
|
61
|
+
// 监听上层视图视图参数合视图上下文变化
|
|
62
|
+
watch(
|
|
63
|
+
() => ({ context: props.context, params: props.params }),
|
|
64
|
+
newVal => {
|
|
65
|
+
context.value = newVal.context;
|
|
66
|
+
params.value = newVal.params ? newVal.params : {};
|
|
67
|
+
},
|
|
68
|
+
);
|
|
69
|
+
|
|
70
|
+
// 检查视图权限
|
|
71
|
+
const checkViewAuthority = async (
|
|
72
|
+
viewModel: IAppView,
|
|
73
|
+
): Promise<boolean> => {
|
|
74
|
+
let checkResult: boolean = true;
|
|
75
|
+
const { accessKey } = viewModel;
|
|
76
|
+
let { accUserMode } = viewModel;
|
|
77
|
+
const authInfo = ibiz.auth.getAuthInfo();
|
|
78
|
+
// 0:未指定、 1:未登录用户、 2:登录用户、 3:未登录用户及登录用户、 4:登录用户且拥有指定资源能力
|
|
79
|
+
if (isNil(accUserMode) || accUserMode === 0) {
|
|
80
|
+
accUserMode = ibiz.config.view.viewAccUserMode;
|
|
81
|
+
}
|
|
82
|
+
switch (accUserMode) {
|
|
83
|
+
case 1:
|
|
84
|
+
// 未登录用户(登录用户不能访问)
|
|
85
|
+
if (authInfo && !authInfo.isAnonymous) {
|
|
86
|
+
checkResult = false;
|
|
87
|
+
}
|
|
88
|
+
break;
|
|
89
|
+
case 2:
|
|
90
|
+
// 登录用户(未登录用户或者匿名用户不能访问)
|
|
91
|
+
if (!authInfo || (authInfo && authInfo.isAnonymous)) {
|
|
92
|
+
checkResult = false;
|
|
93
|
+
}
|
|
94
|
+
break;
|
|
95
|
+
case 4:
|
|
96
|
+
// 登录用户且拥有指定资源能力(登录用户且存在指定资源能力才能访问)
|
|
97
|
+
if (authInfo && !authInfo.isAnonymous) {
|
|
98
|
+
if (accessKey) {
|
|
99
|
+
const app = await ibiz.hub.getApp(context.value.srfappid);
|
|
100
|
+
const permitted = app.authority.calcByResCode(accessKey);
|
|
101
|
+
if (!permitted) {
|
|
102
|
+
checkResult = false;
|
|
103
|
+
}
|
|
104
|
+
} else {
|
|
105
|
+
checkResult = false;
|
|
106
|
+
}
|
|
107
|
+
} else {
|
|
108
|
+
checkResult = false;
|
|
109
|
+
}
|
|
110
|
+
break;
|
|
111
|
+
default:
|
|
112
|
+
break;
|
|
113
|
+
}
|
|
114
|
+
return checkResult;
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
let viewModel: IAppView | undefined;
|
|
118
|
+
|
|
119
|
+
// 设置动态视图加载缓存key,排除传入参数srfdatatype以外的参数
|
|
120
|
+
const getDynaViewCacheKey = (args: IParams): string => {
|
|
121
|
+
const copyArgs = clone(args);
|
|
122
|
+
if (copyArgs.srfdatatype) {
|
|
123
|
+
delete copyArgs.srfdatatype;
|
|
124
|
+
}
|
|
125
|
+
return JSON.stringify(copyArgs);
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
// 初始化视图模型
|
|
129
|
+
const initViewModel = async (): Promise<void> => {
|
|
130
|
+
if (props.modelData) {
|
|
131
|
+
viewModel = props.modelData;
|
|
132
|
+
} else {
|
|
133
|
+
viewModel = await ibiz.hub.getAppView(props.viewId!);
|
|
134
|
+
}
|
|
135
|
+
};
|
|
136
|
+
|
|
137
|
+
// 初始化方法
|
|
138
|
+
const init = async (): Promise<void> => {
|
|
139
|
+
try {
|
|
140
|
+
await initViewModel();
|
|
141
|
+
if (!viewModel) {
|
|
142
|
+
throw new RuntimeError(
|
|
143
|
+
ibiz.i18n.t('vue3Util.common.noFoundViewModel'),
|
|
144
|
+
);
|
|
145
|
+
}
|
|
146
|
+
// 检查权限
|
|
147
|
+
hasAuthority.value = await checkViewAuthority(viewModel);
|
|
148
|
+
if (!hasAuthority.value) {
|
|
149
|
+
return;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
if (viewModel.dynaSysMode === 1) {
|
|
153
|
+
//* 计算实体资源路径上下文参数
|
|
154
|
+
const appDataEntityId = viewModel.appDataEntityId;
|
|
155
|
+
if (!appDataEntityId) {
|
|
156
|
+
throw new RuntimeError(
|
|
157
|
+
ibiz.i18n.t('vue3Util.common.noSupportLoadingDynamic', {
|
|
158
|
+
codeName: viewModel.codeName,
|
|
159
|
+
}),
|
|
160
|
+
);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
/** 加载动态模型的请求参数 */
|
|
164
|
+
const loadModelParams: IParams = await calcDynaSysParams(
|
|
165
|
+
appDataEntityId,
|
|
166
|
+
context.value,
|
|
167
|
+
{ viewParams: params.value, appId: viewModel.appId },
|
|
168
|
+
);
|
|
169
|
+
|
|
170
|
+
if (params.value.srfdatatype) {
|
|
171
|
+
loadModelParams.srfdatatype = params.value.srfdatatype;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
// 如果视图参数中存在 srfwftag 则直接使用视图参数
|
|
175
|
+
if (params.value.srfwftag) {
|
|
176
|
+
loadModelParams.srfwftag = params.value.srfwftag;
|
|
177
|
+
} else if (appDataEntityId && viewModel.enableWF) {
|
|
178
|
+
// 处理数据请求的上下文
|
|
179
|
+
// 存在主键则加载数据计算对应的参数
|
|
180
|
+
if (loadModelParams.srfkey) {
|
|
181
|
+
const noSrfSessionId =
|
|
182
|
+
isNil(context.value.srfsessionid) ||
|
|
183
|
+
isEmpty(context.value.srfsessionid);
|
|
184
|
+
const id = createUUID();
|
|
185
|
+
// 只要上下文中无 srfsessionid 则生成一个
|
|
186
|
+
if (noSrfSessionId) {
|
|
187
|
+
// 生成一个界面域,界面域标识为当前控制器实例的标识
|
|
188
|
+
const domain = ibiz.uiDomainManager.create(id, appDataEntityId);
|
|
189
|
+
context.value.srfsessionid = domain.id;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
const app = ibiz.hub.getApp(viewModel.appId);
|
|
193
|
+
if (!context.value.srfappid)
|
|
194
|
+
context.value.srfappid = viewModel.appId;
|
|
195
|
+
const service = await app.deService.getService(
|
|
196
|
+
context.value,
|
|
197
|
+
appDataEntityId!,
|
|
198
|
+
);
|
|
199
|
+
const res = await service.get(context.value, params.value || {});
|
|
200
|
+
if (res.ok && res.data) {
|
|
201
|
+
const { srfwftag, processdefinitionkey, taskdefinitionkey } =
|
|
202
|
+
res.data;
|
|
203
|
+
if (srfwftag) {
|
|
204
|
+
loadModelParams.srfwftag = srfwftag;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
// *动态工作流编辑视图从数据里额外获取参数
|
|
208
|
+
if (
|
|
209
|
+
[
|
|
210
|
+
'DEWFDYNAEDITVIEW3',
|
|
211
|
+
'DEWFDYNAEDITVIEW',
|
|
212
|
+
'DEMOBWFDYNAEDITVIEW3',
|
|
213
|
+
'DEMOBWFDYNAEDITVIEW',
|
|
214
|
+
].includes(viewModel.viewType!)
|
|
215
|
+
) {
|
|
216
|
+
// 如果视图参数中没有获取到对应流程实例标识与步骤标识,则从请求回来的数据中获取对应信息
|
|
217
|
+
if (isNil(params.value.processDefinitionKey)) {
|
|
218
|
+
params.value.processDefinitionKey = processdefinitionkey;
|
|
219
|
+
}
|
|
220
|
+
if (isNil(params.value.taskDefinitionKey)) {
|
|
221
|
+
params.value.taskDefinitionKey = taskdefinitionkey;
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
if (noSrfSessionId) {
|
|
227
|
+
ibiz.uiDomainManager.destroy(id);
|
|
228
|
+
context.value.srfsessionid = '';
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
// 当前计算加载动态视图key和缓存key一致,则不需要重新加载动态视图
|
|
233
|
+
const curDynaViewCacheKey = getDynaViewCacheKey(loadModelParams);
|
|
234
|
+
if (curDynaViewCacheKey === dynaViewCacheKey) {
|
|
235
|
+
setTimeout(() => {
|
|
236
|
+
isComplete.value = true;
|
|
237
|
+
});
|
|
238
|
+
return;
|
|
239
|
+
}
|
|
240
|
+
// *加载动态模型
|
|
241
|
+
viewModelData.value = await ibiz.hub.loadAppView(
|
|
242
|
+
viewModel.appId,
|
|
243
|
+
viewModel.id!,
|
|
244
|
+
loadModelParams,
|
|
245
|
+
);
|
|
246
|
+
dynaViewCacheKey = getDynaViewCacheKey(loadModelParams);
|
|
247
|
+
} else {
|
|
248
|
+
viewModelData.value = viewModel;
|
|
249
|
+
}
|
|
250
|
+
provider.value = await getViewProvider(viewModel);
|
|
251
|
+
} catch (error) {
|
|
252
|
+
ibiz.log.error(error);
|
|
253
|
+
errMsg.value = (error as IData).message;
|
|
254
|
+
} finally {
|
|
255
|
+
isComplete.value = true;
|
|
256
|
+
}
|
|
257
|
+
};
|
|
258
|
+
|
|
259
|
+
init();
|
|
260
|
+
|
|
261
|
+
// 重绘视图
|
|
262
|
+
const redrawView = async (event: RedrawViewEvent): Promise<void> => {
|
|
263
|
+
isComplete.value = false;
|
|
264
|
+
const { redrawData } = event;
|
|
265
|
+
const { isReloadModel } = redrawData;
|
|
266
|
+
// 合并参数
|
|
267
|
+
Object.assign(context.value, redrawData.context);
|
|
268
|
+
Object.assign(params.value, redrawData.params);
|
|
269
|
+
// 重绘清空原关闭监听
|
|
270
|
+
const modal = attrs.modal as IModal;
|
|
271
|
+
if (modal) {
|
|
272
|
+
modal.hooks.preDismiss.clear();
|
|
273
|
+
modal.hooks.shouldDismiss.clear();
|
|
274
|
+
modal.hooks.beforeDismiss.clear();
|
|
275
|
+
}
|
|
276
|
+
if (isReloadModel) {
|
|
277
|
+
await init();
|
|
278
|
+
} else {
|
|
279
|
+
setTimeout(() => {
|
|
280
|
+
isComplete.value = true;
|
|
281
|
+
});
|
|
282
|
+
}
|
|
283
|
+
};
|
|
284
|
+
|
|
285
|
+
// 视图创建完成
|
|
286
|
+
const onCreated = (event: EventBase): void => {
|
|
287
|
+
if (props.viewShellHooks) {
|
|
288
|
+
props.viewShellHooks.hooks.viewCreated.call(event);
|
|
289
|
+
}
|
|
290
|
+
};
|
|
291
|
+
|
|
292
|
+
return {
|
|
293
|
+
ns,
|
|
294
|
+
errMsg,
|
|
295
|
+
provider,
|
|
296
|
+
isComplete,
|
|
297
|
+
hasAuthority,
|
|
298
|
+
viewModelData,
|
|
299
|
+
redrawView,
|
|
300
|
+
onCreated,
|
|
301
|
+
curContext: context,
|
|
302
|
+
curParams: params,
|
|
303
|
+
};
|
|
304
|
+
},
|
|
305
|
+
render() {
|
|
306
|
+
if (this.isComplete && this.provider && this.hasAuthority) {
|
|
307
|
+
return h(
|
|
308
|
+
resolveComponent(this.provider.component) as string,
|
|
309
|
+
{
|
|
310
|
+
context: this.curContext,
|
|
311
|
+
params: this.curParams,
|
|
312
|
+
modelData: clone(this.viewModelData),
|
|
313
|
+
...this.$attrs,
|
|
314
|
+
provider: this.provider,
|
|
315
|
+
onRedrawView: this.redrawView,
|
|
316
|
+
onCreated: this.onCreated,
|
|
317
|
+
},
|
|
318
|
+
this.$slots,
|
|
319
|
+
);
|
|
320
|
+
}
|
|
321
|
+
// 无权限访问绘制403界面
|
|
322
|
+
if (!this.hasAuthority) {
|
|
323
|
+
const provider = getErrorViewProvider('403');
|
|
324
|
+
if (provider) {
|
|
325
|
+
if (typeof provider.component === 'string') {
|
|
326
|
+
return h(resolveComponent(provider.component) as string);
|
|
327
|
+
}
|
|
328
|
+
return h(provider.component);
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
return (
|
|
332
|
+
<div class={this.ns.b()} v-loading={!this.isComplete}>
|
|
333
|
+
{this.isComplete ? this.errMsg : null}
|
|
334
|
+
</div>
|
|
335
|
+
);
|
|
336
|
+
},
|
|
337
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './panel';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { registerControlProvider, ControlType } from '@ibiz-template/runtime';
|
|
2
|
+
import { App } from 'vue';
|
|
3
|
+
import { PanelControl } from './panel';
|
|
4
|
+
import { PanelProvider } from './panel.provider';
|
|
5
|
+
import { withInstall } from '../../../util';
|
|
6
|
+
|
|
7
|
+
export const IBizPanelControl = withInstall(PanelControl, function (v: App) {
|
|
8
|
+
v.component(PanelControl.name!, PanelControl);
|
|
9
|
+
registerControlProvider(ControlType.PANEL, () => new PanelProvider());
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
export default IBizPanelControl;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { IControlProvider } from '@ibiz-template/runtime';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* 面板部件适配器
|
|
5
|
+
*
|
|
6
|
+
* @author lxm
|
|
7
|
+
* @date 2022-10-25 18:10:57
|
|
8
|
+
* @export
|
|
9
|
+
* @class ViewLayoutPanelProvider
|
|
10
|
+
* @implements {IControlProvider}
|
|
11
|
+
*/
|
|
12
|
+
export class PanelProvider implements IControlProvider {
|
|
13
|
+
component: string = 'IBizPanelControl';
|
|
14
|
+
}
|
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
import {
|
|
2
|
+
defineComponent,
|
|
3
|
+
PropType,
|
|
4
|
+
resolveComponent,
|
|
5
|
+
h,
|
|
6
|
+
VNode,
|
|
7
|
+
reactive,
|
|
8
|
+
ComponentPublicInstance,
|
|
9
|
+
watch,
|
|
10
|
+
provide,
|
|
11
|
+
inject,
|
|
12
|
+
renderSlot,
|
|
13
|
+
} from 'vue';
|
|
14
|
+
import {
|
|
15
|
+
IPanel,
|
|
16
|
+
IPanelContainer,
|
|
17
|
+
IPanelField,
|
|
18
|
+
IPanelItem,
|
|
19
|
+
IPanelTabPanel,
|
|
20
|
+
} from '@ibiz/model-core';
|
|
21
|
+
import {
|
|
22
|
+
IControlProvider,
|
|
23
|
+
IController,
|
|
24
|
+
IPanelItemController,
|
|
25
|
+
IPanelItemProvider,
|
|
26
|
+
PanelController,
|
|
27
|
+
ScriptFactory,
|
|
28
|
+
filterPresetAttrs,
|
|
29
|
+
isDataContainer,
|
|
30
|
+
} from '@ibiz-template/runtime';
|
|
31
|
+
import { useControlController, useNamespace } from '../../../use';
|
|
32
|
+
import './panel.scss';
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* 绘制成员的attrs
|
|
36
|
+
* @author lxm
|
|
37
|
+
* @date 2024-03-19 03:48:00
|
|
38
|
+
* @param {IDEFormDetail} model
|
|
39
|
+
* @return {*} {IParams}
|
|
40
|
+
*/
|
|
41
|
+
function renderAttrs(
|
|
42
|
+
model: IPanelItem,
|
|
43
|
+
controller: IPanelItemController,
|
|
44
|
+
): IParams {
|
|
45
|
+
const attrs: IParams = {};
|
|
46
|
+
filterPresetAttrs(model.controlAttributes).forEach(item => {
|
|
47
|
+
if (item.attrName && item.attrValue) {
|
|
48
|
+
attrs[item.attrName!] = ScriptFactory.execSingleLine(item.attrValue!, {
|
|
49
|
+
...controller.panel.getEventArgs(),
|
|
50
|
+
data: controller.data,
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
return attrs;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* 绘制面板成员
|
|
59
|
+
*
|
|
60
|
+
* @author lxm
|
|
61
|
+
* @date 2023-02-07 05:58:43
|
|
62
|
+
* @param {IPanelItem} panelItem
|
|
63
|
+
* @param {PanelController} c
|
|
64
|
+
* @returns {*} {(VNode | undefined)}
|
|
65
|
+
*/
|
|
66
|
+
function renderPanelItem(
|
|
67
|
+
panelItem: IPanelItem,
|
|
68
|
+
c: PanelController,
|
|
69
|
+
ins: ComponentPublicInstance,
|
|
70
|
+
): VNode | undefined {
|
|
71
|
+
if ((panelItem as IPanelField).hidden) {
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
const { providers, panelItems } = c;
|
|
75
|
+
const provider = providers[panelItem.id!];
|
|
76
|
+
if (!provider) {
|
|
77
|
+
return (
|
|
78
|
+
<div>
|
|
79
|
+
{ibiz.i18n.t('vue3Util.control.unsupportedPanel', {
|
|
80
|
+
id: panelItem.id,
|
|
81
|
+
itemType: panelItem.itemType,
|
|
82
|
+
})}
|
|
83
|
+
</div>
|
|
84
|
+
);
|
|
85
|
+
}
|
|
86
|
+
const component = resolveComponent(provider.component);
|
|
87
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
88
|
+
let children: any;
|
|
89
|
+
// 占位类型成员填充外部对应的插槽。
|
|
90
|
+
if (panelItem.itemType === 'CTRLPOS' && ins.$slots[panelItem.id!]) {
|
|
91
|
+
children = (): VNode[] => {
|
|
92
|
+
return ins.$slots[panelItem.id!]!();
|
|
93
|
+
};
|
|
94
|
+
} else if (
|
|
95
|
+
panelItem.itemType === 'TABPANEL' &&
|
|
96
|
+
(panelItem as IPanelTabPanel).panelTabPages?.length
|
|
97
|
+
) {
|
|
98
|
+
children = (): (VNode | undefined)[] => {
|
|
99
|
+
return (panelItem as IPanelTabPanel).panelTabPages!.map(child => {
|
|
100
|
+
return renderPanelItem(child, c, ins);
|
|
101
|
+
});
|
|
102
|
+
};
|
|
103
|
+
} else if (isDataContainer(panelItem)) {
|
|
104
|
+
// 单项数据容器,多项数据容器不给子
|
|
105
|
+
children = undefined;
|
|
106
|
+
} else if ((panelItem as IPanelContainer).panelItems?.length) {
|
|
107
|
+
children = (): (VNode | undefined)[] => {
|
|
108
|
+
return (panelItem as IPanelContainer).panelItems!.map(child => {
|
|
109
|
+
return renderPanelItem(child, c, ins);
|
|
110
|
+
});
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
// 直接样式
|
|
115
|
+
let tempStyle = '';
|
|
116
|
+
if (panelItem.cssStyle) {
|
|
117
|
+
tempStyle = panelItem.cssStyle;
|
|
118
|
+
}
|
|
119
|
+
const panelItemC = panelItems[panelItem.id!]!;
|
|
120
|
+
|
|
121
|
+
const attrs = renderAttrs(panelItem, panelItemC);
|
|
122
|
+
|
|
123
|
+
// 动态样式
|
|
124
|
+
if (attrs.dynamicstyle) {
|
|
125
|
+
if (typeof attrs.dynamicstyle === 'object') {
|
|
126
|
+
tempStyle += Object.entries(attrs.dynamicstyle)
|
|
127
|
+
.map(([key, value]) => {
|
|
128
|
+
return `${key}:${value};`;
|
|
129
|
+
})
|
|
130
|
+
.join('');
|
|
131
|
+
} else {
|
|
132
|
+
tempStyle += attrs.dynamicstyle;
|
|
133
|
+
}
|
|
134
|
+
delete attrs.dynamicstyle;
|
|
135
|
+
}
|
|
136
|
+
if (ins?.$slots[panelItem.id!]) {
|
|
137
|
+
return renderSlot(ins.$slots, panelItem.id!, {
|
|
138
|
+
modelData: panelItem,
|
|
139
|
+
controller: panelItemC,
|
|
140
|
+
key: panelItem.id,
|
|
141
|
+
style: tempStyle,
|
|
142
|
+
attrs,
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
return h(
|
|
146
|
+
component,
|
|
147
|
+
{
|
|
148
|
+
modelData: panelItem,
|
|
149
|
+
controller: panelItemC,
|
|
150
|
+
key: panelItem.id,
|
|
151
|
+
style: tempStyle,
|
|
152
|
+
attrs,
|
|
153
|
+
},
|
|
154
|
+
children,
|
|
155
|
+
);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* 视图布局面板组件
|
|
160
|
+
*/
|
|
161
|
+
export const PanelControl = defineComponent({
|
|
162
|
+
name: 'IBizPanelControl',
|
|
163
|
+
props: {
|
|
164
|
+
/**
|
|
165
|
+
* @description 面板模型数据
|
|
166
|
+
*/
|
|
167
|
+
modelData: {
|
|
168
|
+
type: Object as PropType<IPanel>,
|
|
169
|
+
required: true,
|
|
170
|
+
},
|
|
171
|
+
/**
|
|
172
|
+
* @description 应用上下文对象
|
|
173
|
+
*/
|
|
174
|
+
context: { type: Object as PropType<IContext>, required: true },
|
|
175
|
+
/**
|
|
176
|
+
* @description 视图参数对象
|
|
177
|
+
* @default {}
|
|
178
|
+
*/
|
|
179
|
+
params: { type: Object as PropType<IParams>, default: () => ({}) },
|
|
180
|
+
/**
|
|
181
|
+
* @description 部件适配器
|
|
182
|
+
*/
|
|
183
|
+
provider: { type: Object as PropType<IControlProvider> },
|
|
184
|
+
/**
|
|
185
|
+
* @description 容器控制器,为上层部件控制器或视图控制器
|
|
186
|
+
*/
|
|
187
|
+
container: { type: Object as PropType<IController> },
|
|
188
|
+
/**
|
|
189
|
+
* @description 视图布局面板数据
|
|
190
|
+
*/
|
|
191
|
+
data: { type: Object as PropType<IData> },
|
|
192
|
+
/**
|
|
193
|
+
* @description 是否默认加载数据
|
|
194
|
+
* @default true
|
|
195
|
+
*/
|
|
196
|
+
loadDefault: { type: Boolean, default: true },
|
|
197
|
+
},
|
|
198
|
+
setup(props) {
|
|
199
|
+
const c = useControlController<PanelController>(
|
|
200
|
+
(...args) => new PanelController(...args, props.container),
|
|
201
|
+
);
|
|
202
|
+
const ns = useNamespace(`control-${c.model.controlType!.toLowerCase()}`);
|
|
203
|
+
|
|
204
|
+
watch(
|
|
205
|
+
() => props.data,
|
|
206
|
+
newVal => {
|
|
207
|
+
if (newVal) {
|
|
208
|
+
c.setInputData(newVal);
|
|
209
|
+
c.load();
|
|
210
|
+
}
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
immediate: true,
|
|
214
|
+
},
|
|
215
|
+
);
|
|
216
|
+
|
|
217
|
+
c.evt.on('onCreated', () => {
|
|
218
|
+
// 面板成员state响应式
|
|
219
|
+
const keys = Object.keys(c.panelItems);
|
|
220
|
+
keys.forEach(key => {
|
|
221
|
+
const panelItem = c.panelItems[key];
|
|
222
|
+
panelItem.state = reactive(panelItem.state);
|
|
223
|
+
});
|
|
224
|
+
});
|
|
225
|
+
// 获取上层的绘制函数
|
|
226
|
+
const parentRenderPanelItem = inject<
|
|
227
|
+
(
|
|
228
|
+
panelItem: IPanelItem,
|
|
229
|
+
options?: {
|
|
230
|
+
providers: {
|
|
231
|
+
[key: string]: IPanelItemProvider;
|
|
232
|
+
};
|
|
233
|
+
panelItems: {
|
|
234
|
+
[key: string]: IPanelItemController;
|
|
235
|
+
};
|
|
236
|
+
},
|
|
237
|
+
) => VNode | null
|
|
238
|
+
>('renderPanelItem')!;
|
|
239
|
+
|
|
240
|
+
if (parentRenderPanelItem) {
|
|
241
|
+
provide('renderPanelItem', parentRenderPanelItem);
|
|
242
|
+
} else {
|
|
243
|
+
provide('renderPanelItem', renderPanelItem);
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
return { c, ns };
|
|
247
|
+
},
|
|
248
|
+
render() {
|
|
249
|
+
const { state, model } = this.c;
|
|
250
|
+
return (
|
|
251
|
+
<iBizControlBase controller={this.c}>
|
|
252
|
+
<iBizRow class={this.ns.b('content')} layout={{ layout: 'FLEX' }}>
|
|
253
|
+
{state.isCreated &&
|
|
254
|
+
(this.$slots.default
|
|
255
|
+
? this.$slots.default({
|
|
256
|
+
panelItems: this.c.panelItems,
|
|
257
|
+
})
|
|
258
|
+
: model.rootPanelItems?.map(panelItem => {
|
|
259
|
+
const subC = this.c.panelItems[panelItem.id!];
|
|
260
|
+
// 视图布局面板的子默认布局改成flex
|
|
261
|
+
// eslint-disable-next-line no-param-reassign
|
|
262
|
+
panelItem.layoutPos!.layout = 'FLEX';
|
|
263
|
+
return (
|
|
264
|
+
<iBizCol layoutPos={panelItem.layoutPos} state={subC.state}>
|
|
265
|
+
{renderPanelItem(panelItem, this.c, this)}
|
|
266
|
+
</iBizCol>
|
|
267
|
+
);
|
|
268
|
+
}))}
|
|
269
|
+
</iBizRow>
|
|
270
|
+
</iBizControlBase>
|
|
271
|
+
);
|
|
272
|
+
},
|
|
273
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { registerControlProvider, ControlType } from '@ibiz-template/runtime';
|
|
2
|
+
import { App } from 'vue';
|
|
3
|
+
import { ViewLayoutPanelControl } from './view-layout-panel';
|
|
4
|
+
import { ViewLayoutPanelProvider } from './view-layout-panel.provider';
|
|
5
|
+
import { withInstall } from '../../../util';
|
|
6
|
+
|
|
7
|
+
export const IBizViewLayoutPanelControl = withInstall(
|
|
8
|
+
ViewLayoutPanelControl,
|
|
9
|
+
function (v: App) {
|
|
10
|
+
v.component(ViewLayoutPanelControl.name!, ViewLayoutPanelControl);
|
|
11
|
+
registerControlProvider(
|
|
12
|
+
ControlType.VIEW_LAYOUT_PANEL,
|
|
13
|
+
() => new ViewLayoutPanelProvider(),
|
|
14
|
+
);
|
|
15
|
+
},
|
|
16
|
+
);
|
|
17
|
+
|
|
18
|
+
export default IBizViewLayoutPanelControl;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { IControlProvider } from '@ibiz-template/runtime';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* 视图布局面板部件适配器
|
|
5
|
+
*
|
|
6
|
+
* @author lxm
|
|
7
|
+
* @date 2022-10-25 18:10:57
|
|
8
|
+
* @export
|
|
9
|
+
* @class ViewLayoutPanelProvider
|
|
10
|
+
* @implements {IControlProvider}
|
|
11
|
+
*/
|
|
12
|
+
export class ViewLayoutPanelProvider implements IControlProvider {
|
|
13
|
+
component: string = 'IBizViewLayoutPanelControl';
|
|
14
|
+
}
|