@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,308 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
|
+
import {
|
|
3
|
+
ControlController,
|
|
4
|
+
IControlProvider,
|
|
5
|
+
IViewLayoutPanelController,
|
|
6
|
+
PredefinedControlRender,
|
|
7
|
+
ScriptFactory,
|
|
8
|
+
} from '@ibiz-template/runtime';
|
|
9
|
+
import { IControlContainer } from '@ibiz/model-core';
|
|
10
|
+
import { fixJsonString } from '@ibiz-template/core';
|
|
11
|
+
import { isNil } from 'ramda';
|
|
12
|
+
import {
|
|
13
|
+
h,
|
|
14
|
+
VNode,
|
|
15
|
+
computed,
|
|
16
|
+
PropType,
|
|
17
|
+
reactive,
|
|
18
|
+
CSSProperties,
|
|
19
|
+
defineComponent,
|
|
20
|
+
resolveComponent,
|
|
21
|
+
} from 'vue';
|
|
22
|
+
import { useNamespace } from '../../use';
|
|
23
|
+
import './control-base.scss';
|
|
24
|
+
|
|
25
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
26
|
+
export const IBizControlBase: any = defineComponent({
|
|
27
|
+
name: 'IBizControlBase',
|
|
28
|
+
props: {
|
|
29
|
+
controller: {
|
|
30
|
+
type: Object as PropType<ControlController>,
|
|
31
|
+
required: true,
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
setup(props) {
|
|
35
|
+
const ns = useNamespace('control');
|
|
36
|
+
const { controlType, sysCss, codeName } = props.controller.model;
|
|
37
|
+
const typeClass = controlType!.toLowerCase();
|
|
38
|
+
const sysCssName = sysCss?.cssName;
|
|
39
|
+
const model = props.controller.model;
|
|
40
|
+
|
|
41
|
+
/** 子部件模型 */
|
|
42
|
+
const controls = (props.controller.model as IControlContainer).controls;
|
|
43
|
+
|
|
44
|
+
const onLayoutPanelCreated = (
|
|
45
|
+
controller: IViewLayoutPanelController,
|
|
46
|
+
): void => {
|
|
47
|
+
props.controller.setLayoutPanel(controller as IViewLayoutPanelController);
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
const inlineStyle = reactive<CSSProperties>({});
|
|
51
|
+
// 非导航栏时才输出宽高
|
|
52
|
+
if (model.controlType!.endsWith('EXPBAR') === false) {
|
|
53
|
+
if (!isNil(model.width)) {
|
|
54
|
+
if (model.width > 0 && model.width <= 1) {
|
|
55
|
+
inlineStyle.width = `${model.width * 100}%`;
|
|
56
|
+
} else {
|
|
57
|
+
inlineStyle.width = `${model.width}px`;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
if (!isNil(model.height)) {
|
|
61
|
+
if (model.height > 0 && model.height <= 1) {
|
|
62
|
+
inlineStyle.width = `${model.height * 100}%`;
|
|
63
|
+
} else {
|
|
64
|
+
inlineStyle.height = `${model.height}px`;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* 处理html事件
|
|
71
|
+
*
|
|
72
|
+
* @param {MouseEvent} e
|
|
73
|
+
* @param {string} eventName
|
|
74
|
+
*/
|
|
75
|
+
const handleHtmlEvent = async (e: MouseEvent, eventName: string) => {
|
|
76
|
+
e.stopPropagation();
|
|
77
|
+
const scriptCode = (e.target as HTMLElement).getAttribute(eventName);
|
|
78
|
+
const data = (e.target as HTMLElement).getAttribute('data');
|
|
79
|
+
const context = props.controller.context.clone();
|
|
80
|
+
const _context = (e.target as HTMLElement).getAttribute('context');
|
|
81
|
+
if (_context) {
|
|
82
|
+
Object.assign(context, fixJsonString(_context));
|
|
83
|
+
}
|
|
84
|
+
const params = { ...props.controller.params };
|
|
85
|
+
const _params = (e.target as HTMLElement).getAttribute('params');
|
|
86
|
+
if (_params) {
|
|
87
|
+
Object.assign(params, fixJsonString(_params));
|
|
88
|
+
}
|
|
89
|
+
if (scriptCode) {
|
|
90
|
+
await ScriptFactory.asyncExecScriptFn(
|
|
91
|
+
{
|
|
92
|
+
...props.controller.getEventArgs(),
|
|
93
|
+
context,
|
|
94
|
+
params,
|
|
95
|
+
data: data ? fixJsonString(data) : null,
|
|
96
|
+
},
|
|
97
|
+
scriptCode,
|
|
98
|
+
);
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* 获取部件绘制器
|
|
104
|
+
*
|
|
105
|
+
* @param {(IData[] | IData | undefined)} data
|
|
106
|
+
* @return {*} {(VNode | undefined)}
|
|
107
|
+
*/
|
|
108
|
+
const getControlRender = (
|
|
109
|
+
data: IData[] | IData | undefined,
|
|
110
|
+
): VNode | undefined => {
|
|
111
|
+
// 过滤空数据显示内容绘制器
|
|
112
|
+
let controlRenders = model.controlRenders
|
|
113
|
+
? model.controlRenders.filter(
|
|
114
|
+
item =>
|
|
115
|
+
!(Object.values(PredefinedControlRender) as string[]).includes(
|
|
116
|
+
item.id!,
|
|
117
|
+
) && item.renderType === 'LAYOUTPANEL_MODEL',
|
|
118
|
+
)
|
|
119
|
+
: undefined;
|
|
120
|
+
// 数据看板应排除预置门户部件绘制器(以_header、_header_caption、_header_bg、_header_action结尾)
|
|
121
|
+
if (
|
|
122
|
+
controlRenders &&
|
|
123
|
+
controlRenders.length > 0 &&
|
|
124
|
+
model.controlType === 'DASHBOARD'
|
|
125
|
+
) {
|
|
126
|
+
controlRenders = controlRenders.filter(
|
|
127
|
+
item =>
|
|
128
|
+
!(
|
|
129
|
+
item.id!.endsWith('_header') ||
|
|
130
|
+
item.id!.endsWith('_header_caption') ||
|
|
131
|
+
item.id!.endsWith('_header_bg') ||
|
|
132
|
+
item.id!.endsWith('_header_action')
|
|
133
|
+
),
|
|
134
|
+
);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
if (!controlRenders || controlRenders.length === 0) {
|
|
138
|
+
return undefined;
|
|
139
|
+
}
|
|
140
|
+
const controlRender = controlRenders[0];
|
|
141
|
+
if (controlRender.layoutPanelModel) {
|
|
142
|
+
const htmlCode = ScriptFactory.execScriptFn(
|
|
143
|
+
{
|
|
144
|
+
...props.controller.getEventArgs(),
|
|
145
|
+
data,
|
|
146
|
+
},
|
|
147
|
+
controlRender.layoutPanelModel,
|
|
148
|
+
{ isAsync: false },
|
|
149
|
+
) as string;
|
|
150
|
+
return (
|
|
151
|
+
<div
|
|
152
|
+
v-html={htmlCode}
|
|
153
|
+
onClick={(e: MouseEvent) => handleHtmlEvent(e, 'click')}
|
|
154
|
+
onDblclick={(e: MouseEvent) => handleHtmlEvent(e, 'dbclick')}
|
|
155
|
+
class={[
|
|
156
|
+
ns.e('control-render'),
|
|
157
|
+
ns.e(controlRender.renderName?.toLowerCase()),
|
|
158
|
+
]}
|
|
159
|
+
></div>
|
|
160
|
+
);
|
|
161
|
+
}
|
|
162
|
+
// 视图布局面板类型由部件自身管理 #PLM知识管理树
|
|
163
|
+
};
|
|
164
|
+
|
|
165
|
+
const customRender = computed(() => {
|
|
166
|
+
const data =
|
|
167
|
+
(props.controller as any).data || (props.controller as any).items;
|
|
168
|
+
return getControlRender(data);
|
|
169
|
+
});
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* @description 禁用部件遮罩信息绘制
|
|
173
|
+
*/
|
|
174
|
+
const disableMaskInfoRender = (): VNode | undefined => {
|
|
175
|
+
const disableRender = model.controlRenders
|
|
176
|
+
? model.controlRenders.find(
|
|
177
|
+
item => item.id === PredefinedControlRender.DISABLEPANEL,
|
|
178
|
+
)
|
|
179
|
+
: undefined;
|
|
180
|
+
if (!disableRender) {
|
|
181
|
+
return (
|
|
182
|
+
<div
|
|
183
|
+
v-html={props.controller.state.maskOption.maskInfo || ''}
|
|
184
|
+
class={[ns.e('disable-mask-text')]}
|
|
185
|
+
></div>
|
|
186
|
+
);
|
|
187
|
+
}
|
|
188
|
+
if (
|
|
189
|
+
disableRender.renderType === 'LAYOUTPANEL_MODEL' &&
|
|
190
|
+
disableRender.layoutPanelModel
|
|
191
|
+
) {
|
|
192
|
+
const htmlCode = ScriptFactory.execScriptFn(
|
|
193
|
+
{
|
|
194
|
+
...props.controller.getEventArgs(),
|
|
195
|
+
},
|
|
196
|
+
disableRender.layoutPanelModel,
|
|
197
|
+
{ isAsync: false, singleRowReturn: true },
|
|
198
|
+
) as string;
|
|
199
|
+
return (
|
|
200
|
+
<div v-html={htmlCode} class={[ns.e('disable-mask-text')]}></div>
|
|
201
|
+
);
|
|
202
|
+
}
|
|
203
|
+
if (
|
|
204
|
+
disableRender.renderType === 'LAYOUTPANEL' &&
|
|
205
|
+
disableRender.layoutPanel
|
|
206
|
+
) {
|
|
207
|
+
return (
|
|
208
|
+
<iBizControlShell
|
|
209
|
+
class={[ns.e('disable-mask-text')]}
|
|
210
|
+
data={{}}
|
|
211
|
+
params={props.controller.params}
|
|
212
|
+
context={props.controller.context}
|
|
213
|
+
modelData={disableRender.layoutPanel}
|
|
214
|
+
></iBizControlShell>
|
|
215
|
+
);
|
|
216
|
+
}
|
|
217
|
+
};
|
|
218
|
+
|
|
219
|
+
return {
|
|
220
|
+
ns,
|
|
221
|
+
typeClass,
|
|
222
|
+
sysCssName,
|
|
223
|
+
inlineStyle,
|
|
224
|
+
codeName,
|
|
225
|
+
controls,
|
|
226
|
+
customRender,
|
|
227
|
+
disableMaskInfoRender,
|
|
228
|
+
onLayoutPanelCreated,
|
|
229
|
+
};
|
|
230
|
+
},
|
|
231
|
+
render() {
|
|
232
|
+
const { state, controlPanel, providers } = this.controller;
|
|
233
|
+
let layoutPanel = null;
|
|
234
|
+
// 有部件布局的绘制布局面板
|
|
235
|
+
if (state.isCreated && controlPanel) {
|
|
236
|
+
// 绘制部件插槽,外部插槽优先
|
|
237
|
+
const slots: IData = {
|
|
238
|
+
...this.$slots,
|
|
239
|
+
};
|
|
240
|
+
|
|
241
|
+
if (this.controls?.length) {
|
|
242
|
+
this.controls.forEach(ctrl => {
|
|
243
|
+
const slotKey = ctrl.name!;
|
|
244
|
+
const ctrlProps = {
|
|
245
|
+
context: this.controller.context,
|
|
246
|
+
params: this.controller.params,
|
|
247
|
+
};
|
|
248
|
+
// 已经有插槽的不用自己绘制了。
|
|
249
|
+
const outCtrlSlot = slots[slotKey];
|
|
250
|
+
if (outCtrlSlot) {
|
|
251
|
+
slots[slotKey] = (): VNode => {
|
|
252
|
+
return outCtrlSlot(ctrlProps);
|
|
253
|
+
};
|
|
254
|
+
} else {
|
|
255
|
+
slots[slotKey] = (): VNode => {
|
|
256
|
+
const comp = resolveComponent('IBizControlShell') as string;
|
|
257
|
+
return h(comp, {
|
|
258
|
+
modelData: ctrl,
|
|
259
|
+
...ctrlProps,
|
|
260
|
+
});
|
|
261
|
+
};
|
|
262
|
+
}
|
|
263
|
+
});
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
// 绘制布局面板
|
|
267
|
+
const provider = providers[controlPanel.name!] as IControlProvider;
|
|
268
|
+
layoutPanel = h(
|
|
269
|
+
resolveComponent(provider.component) as string,
|
|
270
|
+
{
|
|
271
|
+
modelData: controlPanel,
|
|
272
|
+
context: this.controller.context,
|
|
273
|
+
params: this.controller.params,
|
|
274
|
+
provider,
|
|
275
|
+
container: this.controller,
|
|
276
|
+
onControllerAppear: this.onLayoutPanelCreated,
|
|
277
|
+
},
|
|
278
|
+
slots,
|
|
279
|
+
);
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
return (
|
|
283
|
+
<div
|
|
284
|
+
class={[
|
|
285
|
+
this.ns.b(),
|
|
286
|
+
this.ns.b(this.typeClass),
|
|
287
|
+
this.ns.m(this.codeName),
|
|
288
|
+
this.sysCssName,
|
|
289
|
+
this.ns.is('disabled', state.disabled),
|
|
290
|
+
this.ns.is('mob', ibiz.env.isMob),
|
|
291
|
+
]}
|
|
292
|
+
style={this.inlineStyle}
|
|
293
|
+
>
|
|
294
|
+
{this.customRender || layoutPanel || this.$slots.default?.()}
|
|
295
|
+
{state.disabled && (
|
|
296
|
+
<div
|
|
297
|
+
class={[
|
|
298
|
+
this.ns.e('mask-container'),
|
|
299
|
+
this.ns.m(state.maskOption.mode.toLowerCase()),
|
|
300
|
+
]}
|
|
301
|
+
>
|
|
302
|
+
{state.maskOption.mode === 'MASK' && this.disableMaskInfoRender()}
|
|
303
|
+
</div>
|
|
304
|
+
)}
|
|
305
|
+
</div>
|
|
306
|
+
);
|
|
307
|
+
},
|
|
308
|
+
});
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { CTX } from '@ibiz-template/runtime';
|
|
2
|
+
import { defineComponent, inject, PropType } from 'vue';
|
|
3
|
+
|
|
4
|
+
export const ControlLoadingPlaceholder = defineComponent({
|
|
5
|
+
name: 'ControlLoadingPlaceholder',
|
|
6
|
+
props: {
|
|
7
|
+
modelData: { type: Object as PropType<IData>, required: true },
|
|
8
|
+
context: { type: Object as PropType<IContext>, required: true },
|
|
9
|
+
params: { type: Object as PropType<IParams>, default: () => ({}) },
|
|
10
|
+
},
|
|
11
|
+
setup(props) {
|
|
12
|
+
// 上下文里提前预告部件
|
|
13
|
+
const ctx = inject('ctx') as CTX;
|
|
14
|
+
|
|
15
|
+
ctx.evt.emit('onForecast', props.modelData.name!);
|
|
16
|
+
|
|
17
|
+
return {};
|
|
18
|
+
},
|
|
19
|
+
render() {
|
|
20
|
+
return null;
|
|
21
|
+
},
|
|
22
|
+
});
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/* eslint-disable no-param-reassign */
|
|
2
|
+
/* eslint-disable vue/no-mutating-props */
|
|
3
|
+
import {
|
|
4
|
+
CTX,
|
|
5
|
+
getControlProvider,
|
|
6
|
+
IControlProvider,
|
|
7
|
+
ViewController,
|
|
8
|
+
ViewType,
|
|
9
|
+
} from '@ibiz-template/runtime';
|
|
10
|
+
import {
|
|
11
|
+
defineComponent,
|
|
12
|
+
h,
|
|
13
|
+
inject,
|
|
14
|
+
PropType,
|
|
15
|
+
provide,
|
|
16
|
+
ref,
|
|
17
|
+
resolveComponent,
|
|
18
|
+
} from 'vue';
|
|
19
|
+
import './control-shell.scss';
|
|
20
|
+
import { IAppView, IControl } from '@ibiz/model-core';
|
|
21
|
+
import { IBizContext } from '@ibiz-template/core';
|
|
22
|
+
import { useNamespace } from '../../use';
|
|
23
|
+
|
|
24
|
+
export const IBizControlShell = defineComponent({
|
|
25
|
+
name: 'IBizControlShell',
|
|
26
|
+
props: {
|
|
27
|
+
modelData: { type: Object as PropType<IControl>, required: true },
|
|
28
|
+
},
|
|
29
|
+
setup(props) {
|
|
30
|
+
// 上下文里提前预告部件
|
|
31
|
+
const ctx = inject('ctx') as CTX;
|
|
32
|
+
if (ctx) {
|
|
33
|
+
ctx.evt.emit('onForecast', props.modelData.name!);
|
|
34
|
+
} else {
|
|
35
|
+
// 没有的时候模拟一个给下级
|
|
36
|
+
const viewModel: IAppView = {
|
|
37
|
+
name: 'AppView',
|
|
38
|
+
id: 'AppView',
|
|
39
|
+
viewType: ViewType.DE_CUSTOM_VIEW,
|
|
40
|
+
appId: ibiz.env.appId,
|
|
41
|
+
};
|
|
42
|
+
provide(
|
|
43
|
+
'ctx',
|
|
44
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
45
|
+
(new ViewController(viewModel, IBizContext.create({})) as any).ctx,
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
const isComplete = ref(false);
|
|
50
|
+
const errMsg = ref('');
|
|
51
|
+
const provider = ref<IControlProvider>();
|
|
52
|
+
getControlProvider(props.modelData)
|
|
53
|
+
.then(item => {
|
|
54
|
+
if (!item) {
|
|
55
|
+
errMsg.value = ibiz.i18n.t(
|
|
56
|
+
'vue3Util.common.onFoundCorrespondingPart',
|
|
57
|
+
);
|
|
58
|
+
} else {
|
|
59
|
+
provider.value = item;
|
|
60
|
+
}
|
|
61
|
+
isComplete.value = true;
|
|
62
|
+
})
|
|
63
|
+
.catch(err => {
|
|
64
|
+
ibiz.log.error(err);
|
|
65
|
+
errMsg.value = err.message;
|
|
66
|
+
isComplete.value = true;
|
|
67
|
+
});
|
|
68
|
+
const ns = useNamespace('control-shell');
|
|
69
|
+
|
|
70
|
+
return { ns, isComplete, errMsg, provider };
|
|
71
|
+
},
|
|
72
|
+
render() {
|
|
73
|
+
if (this.isComplete && this.provider) {
|
|
74
|
+
return h(
|
|
75
|
+
resolveComponent(this.provider.component) as string,
|
|
76
|
+
{
|
|
77
|
+
provider: this.provider,
|
|
78
|
+
...this.$props,
|
|
79
|
+
...this.$attrs,
|
|
80
|
+
},
|
|
81
|
+
this.$slots,
|
|
82
|
+
);
|
|
83
|
+
}
|
|
84
|
+
return (
|
|
85
|
+
<div class={this.ns.b()} v-loading={!this.isComplete}>
|
|
86
|
+
{this.isComplete ? this.errMsg : null}
|
|
87
|
+
</div>
|
|
88
|
+
);
|
|
89
|
+
},
|
|
90
|
+
});
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { defineComponent, PropType, VNode } from 'vue';
|
|
2
|
+
import {
|
|
3
|
+
ControlController,
|
|
4
|
+
PredefinedControlRender,
|
|
5
|
+
ScriptFactory,
|
|
6
|
+
} from '@ibiz-template/runtime';
|
|
7
|
+
import { fixJsonString } from '@ibiz-template/core';
|
|
8
|
+
import { useNamespace } from '../../use';
|
|
9
|
+
import './custom-render.scss';
|
|
10
|
+
|
|
11
|
+
export const IBizCustomRender = defineComponent({
|
|
12
|
+
name: 'IBizCustomRender',
|
|
13
|
+
props: {
|
|
14
|
+
controller: {
|
|
15
|
+
type: Object as PropType<ControlController>,
|
|
16
|
+
required: true,
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
setup(props) {
|
|
20
|
+
const ns = useNamespace('custom-render');
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* 处理html事件
|
|
24
|
+
*
|
|
25
|
+
* @param {MouseEvent} e
|
|
26
|
+
* @param {string} eventName
|
|
27
|
+
*/
|
|
28
|
+
const handleHtmlEvent = async (e: MouseEvent, eventName: string) => {
|
|
29
|
+
e.stopPropagation();
|
|
30
|
+
const scriptCode = (e.target as HTMLElement).getAttribute(eventName);
|
|
31
|
+
const data = (e.target as HTMLElement).getAttribute('data');
|
|
32
|
+
const context = props.controller.context.clone();
|
|
33
|
+
const _context = (e.target as HTMLElement).getAttribute('context');
|
|
34
|
+
if (_context) {
|
|
35
|
+
Object.assign(context, fixJsonString(_context));
|
|
36
|
+
}
|
|
37
|
+
const params = { ...props.controller.params };
|
|
38
|
+
const _params = (e.target as HTMLElement).getAttribute('params');
|
|
39
|
+
if (_params) {
|
|
40
|
+
Object.assign(params, fixJsonString(_params));
|
|
41
|
+
}
|
|
42
|
+
if (scriptCode) {
|
|
43
|
+
await ScriptFactory.asyncExecScriptFn(
|
|
44
|
+
{
|
|
45
|
+
...props.controller.getEventArgs(),
|
|
46
|
+
context,
|
|
47
|
+
params,
|
|
48
|
+
data: data ? fixJsonString(data) : null,
|
|
49
|
+
},
|
|
50
|
+
scriptCode,
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* 获取无数据绘制器
|
|
57
|
+
*
|
|
58
|
+
* @return {*} {(VNode | undefined)}
|
|
59
|
+
*/
|
|
60
|
+
const getControlRender = (): VNode | undefined => {
|
|
61
|
+
const controlRenders = props.controller?.model.controlRenders;
|
|
62
|
+
if (!controlRenders || controlRenders.length === 0) {
|
|
63
|
+
return undefined;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
const noDataRender = controlRenders.find(
|
|
67
|
+
item => item.id === PredefinedControlRender.EMPTYPANEL,
|
|
68
|
+
);
|
|
69
|
+
|
|
70
|
+
if (!noDataRender) return undefined;
|
|
71
|
+
|
|
72
|
+
if (
|
|
73
|
+
noDataRender.renderType === 'LAYOUTPANEL_MODEL' &&
|
|
74
|
+
noDataRender.layoutPanelModel
|
|
75
|
+
) {
|
|
76
|
+
const htmlCode = ScriptFactory.execScriptFn(
|
|
77
|
+
{
|
|
78
|
+
...props.controller.getEventArgs(),
|
|
79
|
+
},
|
|
80
|
+
noDataRender.layoutPanelModel,
|
|
81
|
+
{ isAsync: false },
|
|
82
|
+
) as string;
|
|
83
|
+
return (
|
|
84
|
+
<div
|
|
85
|
+
v-html={htmlCode}
|
|
86
|
+
onClick={(e: MouseEvent) => handleHtmlEvent(e, 'click')}
|
|
87
|
+
onDblclick={(e: MouseEvent) => handleHtmlEvent(e, 'dbclick')}
|
|
88
|
+
class={[ns.b(), ns.e(noDataRender.renderName?.toLowerCase())]}
|
|
89
|
+
></div>
|
|
90
|
+
);
|
|
91
|
+
}
|
|
92
|
+
if (
|
|
93
|
+
noDataRender.renderType === 'LAYOUTPANEL' &&
|
|
94
|
+
noDataRender.layoutPanel
|
|
95
|
+
) {
|
|
96
|
+
return (
|
|
97
|
+
<iBizControlShell
|
|
98
|
+
class={[ns.b(), ns.e(noDataRender.renderName?.toLowerCase())]}
|
|
99
|
+
params={props.controller.params}
|
|
100
|
+
context={props.controller.context}
|
|
101
|
+
modelData={noDataRender.layoutPanel}
|
|
102
|
+
></iBizControlShell>
|
|
103
|
+
);
|
|
104
|
+
}
|
|
105
|
+
};
|
|
106
|
+
return { ns, getControlRender };
|
|
107
|
+
},
|
|
108
|
+
render() {
|
|
109
|
+
return this.getControlRender();
|
|
110
|
+
},
|
|
111
|
+
});
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { defineComponent, PropType, VNode, computed } from 'vue';
|
|
2
|
+
import { ISysImage } from '@ibiz/model-core';
|
|
3
|
+
import { IIcon } from '@ibiz-template/runtime';
|
|
4
|
+
import {
|
|
5
|
+
base64ToStr,
|
|
6
|
+
isBase64,
|
|
7
|
+
isBase64Image,
|
|
8
|
+
isSvg,
|
|
9
|
+
} from '@ibiz-template/core';
|
|
10
|
+
import { useNamespace } from '../../use';
|
|
11
|
+
import './icon.scss';
|
|
12
|
+
|
|
13
|
+
export const IBizIcon = defineComponent({
|
|
14
|
+
name: 'IBizIcon',
|
|
15
|
+
props: {
|
|
16
|
+
icon: {
|
|
17
|
+
type: Object as PropType<ISysImage | IIcon>,
|
|
18
|
+
},
|
|
19
|
+
size: {
|
|
20
|
+
type: String as PropType<'small' | 'medium' | 'large'>,
|
|
21
|
+
},
|
|
22
|
+
baseDir: {
|
|
23
|
+
type: String,
|
|
24
|
+
default: 'images',
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
setup(props) {
|
|
28
|
+
const ns = useNamespace('icon');
|
|
29
|
+
const BaseUrl = `${ibiz.env.assetsUrl}/${props.baseDir}/`;
|
|
30
|
+
|
|
31
|
+
function getContent(icon?: IData): VNode | null {
|
|
32
|
+
if (icon) {
|
|
33
|
+
if (icon.htmlStr) {
|
|
34
|
+
return <span class={ns.b()} v-html={icon.htmlStr}></span>;
|
|
35
|
+
}
|
|
36
|
+
if (icon.cssClass) {
|
|
37
|
+
if (icon.cssClass.indexOf('fa-') !== -1) {
|
|
38
|
+
return <i class={[ns.b(), icon.cssClass]} />;
|
|
39
|
+
}
|
|
40
|
+
if (icon.cssClass.indexOf('theme-icon') !== -1) {
|
|
41
|
+
return <i class={[ns.b(), icon.cssClass]}></i>;
|
|
42
|
+
}
|
|
43
|
+
return <ion-icon class={ns.b()} name={icon.cssClass}></ion-icon>;
|
|
44
|
+
}
|
|
45
|
+
if (icon.imagePath) {
|
|
46
|
+
// base64格式内容
|
|
47
|
+
if (isBase64Image(icon.imagePath)) {
|
|
48
|
+
return <img class={ns.b()} src={icon.imagePath}></img>;
|
|
49
|
+
}
|
|
50
|
+
// UTF-8 表情字符
|
|
51
|
+
if (isBase64(icon.imagePath)) {
|
|
52
|
+
return (
|
|
53
|
+
<div class={[ns.b(), ns.e('emoji')]}>
|
|
54
|
+
{base64ToStr(icon.imagePath)}
|
|
55
|
+
</div>
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
// svg内容
|
|
59
|
+
if (isSvg(icon.imagePath)) {
|
|
60
|
+
return <div class={ns.b()} v-html={icon.imagePath}></div>;
|
|
61
|
+
}
|
|
62
|
+
// 以svg结尾
|
|
63
|
+
if (icon.imagePath.endsWith('svg')) {
|
|
64
|
+
// 远程svg
|
|
65
|
+
if (icon.imagePath.startsWith('http')) {
|
|
66
|
+
return <img class={ns.b()} src={icon.imagePath}></img>;
|
|
67
|
+
}
|
|
68
|
+
// 本地svg
|
|
69
|
+
if (icon.imagePath.startsWith(ibiz.env.assetsUrl)) {
|
|
70
|
+
return <ion-icon src={icon.imagePath} class={ns.b()}></ion-icon>;
|
|
71
|
+
}
|
|
72
|
+
return (
|
|
73
|
+
<ion-icon
|
|
74
|
+
src={BaseUrl + icon.imagePath}
|
|
75
|
+
class={ns.b()}
|
|
76
|
+
></ion-icon>
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
// 远程图片
|
|
80
|
+
if (icon.imagePath.startsWith('http')) {
|
|
81
|
+
return <img class={ns.b()} src={icon.imagePath} />;
|
|
82
|
+
}
|
|
83
|
+
// 本地图片
|
|
84
|
+
if (icon.imagePath.startsWith(ibiz.env.assetsUrl)) {
|
|
85
|
+
return <img class={ns.b()} src={icon.imagePath} />;
|
|
86
|
+
}
|
|
87
|
+
return <img class={ns.b()} src={BaseUrl + icon.imagePath} />;
|
|
88
|
+
}
|
|
89
|
+
if (icon.rawContent) {
|
|
90
|
+
if (isSvg(icon.rawContent)) {
|
|
91
|
+
return <div class={ns.b()} v-html={icon.rawContent}></div>;
|
|
92
|
+
}
|
|
93
|
+
return <img class={ns.b()} src={icon.rawContent} />;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
return null;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
const content = computed<VNode | null>(() => {
|
|
100
|
+
return getContent(props.icon);
|
|
101
|
+
});
|
|
102
|
+
|
|
103
|
+
return (): VNode | null => content.value;
|
|
104
|
+
},
|
|
105
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * from './icon/icon';
|
|
2
|
+
export * from './router-view/router-view';
|
|
3
|
+
export * from './control-base/control-base';
|
|
4
|
+
export * from './control-shell/control-shell';
|
|
5
|
+
export * from './view-shell/view-shell';
|
|
6
|
+
export * from './code-list/code-list';
|
|
7
|
+
export * from './control-loading-placeholder/control-loading-placeholder';
|
|
8
|
+
export * from './badge/badge';
|
|
9
|
+
export * from './custom-render/custom-render';
|
|
10
|
+
export * from './signature-pad/signature-pad';
|