@gct-paas/design 0.1.4-dev.1 → 0.1.4-dev.11
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/assets/transform-js.worker-CeYFqnkk.js +638 -0
- package/dist/index.esm.min.mjs +18089 -0
- package/dist/index.min.cjs +3 -1
- package/dist/index.min.css +1 -0
- package/dist/index.system.min.js +3 -1
- package/es/_virtual/_plugin-vue_export-helper.mjs +9 -0
- package/es/assets/transform-js.worker-D2HSS5w_.js +270718 -0
- package/es/components/design-icon-button/design-icon-button.css +101 -0
- package/es/components/design-icon-button/design-icon-button.d.ts +104 -0
- package/es/components/design-icon-button/design-icon-button.mjs +150 -0
- package/es/components/design-save-tip/design-save-tip.css +107 -0
- package/es/components/design-save-tip/design-save-tip.d.ts +44 -0
- package/es/components/design-save-tip/design-save-tip.mjs +107 -0
- package/es/components/design-step-check/design-step-check.css +133 -0
- package/es/components/design-step-check/design-step-check.d.ts +30 -0
- package/es/components/design-step-check/design-step-check.mjs +122 -0
- package/es/components/design-view-layout/design-view-layout.css +157 -0
- package/es/components/design-view-layout/design-view-layout.d.ts +1 -0
- package/es/components/design-view-layout/design-view-layout.mjs +209 -0
- package/es/components/editor/index.d.ts +5 -0
- package/es/components/editor/index.mjs +15 -0
- package/es/components/editor/style/border-editor/border-box.css +144 -0
- package/es/components/editor/style/border-editor/border-box.vue.d.ts +10 -0
- package/es/components/editor/style/border-editor/border-box.vue2.mjs +7 -0
- package/es/components/editor/style/border-editor/border-box.vue3.mjs +305 -0
- package/es/components/editor/style/border-editor/border-editor.css +64 -0
- package/es/components/editor/style/border-editor/border-editor.vue.d.ts +13 -0
- package/es/components/editor/style/border-editor/border-editor.vue2.mjs +7 -0
- package/es/components/editor/style/border-editor/border-editor.vue3.mjs +60 -0
- package/es/components/editor/style/border-editor/border-radius.css +102 -0
- package/es/components/editor/style/border-editor/border-radius.vue.d.ts +10 -0
- package/es/components/editor/style/border-editor/border-radius.vue2.mjs +7 -0
- package/es/components/editor/style/border-editor/border-radius.vue3.mjs +212 -0
- package/es/components/editor/style/border-editor/util.d.ts +19 -0
- package/es/components/editor/style/border-editor/util.mjs +77 -0
- package/es/components/editor/style/font-editor/align-group.css +28 -0
- package/es/components/editor/style/font-editor/align-group.vue.d.ts +10 -0
- package/es/components/editor/style/font-editor/align-group.vue2.mjs +7 -0
- package/es/components/editor/style/font-editor/align-group.vue3.mjs +66 -0
- package/es/components/editor/style/font-editor/font-editor.vue.d.ts +10 -0
- package/es/components/editor/style/font-editor/font-editor.vue.mjs +72 -0
- package/es/components/editor/style/font-editor/font-editor.vue2.mjs +5 -0
- package/es/components/editor/style/font-editor/font-style-group.css +29 -0
- package/es/components/editor/style/font-editor/font-style-group.vue.d.ts +11 -0
- package/es/components/editor/style/font-editor/font-style-group.vue2.mjs +7 -0
- package/es/components/editor/style/font-editor/font-style-group.vue3.mjs +105 -0
- package/es/components/editor/style/font-editor/util.d.ts +2 -0
- package/es/components/editor/style/font-editor/util.mjs +12 -0
- package/es/components/editor/style/position-editor/position-editor.css +158 -0
- package/es/components/editor/style/position-editor/position-editor.vue.d.ts +12 -0
- package/es/components/editor/style/position-editor/position-editor.vue2.mjs +7 -0
- package/es/components/editor/style/position-editor/position-editor.vue3.mjs +242 -0
- package/es/components/editor/style/spacing-editor/spacing-editor.css +135 -0
- package/es/components/editor/style/spacing-editor/spacing-editor.vue.d.ts +16 -0
- package/es/components/editor/style/spacing-editor/spacing-editor.vue2.mjs +7 -0
- package/es/components/editor/style/spacing-editor/spacing-editor.vue3.mjs +311 -0
- package/es/components/field-cascader/index.d.ts +2 -0
- package/es/components/field-cascader/src/FieldCascader.css +69 -0
- package/es/components/field-cascader/src/FieldCascader.vue.d.ts +87 -0
- package/es/components/field-cascader/src/FieldCascader.vue.mjs +129 -0
- package/es/components/field-cascader/src/FieldCascader.vue3.mjs +6 -0
- package/es/components/field-cascader/src/SearchInput.css +9 -0
- package/es/components/field-cascader/src/SearchInput.vue.d.ts +11 -0
- package/es/components/field-cascader/src/SearchInput.vue.mjs +7 -0
- package/es/components/field-cascader/src/SearchInput.vue2.mjs +48 -0
- package/es/components/field-cascader/src/hooks.d.ts +129 -0
- package/es/components/field-cascader/src/hooks.mjs +205 -0
- package/es/components/field-transfer/components/Cascader/FieldCascader.d.ts +25 -0
- package/es/components/field-transfer/components/Cascader/FieldCascader.mjs +250 -0
- package/es/components/field-transfer/components/Transfer/AdvancedColumnSetting.d.ts +46 -0
- package/es/components/field-transfer/components/Transfer/AdvancedColumnSetting.mjs +56 -0
- package/es/components/field-transfer/components/Transfer/AdvancedTransfer.d.ts +39 -0
- package/es/components/field-transfer/components/Transfer/AdvancedTransfer.mjs +160 -0
- package/es/components/field-transfer/components/Transfer/FieldTransfer.d.ts +83 -0
- package/es/components/field-transfer/components/Transfer/FieldTransfer.mjs +211 -0
- package/es/components/field-transfer/components/Transfer/TransferTree.d.ts +62 -0
- package/es/components/field-transfer/components/Transfer/TransferTree.mjs +117 -0
- package/es/components/field-transfer/components/Transfer/TreeItem.d.ts +17 -0
- package/es/components/field-transfer/components/Transfer/TreeItem.mjs +41 -0
- package/es/components/field-transfer/components/field-transfer-modal.css +5 -0
- package/es/components/field-transfer/components/field-transfer-modal.vue.d.ts +43 -0
- package/es/components/field-transfer/components/field-transfer-modal.vue2.mjs +7 -0
- package/es/components/field-transfer/components/field-transfer-modal.vue3.mjs +230 -0
- package/es/components/field-transfer/components/modal-wrapper.vue.d.ts +19 -0
- package/es/components/field-transfer/components/modal-wrapper.vue.mjs +29 -0
- package/es/components/field-transfer/components/modal-wrapper.vue2.mjs +5 -0
- package/es/components/field-transfer/hooks/useTreeData.d.ts +139 -0
- package/es/components/field-transfer/hooks/useTreeData.mjs +165 -0
- package/es/components/field-transfer/index.d.ts +21 -0
- package/es/components/field-transfer/less/AdvancedTransfer.css +60 -0
- package/es/components/field-transfer/less/FieldCascader.css +57 -0
- package/es/components/field-transfer/less/TransferTree.css +86 -0
- package/es/components/field-transfer/less/TreeItem.css +29 -0
- package/es/components/field-transfer/useFieldTransfer.d.ts +47 -0
- package/es/components/field-transfer/useFieldTransfer.mjs +51 -0
- package/es/components/field-transfer/utils/tree-tool.d.ts +6 -0
- package/es/components/field-transfer/utils/tree-tool.mjs +73 -0
- package/es/components/icon/downleft-icon.vue.d.ts +4 -0
- package/es/components/icon/downleft-icon.vue.mjs +11 -0
- package/es/components/icon/downleft-icon.vue2.mjs +27 -0
- package/es/components/icon/downright-icon.vue.d.ts +4 -0
- package/es/components/icon/downright-icon.vue.mjs +11 -0
- package/es/components/icon/downright-icon.vue2.mjs +27 -0
- package/es/components/icon/upleft-icon.vue.d.ts +4 -0
- package/es/components/icon/upleft-icon.vue.mjs +11 -0
- package/es/components/icon/upleft-icon.vue2.mjs +27 -0
- package/es/components/icon/upright-icon.vue.d.ts +4 -0
- package/es/components/icon/upright-icon.vue.mjs +11 -0
- package/es/components/icon/upright-icon.vue2.mjs +27 -0
- package/es/components/index.d.ts +12 -0
- package/es/components/index.mjs +59 -0
- package/es/components/mobile-container/mobile-container.css +134 -0
- package/es/components/mobile-container/mobile-container.d.ts +31 -0
- package/es/components/mobile-container/mobile-container.mjs +81 -0
- package/es/components/modal-name-editor/modal-name-editor.css +117 -0
- package/es/components/modal-name-editor/modal-name-editor.d.ts +44 -0
- package/es/components/modal-name-editor/modal-name-editor.mjs +174 -0
- package/es/components/user-occupy/index.d.ts +4 -0
- package/es/components/user-occupy/occupy.const.d.ts +4 -0
- package/es/components/user-occupy/occupy.const.mjs +3 -0
- package/es/components/user-occupy/useUserOccupy.d.ts +38 -0
- package/es/components/user-occupy/useUserOccupy.mjs +218 -0
- package/es/components/user-occupy/user-lock.css +29 -0
- package/es/components/user-occupy/user-lock.vue.d.ts +2 -0
- package/es/components/user-occupy/user-lock.vue.mjs +7 -0
- package/es/components/user-occupy/user-lock.vue3.mjs +35 -0
- package/es/components/user-occupy/user-occupy.css +25 -0
- package/es/components/user-occupy/user-occupy.vue.d.ts +2 -0
- package/es/components/user-occupy/user-occupy.vue.mjs +7 -0
- package/es/components/user-occupy/user-occupy.vue3.mjs +36 -0
- package/es/constant/design-editor-type.d.ts +50 -0
- package/es/constant/design-editor-type.mjs +15 -0
- package/es/constant/index.d.ts +256 -1
- package/es/constant/index.mjs +71 -2
- package/es/constant/page-designer.d.ts +75 -0
- package/es/constant/page-designer.mjs +52 -0
- package/es/create-app-vue.d.ts +8 -0
- package/es/create-app-vue.mjs +7 -0
- package/es/data/design-container-node/design-container-node.d.ts +15 -0
- package/es/data/design-container-node/design-container-node.mjs +6 -0
- package/es/data/design-editor-node/design-editor-node.d.ts +16 -0
- package/es/data/design-editor-node/design-editor-node.mjs +8 -0
- package/es/data/design-node/design-node.d.ts +41 -0
- package/es/data/design-node/design-node.mjs +67 -0
- package/es/data/index.d.ts +3 -0
- package/es/dictionary/index.d.ts +1 -0
- package/es/dictionary/tab-type/tab-type.d.ts +5 -0
- package/es/hooks/design-view/constants/style-editor.const.d.ts +24 -0
- package/es/hooks/design-view/constants/style-editor.const.mjs +53 -0
- package/es/hooks/design-view/design-state.d.ts +2572 -0
- package/es/hooks/design-view/design-state.mjs +127 -0
- package/es/hooks/design-view/designer/useDesignCache.d.ts +4 -0
- package/es/hooks/design-view/designer/useDesignCache.mjs +90 -0
- package/es/hooks/design-view/designer/useDesignHistory.d.ts +16 -0
- package/es/hooks/design-view/designer/useDesignHistory.mjs +102 -0
- package/es/hooks/design-view/designer/useDesignModal.d.ts +3133 -0
- package/es/hooks/design-view/designer/useDesignModal.mjs +98 -0
- package/es/hooks/design-view/designer/useDesignPreview.d.ts +11 -0
- package/es/hooks/design-view/designer/useDesignPreview.mjs +201 -0
- package/es/hooks/design-view/designer/useDesignSave.d.ts +12 -0
- package/es/hooks/design-view/designer/useDesignSave.mjs +302 -0
- package/es/hooks/design-view/editor/usePropEditor.d.ts +33 -0
- package/es/hooks/design-view/editor/usePropEditor.mjs +99 -0
- package/es/hooks/design-view/editor/useStyle.d.ts +21 -0
- package/es/hooks/design-view/editor/useStyle.mjs +30 -0
- package/es/hooks/design-view/editor/useStyleEditor.d.ts +30 -0
- package/es/hooks/design-view/editor/useStyleEditor.mjs +77 -0
- package/es/hooks/design-view/global/useGlobal.d.ts +1470 -0
- package/es/hooks/design-view/global/useGlobal.mjs +74 -0
- package/es/hooks/design-view/layout/useScope.d.ts +12 -0
- package/es/hooks/design-view/layout/useScope.mjs +106 -0
- package/es/hooks/design-view/layout/useToolkit.d.ts +400 -0
- package/es/hooks/design-view/layout/useToolkit.mjs +356 -0
- package/es/hooks/design-view/page/usePage.d.ts +57 -0
- package/es/hooks/design-view/page/usePage.mjs +227 -0
- package/es/hooks/design-view/page/usePageOccupy.d.ts +33 -0
- package/es/hooks/design-view/page/usePageOccupy.mjs +77 -0
- package/es/hooks/design-view/useDesigner.d.ts +4259 -0
- package/es/hooks/design-view/useDesigner.mjs +125 -0
- package/es/hooks/design-view/utils/color.util.d.ts +21 -0
- package/es/hooks/design-view/utils/color.util.mjs +36 -0
- package/es/hooks/design-view/utils/field-schema.util.d.ts +55 -0
- package/es/hooks/design-view/utils/field-schema.util.mjs +96 -0
- package/es/hooks/design-view/widget/useSelectedWidget.d.ts +53 -0
- package/es/hooks/design-view/widget/useSelectedWidget.mjs +227 -0
- package/es/hooks/design-view/widget/useWidget.d.ts +102 -0
- package/es/hooks/design-view/widget/useWidget.mjs +119 -0
- package/es/hooks/design-view/widget/useWidgetQuery.d.ts +13 -0
- package/es/hooks/design-view/widget/useWidgetQuery.mjs +88 -0
- package/es/hooks/design-view/widget/useWidgetRegistry.d.ts +11 -0
- package/es/hooks/design-view/widget/useWidgetRegistry.mjs +118 -0
- package/es/hooks/designer.hooks.d.ts +15 -0
- package/es/hooks/designer.hooks.mjs +12 -0
- package/es/hooks/develop/useCacheHistory.d.ts +67 -0
- package/es/hooks/develop/useCacheHistory.mjs +157 -0
- package/es/hooks/develop/useKeyParser.d.ts +16 -0
- package/es/hooks/develop/useKeyParser.mjs +67 -0
- package/es/hooks/index.d.ts +26 -1
- package/es/hooks/use-model-field/use-model-field.d.ts +32 -0
- package/es/hooks/use-model-field/use-model-field.mjs +344 -0
- package/es/hooks/widgets/useAsyncFields.d.ts +17 -0
- package/es/hooks/widgets/useAsyncFields.mjs +177 -0
- package/es/hooks/widgets/useFileAttrsHooks.d.ts +28 -0
- package/es/hooks/widgets/useFileAttrsHooks.mjs +39 -0
- package/es/index.d.ts +9 -3
- package/es/index.mjs +103 -20
- package/es/interface/actions/i-design-view.actions.d.ts +217 -0
- package/es/interface/controller/i-design-view.controller.d.ts +53 -14
- package/es/interface/design/i-design-container-node.d.ts +13 -0
- package/es/interface/design/i-design-data.d.ts +44 -0
- package/es/interface/design/i-design-editor-data.d.ts +20 -0
- package/es/interface/design/i-design-editor-node.d.ts +15 -0
- package/es/interface/design/i-design-node-data.d.ts +19 -0
- package/es/interface/design/i-design-node.d.ts +80 -0
- package/es/interface/design/i-design-page-node-data.d.ts +15 -0
- package/es/interface/design/i-design-tree-item.d.ts +26 -0
- package/es/interface/design/i-model-field-node-data/i-model-field-node-data.d.ts +158 -0
- package/es/interface/design/index.d.ts +9 -0
- package/es/interface/designer/i-designer-hooks.d.ts +26 -0
- package/es/interface/designer/i-designer-provider.d.ts +20 -0
- package/es/interface/designer/i-designer-state.d.ts +41 -0
- package/es/interface/designer/i-designer.controller.d.ts +116 -0
- package/es/interface/designer/index.d.ts +4 -0
- package/es/interface/i-design-item-action/i-design-item-action.d.ts +42 -0
- package/es/interface/i-design-view-options/i-design-view-options.d.ts +69 -0
- package/es/interface/i-drag-collect/i-drag-collect.d.ts +6 -0
- package/es/interface/i-drag-data-item/i-drag-data-item.d.ts +13 -2
- package/es/interface/i-drag-item/i-drag-item.d.ts +13 -2
- package/es/interface/i-drop-collect/i-drop-collect.d.ts +8 -0
- package/es/interface/i-drop-result/i-drop-result.d.ts +2 -0
- package/es/interface/i-material-data/i-material-data.d.ts +50 -0
- package/es/interface/i-material-group/i-material-group.d.ts +51 -0
- package/es/interface/i-view-step/i-view-step.d.ts +32 -0
- package/es/interface/i-vue3-dnd-item-options/i-vue3-dnd-item-options.d.ts +323 -0
- package/es/interface/index.d.ts +29 -7
- package/es/interface/page-designer/toolkit.d.ts +12 -0
- package/es/interface/state/i-design-view.state.d.ts +107 -10
- package/es/props/index.d.ts +64 -0
- package/es/props/index.mjs +56 -0
- package/es/register/designer-register/designer-register.d.ts +82 -0
- package/es/register/designer-register/designer-register.mjs +102 -0
- package/es/register/index.d.ts +2 -0
- package/es/register/material/material.register.d.ts +90 -0
- package/es/register/material/material.register.mjs +134 -0
- package/es/schema/common-config/base-button-config.d.ts +1 -43
- package/es/schema/common-config/base-button-config.mjs +0 -1
- package/es/schema/common-config/button-editor-config.d.ts +2 -12
- package/es/schema/common-config/button-editor-config.mjs +66 -2
- package/es/schema/common-config/button-props-func.d.ts +1 -1
- package/es/schema/common-config/button-props-func.mjs +0 -1
- package/es/schema/common-config/common-event-config.d.ts +6 -0
- package/es/schema/common-config/common-event-config.mjs +14 -0
- package/es/schema/common-config/common-field-editor-config.d.ts +17 -0
- package/es/schema/common-config/common-field-editor-config.mjs +213 -0
- package/es/schema/common-config/common-style.d.ts +2 -2
- package/es/schema/common-config/common-style.mjs +2 -3
- package/es/schema/common-config/display-editor-config.d.ts +1 -1
- package/es/schema/common-config/display-editor-config.mjs +27 -5
- package/es/schema/common-config/formItem-editor-config.d.ts +1 -2
- package/es/schema/common-config/formItem-editor-config.mjs +2 -52
- package/es/schema/common-config/permission-editor-config.d.ts +1 -1
- package/es/schema/common-config/permission-editor-config.mjs +8 -1
- package/es/schema/index.d.ts +13 -9
- package/es/schema/modal/modal-body.d.ts +2 -0
- package/es/schema/modal/modal-body.mjs +9 -0
- package/es/schema/modal/modal-footer.d.ts +2 -0
- package/es/schema/modal/modal-footer.mjs +9 -0
- package/es/schema/modal/modal.d.ts +8 -0
- package/es/schema/modal/modal.mjs +182 -0
- package/es/schema/search/BaseDate.d.ts +143 -0
- package/es/schema/search/BaseDate.mjs +123 -0
- package/es/schema/search/BaseSearch.d.ts +141 -0
- package/es/schema/search/BaseSearch.mjs +160 -0
- package/es/setup-app.d.ts +1 -0
- package/es/setup-app.mjs +71 -0
- package/es/types/index.d.ts +10 -24
- package/es/utils/begin-drag/begin-drag.d.ts +13 -0
- package/es/utils/begin-drag/begin-drag.mjs +206 -0
- package/es/utils/design-interceptors/design-interceptors.d.ts +8 -0
- package/es/utils/design-interceptors/design-interceptors.mjs +20 -0
- package/es/utils/design-view/index.d.ts +9 -0
- package/es/utils/design-view/index.mjs +17 -0
- package/es/utils/field-attrs/basicAttrs.d.ts +25 -0
- package/es/utils/field-attrs/basicAttrs.mjs +724 -0
- package/es/utils/field-attrs/index.d.ts +8 -0
- package/es/utils/field-attrs/index.mjs +8 -0
- package/es/utils/field-filter/index.d.ts +4 -0
- package/es/utils/field-filter/index.mjs +58 -0
- package/es/utils/find-deep-types/find-deep-types.d.ts +9 -0
- package/es/utils/find-deep-types/find-deep-types.mjs +30 -0
- package/es/utils/flatten.d.ts +12 -0
- package/es/utils/flatten.mjs +27 -0
- package/es/utils/formula-editor-design/formula-editor-design.d.ts +9 -0
- package/es/utils/formula-editor-design/formula-editor-design.mjs +85 -0
- package/es/utils/index.d.ts +12 -1
- package/es/utils/init-widget-info/init-widget-info.d.ts +16 -0
- package/es/utils/init-widget-info/init-widget-info.mjs +40 -0
- package/es/utils/plugin-pkg-util/plugin-pkg-util.d.ts +97 -0
- package/es/utils/plugin-pkg-util/plugin-pkg-util.mjs +258 -0
- package/es/utils/schema/index.d.ts +10 -0
- package/es/utils/schema/index.mjs +12 -0
- package/es/utils/transform-js/index.d.ts +1 -0
- package/es/utils/transform-js/transform-js.d.ts +13 -0
- package/es/utils/transform-js/transform-js.mjs +48 -0
- package/es/utils/transform-js/transform-js.worker.d.ts +1 -0
- package/package.json +31 -10
- package/es/constant/variable-type/variable-type.d.ts +0 -12
- package/es/constant/variable-type/variable-type.mjs +0 -13
- package/es/hooks/index.mjs +0 -3
- package/es/hooks/useStyle.d.ts +0 -15
- package/es/hooks/useStyle.mjs +0 -135
- package/es/interface/controller/i-design-drag.controller.d.ts +0 -42
- package/es/interface/controller/i-design-drag.controller.mjs +0 -1
- package/es/interface/controller/i-design-view.controller.mjs +0 -1
- package/es/interface/design-page/design-page.d.ts +0 -141
- package/es/interface/design-page/design-page.mjs +0 -1
- package/es/interface/i-drag-collect/i-drag-collect.mjs +0 -1
- package/es/interface/i-drag-data-item/i-drag-data-item.mjs +0 -1
- package/es/interface/i-drag-item/i-drag-item.mjs +0 -1
- package/es/interface/i-drop-collect/i-drop-collect.mjs +0 -1
- package/es/interface/i-drop-result/i-drop-result.mjs +0 -1
- package/es/interface/index.mjs +0 -3
- package/es/interface/props/index.d.ts +0 -1
- package/es/interface/props/index.mjs +0 -1
- package/es/interface/props/plugin-comp-props.d.ts +0 -15
- package/es/interface/props/plugin-comp-props.mjs +0 -1
- package/es/interface/state/i-design-drag.state.d.ts +0 -15
- package/es/interface/state/i-design-drag.state.mjs +0 -1
- package/es/interface/state/i-design-view.state.mjs +0 -1
- package/es/schema/common-config/autofill-editor-config.d.ts +0 -4
- package/es/schema/common-config/autofill-editor-config.mjs +0 -45
- package/es/schema/common-config/column-editor-config.d.ts +0 -3
- package/es/schema/common-config/column-editor-config.mjs +0 -29
- package/es/schema/index.mjs +0 -11
- package/es/utils/index.mjs +0 -3
- package/es/utils/message/message.d.ts +0 -14
- package/es/utils/message/message.mjs +0 -35
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { IPadding, IMargin, ISpacing } from '@gct-paas/core';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
padding: IPadding;
|
|
4
|
+
margin: IMargin;
|
|
5
|
+
showArea?: ('padding' | 'margin')[];
|
|
6
|
+
};
|
|
7
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
8
|
+
"update:padding": (value: ISpacing | undefined) => any;
|
|
9
|
+
"update:margin": (value: ISpacing | undefined) => any;
|
|
10
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
11
|
+
"onUpdate:padding"?: ((value: ISpacing | undefined) => any) | undefined;
|
|
12
|
+
"onUpdate:margin"?: ((value: ISpacing | undefined) => any) | undefined;
|
|
13
|
+
}>, {
|
|
14
|
+
showArea: ("padding" | "margin")[];
|
|
15
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
16
|
+
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import _sfc_main from './spacing-editor.vue3.mjs';
|
|
2
|
+
import './spacing-editor.css';/* empty css */
|
|
3
|
+
import _export_sfc from '../../../../_virtual/_plugin-vue_export-helper.mjs';
|
|
4
|
+
|
|
5
|
+
const SpacingEditor = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-18c72ccf"]]);
|
|
6
|
+
|
|
7
|
+
export { SpacingEditor as default };
|
|
@@ -0,0 +1,311 @@
|
|
|
1
|
+
import { defineComponent, ref, computed, resolveComponent, openBlock, createElementBlock, createBlock, withCtx, createVNode, toDisplayString, createElementVNode, normalizeClass, isRef, unref, createCommentVNode } from 'vue';
|
|
2
|
+
import { emitFieldSet, parseValueUnit } from '@gct-paas/core';
|
|
3
|
+
|
|
4
|
+
const _hoisted_1 = { class: "spacing-editor" };
|
|
5
|
+
const _hoisted_2 = {
|
|
6
|
+
key: 1,
|
|
7
|
+
class: "label"
|
|
8
|
+
};
|
|
9
|
+
const _hoisted_3 = { class: "spacing-editor__container pb20px" };
|
|
10
|
+
const _hoisted_4 = {
|
|
11
|
+
key: 0,
|
|
12
|
+
class: "box"
|
|
13
|
+
};
|
|
14
|
+
const _hoisted_5 = { class: "box-inner" };
|
|
15
|
+
const _hoisted_6 = {
|
|
16
|
+
key: 1,
|
|
17
|
+
class: "box"
|
|
18
|
+
};
|
|
19
|
+
const _hoisted_7 = { class: "box-inner" };
|
|
20
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
21
|
+
__name: "spacing-editor",
|
|
22
|
+
props: {
|
|
23
|
+
padding: {},
|
|
24
|
+
margin: {},
|
|
25
|
+
showArea: { default: () => ["padding", "margin"] }
|
|
26
|
+
},
|
|
27
|
+
emits: ["update:padding", "update:margin"],
|
|
28
|
+
setup(__props, { emit: __emit }) {
|
|
29
|
+
const props = __props;
|
|
30
|
+
const emit = __emit;
|
|
31
|
+
const _activeTab = ref("margin");
|
|
32
|
+
const activeTab = computed({
|
|
33
|
+
get: () => {
|
|
34
|
+
return props.showArea.length > 1 ? _activeTab.value : props.showArea[0];
|
|
35
|
+
},
|
|
36
|
+
set: (val) => {
|
|
37
|
+
if (props.showArea.length > 1) {
|
|
38
|
+
_activeTab.value = val;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
const curFocus = ref();
|
|
43
|
+
const handleFocus = (c) => {
|
|
44
|
+
curFocus.value = c;
|
|
45
|
+
};
|
|
46
|
+
const handleBlur = (_e, _position) => {
|
|
47
|
+
curFocus.value = "";
|
|
48
|
+
};
|
|
49
|
+
function calcLocalSpacing(spacing) {
|
|
50
|
+
function toNum(val) {
|
|
51
|
+
return val ? parseValueUnit(val).value : 0;
|
|
52
|
+
}
|
|
53
|
+
const nums = {
|
|
54
|
+
top: toNum(spacing?.top),
|
|
55
|
+
right: toNum(spacing?.right),
|
|
56
|
+
bottom: toNum(spacing?.bottom),
|
|
57
|
+
left: toNum(spacing?.left)
|
|
58
|
+
};
|
|
59
|
+
const isSame = nums.top === nums.right && nums.top === nums.bottom && nums.top === nums.left;
|
|
60
|
+
return {
|
|
61
|
+
top: nums.top,
|
|
62
|
+
right: nums.right,
|
|
63
|
+
bottom: nums.bottom,
|
|
64
|
+
left: nums.left,
|
|
65
|
+
center: isSame ? nums.top : void 0
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
function calcEmitSpacing(local, isCenterChange = false) {
|
|
69
|
+
const centerVal = local.center ? local.center : 0;
|
|
70
|
+
return {
|
|
71
|
+
top: (isCenterChange ? centerVal : local.top || 0) + "px",
|
|
72
|
+
right: (isCenterChange ? centerVal : local.right || 0) + "px",
|
|
73
|
+
bottom: (isCenterChange ? centerVal : local.bottom || 0) + "px",
|
|
74
|
+
left: (isCenterChange ? centerVal : local.left || 0) + "px"
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
const _localPadding = computed(() => {
|
|
78
|
+
return calcLocalSpacing(props.padding);
|
|
79
|
+
});
|
|
80
|
+
const {
|
|
81
|
+
top: paddingTop,
|
|
82
|
+
bottom: paddingBottom,
|
|
83
|
+
left: paddingLeft,
|
|
84
|
+
right: paddingRight,
|
|
85
|
+
center: paddingAll
|
|
86
|
+
} = emitFieldSet(_localPadding, (f, _v, obj) => {
|
|
87
|
+
emit("update:padding", calcEmitSpacing(obj, f === "center"));
|
|
88
|
+
});
|
|
89
|
+
const _localMargin = computed(() => {
|
|
90
|
+
return calcLocalSpacing(props.margin);
|
|
91
|
+
});
|
|
92
|
+
const {
|
|
93
|
+
top: marginTop,
|
|
94
|
+
bottom: marginBottom,
|
|
95
|
+
left: marginLeft,
|
|
96
|
+
right: marginRight,
|
|
97
|
+
center: marginAll
|
|
98
|
+
} = emitFieldSet(_localMargin, (f, _v, obj) => {
|
|
99
|
+
emit("update:margin", calcEmitSpacing(obj, f === "center"));
|
|
100
|
+
});
|
|
101
|
+
return (_ctx, _cache) => {
|
|
102
|
+
const _component_a_tab_pane = resolveComponent("a-tab-pane");
|
|
103
|
+
const _component_a_tabs = resolveComponent("a-tabs");
|
|
104
|
+
const _component_a_input_number = resolveComponent("a-input-number");
|
|
105
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
106
|
+
__props.showArea.length > 1 ? (openBlock(), createBlock(_component_a_tabs, {
|
|
107
|
+
key: 0,
|
|
108
|
+
"active-key": activeTab.value,
|
|
109
|
+
"onUpdate:activeKey": _cache[0] || (_cache[0] = ($event) => activeTab.value = $event),
|
|
110
|
+
class: "margin-padding-tabs"
|
|
111
|
+
}, {
|
|
112
|
+
default: withCtx(() => [
|
|
113
|
+
createVNode(_component_a_tab_pane, {
|
|
114
|
+
key: "margin",
|
|
115
|
+
tab: "外边距"
|
|
116
|
+
}),
|
|
117
|
+
createVNode(_component_a_tab_pane, {
|
|
118
|
+
key: "padding",
|
|
119
|
+
tab: "内边距"
|
|
120
|
+
})
|
|
121
|
+
]),
|
|
122
|
+
_: 1
|
|
123
|
+
}, 8, ["active-key"])) : (openBlock(), createElementBlock("div", _hoisted_2, toDisplayString(__props.showArea.includes("margin") ? "外边距" : "内边距"), 1)),
|
|
124
|
+
createElementVNode("div", _hoisted_3, [
|
|
125
|
+
activeTab.value === "margin" ? (openBlock(), createElementBlock("div", _hoisted_4, [
|
|
126
|
+
createElementVNode("div", _hoisted_5, [
|
|
127
|
+
createElementVNode("div", {
|
|
128
|
+
class: normalizeClass([{ highlight: curFocus.value === "top" || curFocus.value === "center" }, "box-inner-line line-top"])
|
|
129
|
+
}, null, 2),
|
|
130
|
+
createElementVNode("div", {
|
|
131
|
+
class: normalizeClass([{
|
|
132
|
+
highlight: curFocus.value === "right" || curFocus.value === "center"
|
|
133
|
+
}, "box-inner-line line-right"])
|
|
134
|
+
}, null, 2),
|
|
135
|
+
createElementVNode("div", {
|
|
136
|
+
class: normalizeClass([{
|
|
137
|
+
highlight: curFocus.value === "bottom" || curFocus.value === "center"
|
|
138
|
+
}, "box-inner-line line-bottom"])
|
|
139
|
+
}, null, 2),
|
|
140
|
+
createElementVNode("div", {
|
|
141
|
+
class: normalizeClass([{ highlight: curFocus.value === "left" || curFocus.value === "center" }, "box-inner-line line-left"])
|
|
142
|
+
}, null, 2)
|
|
143
|
+
]),
|
|
144
|
+
createVNode(_component_a_input_number, {
|
|
145
|
+
value: unref(marginTop),
|
|
146
|
+
"onUpdate:value": _cache[1] || (_cache[1] = ($event) => isRef(marginTop) ? marginTop.value = $event : null),
|
|
147
|
+
"allow-clear": false,
|
|
148
|
+
controls: false,
|
|
149
|
+
size: "small",
|
|
150
|
+
min: 0,
|
|
151
|
+
max: 999,
|
|
152
|
+
step: 1,
|
|
153
|
+
precision: 0,
|
|
154
|
+
class: "top input",
|
|
155
|
+
onFocus: _cache[2] || (_cache[2] = ($event) => handleFocus("top")),
|
|
156
|
+
onBlur: _cache[3] || (_cache[3] = ($event) => handleBlur())
|
|
157
|
+
}, null, 8, ["value"]),
|
|
158
|
+
createVNode(_component_a_input_number, {
|
|
159
|
+
value: unref(marginRight),
|
|
160
|
+
"onUpdate:value": _cache[4] || (_cache[4] = ($event) => isRef(marginRight) ? marginRight.value = $event : null),
|
|
161
|
+
"allow-clear": false,
|
|
162
|
+
controls: false,
|
|
163
|
+
size: "small",
|
|
164
|
+
min: 0,
|
|
165
|
+
max: 999,
|
|
166
|
+
step: 1,
|
|
167
|
+
precision: 0,
|
|
168
|
+
class: "right input",
|
|
169
|
+
onFocus: _cache[5] || (_cache[5] = ($event) => handleFocus("right")),
|
|
170
|
+
onBlur: _cache[6] || (_cache[6] = ($event) => handleBlur())
|
|
171
|
+
}, null, 8, ["value"]),
|
|
172
|
+
createVNode(_component_a_input_number, {
|
|
173
|
+
value: unref(marginBottom),
|
|
174
|
+
"onUpdate:value": _cache[7] || (_cache[7] = ($event) => isRef(marginBottom) ? marginBottom.value = $event : null),
|
|
175
|
+
"allow-clear": false,
|
|
176
|
+
controls: false,
|
|
177
|
+
size: "small",
|
|
178
|
+
min: 0,
|
|
179
|
+
max: 999,
|
|
180
|
+
step: 1,
|
|
181
|
+
precision: 0,
|
|
182
|
+
class: "bottom input",
|
|
183
|
+
onFocus: _cache[8] || (_cache[8] = ($event) => handleFocus("bottom")),
|
|
184
|
+
onBlur: _cache[9] || (_cache[9] = ($event) => handleBlur())
|
|
185
|
+
}, null, 8, ["value"]),
|
|
186
|
+
createVNode(_component_a_input_number, {
|
|
187
|
+
value: unref(marginLeft),
|
|
188
|
+
"onUpdate:value": _cache[10] || (_cache[10] = ($event) => isRef(marginLeft) ? marginLeft.value = $event : null),
|
|
189
|
+
"allow-clear": false,
|
|
190
|
+
controls: false,
|
|
191
|
+
size: "small",
|
|
192
|
+
min: 0,
|
|
193
|
+
max: 999,
|
|
194
|
+
step: 1,
|
|
195
|
+
precision: 0,
|
|
196
|
+
class: "left input",
|
|
197
|
+
onFocus: _cache[11] || (_cache[11] = ($event) => handleFocus("left")),
|
|
198
|
+
onBlur: _cache[12] || (_cache[12] = ($event) => handleBlur())
|
|
199
|
+
}, null, 8, ["value"]),
|
|
200
|
+
createVNode(_component_a_input_number, {
|
|
201
|
+
value: unref(marginAll),
|
|
202
|
+
"onUpdate:value": _cache[13] || (_cache[13] = ($event) => isRef(marginAll) ? marginAll.value = $event : null),
|
|
203
|
+
"allow-clear": false,
|
|
204
|
+
controls: false,
|
|
205
|
+
size: "small",
|
|
206
|
+
min: 0,
|
|
207
|
+
max: 999,
|
|
208
|
+
step: 1,
|
|
209
|
+
precision: 0,
|
|
210
|
+
class: "center input",
|
|
211
|
+
onFocus: _cache[14] || (_cache[14] = ($event) => handleFocus("center")),
|
|
212
|
+
onBlur: _cache[15] || (_cache[15] = ($event) => handleBlur())
|
|
213
|
+
}, null, 8, ["value"])
|
|
214
|
+
])) : createCommentVNode("", true),
|
|
215
|
+
activeTab.value === "padding" ? (openBlock(), createElementBlock("div", _hoisted_6, [
|
|
216
|
+
createElementVNode("div", _hoisted_7, [
|
|
217
|
+
createElementVNode("div", {
|
|
218
|
+
class: normalizeClass([{ highlight: curFocus.value === "top" || curFocus.value === "center" }, "box-inner-line line-top line-padding"])
|
|
219
|
+
}, null, 2),
|
|
220
|
+
createElementVNode("div", {
|
|
221
|
+
class: normalizeClass([{
|
|
222
|
+
highlight: curFocus.value === "right" || curFocus.value === "center"
|
|
223
|
+
}, "box-inner-line line-right line-padding"])
|
|
224
|
+
}, null, 2),
|
|
225
|
+
createElementVNode("div", {
|
|
226
|
+
class: normalizeClass([{
|
|
227
|
+
highlight: curFocus.value === "bottom" || curFocus.value === "center"
|
|
228
|
+
}, "box-inner-line line-bottom line-padding"])
|
|
229
|
+
}, null, 2),
|
|
230
|
+
createElementVNode("div", {
|
|
231
|
+
class: normalizeClass([{ highlight: curFocus.value === "left" || curFocus.value === "center" }, "box-inner-line line-left line-padding"])
|
|
232
|
+
}, null, 2)
|
|
233
|
+
]),
|
|
234
|
+
createVNode(_component_a_input_number, {
|
|
235
|
+
value: unref(paddingTop),
|
|
236
|
+
"onUpdate:value": _cache[16] || (_cache[16] = ($event) => isRef(paddingTop) ? paddingTop.value = $event : null),
|
|
237
|
+
class: "top input",
|
|
238
|
+
"allow-clear": false,
|
|
239
|
+
controls: false,
|
|
240
|
+
size: "small",
|
|
241
|
+
min: 0,
|
|
242
|
+
max: 999,
|
|
243
|
+
step: 1,
|
|
244
|
+
precision: 0,
|
|
245
|
+
onFocus: _cache[17] || (_cache[17] = ($event) => handleFocus("top")),
|
|
246
|
+
onBlur: _cache[18] || (_cache[18] = ($event) => handleBlur())
|
|
247
|
+
}, null, 8, ["value"]),
|
|
248
|
+
createVNode(_component_a_input_number, {
|
|
249
|
+
value: unref(paddingRight),
|
|
250
|
+
"onUpdate:value": _cache[19] || (_cache[19] = ($event) => isRef(paddingRight) ? paddingRight.value = $event : null),
|
|
251
|
+
class: "right input",
|
|
252
|
+
"allow-clear": false,
|
|
253
|
+
controls: false,
|
|
254
|
+
size: "small",
|
|
255
|
+
min: 0,
|
|
256
|
+
max: 999,
|
|
257
|
+
step: 1,
|
|
258
|
+
precision: 0,
|
|
259
|
+
onFocus: _cache[20] || (_cache[20] = ($event) => handleFocus("right")),
|
|
260
|
+
onBlur: _cache[21] || (_cache[21] = ($event) => handleBlur())
|
|
261
|
+
}, null, 8, ["value"]),
|
|
262
|
+
createVNode(_component_a_input_number, {
|
|
263
|
+
value: unref(paddingBottom),
|
|
264
|
+
"onUpdate:value": _cache[22] || (_cache[22] = ($event) => isRef(paddingBottom) ? paddingBottom.value = $event : null),
|
|
265
|
+
class: "bottom input",
|
|
266
|
+
"allow-clear": false,
|
|
267
|
+
controls: false,
|
|
268
|
+
size: "small",
|
|
269
|
+
min: 0,
|
|
270
|
+
max: 999,
|
|
271
|
+
step: 1,
|
|
272
|
+
precision: 0,
|
|
273
|
+
onFocus: _cache[23] || (_cache[23] = ($event) => handleFocus("bottom")),
|
|
274
|
+
onBlur: _cache[24] || (_cache[24] = ($event) => handleBlur())
|
|
275
|
+
}, null, 8, ["value"]),
|
|
276
|
+
createVNode(_component_a_input_number, {
|
|
277
|
+
value: unref(paddingLeft),
|
|
278
|
+
"onUpdate:value": _cache[25] || (_cache[25] = ($event) => isRef(paddingLeft) ? paddingLeft.value = $event : null),
|
|
279
|
+
class: "left input",
|
|
280
|
+
"allow-clear": false,
|
|
281
|
+
controls: false,
|
|
282
|
+
size: "small",
|
|
283
|
+
min: 0,
|
|
284
|
+
max: 999,
|
|
285
|
+
step: 1,
|
|
286
|
+
precision: 0,
|
|
287
|
+
onFocus: _cache[26] || (_cache[26] = ($event) => handleFocus("left")),
|
|
288
|
+
onBlur: _cache[27] || (_cache[27] = ($event) => handleBlur())
|
|
289
|
+
}, null, 8, ["value"]),
|
|
290
|
+
createVNode(_component_a_input_number, {
|
|
291
|
+
value: unref(paddingAll),
|
|
292
|
+
"onUpdate:value": _cache[28] || (_cache[28] = ($event) => isRef(paddingAll) ? paddingAll.value = $event : null),
|
|
293
|
+
class: "center input",
|
|
294
|
+
"allow-clear": false,
|
|
295
|
+
controls: false,
|
|
296
|
+
size: "small",
|
|
297
|
+
min: 0,
|
|
298
|
+
max: 999,
|
|
299
|
+
step: 1,
|
|
300
|
+
precision: 0,
|
|
301
|
+
onFocus: _cache[29] || (_cache[29] = ($event) => handleFocus("center")),
|
|
302
|
+
onBlur: _cache[30] || (_cache[30] = ($event) => handleBlur())
|
|
303
|
+
}, null, 8, ["value"])
|
|
304
|
+
])) : createCommentVNode("", true)
|
|
305
|
+
])
|
|
306
|
+
]);
|
|
307
|
+
};
|
|
308
|
+
}
|
|
309
|
+
});
|
|
310
|
+
|
|
311
|
+
export { _sfc_main as default };
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
.gct-field-cascader {
|
|
2
|
+
padding: 0;
|
|
3
|
+
}
|
|
4
|
+
.gct-field-cascader .ant-cascader-menu {
|
|
5
|
+
min-width: 180px;
|
|
6
|
+
max-width: 280px;
|
|
7
|
+
height: 280px;
|
|
8
|
+
margin: 0;
|
|
9
|
+
padding: 0;
|
|
10
|
+
}
|
|
11
|
+
.gct-field-cascader .ant-cascader-menu-item-disabled {
|
|
12
|
+
color: #8b8b8b;
|
|
13
|
+
cursor: default;
|
|
14
|
+
}
|
|
15
|
+
.gct-field-cascader .ant-cascader-menu-item {
|
|
16
|
+
padding: 0;
|
|
17
|
+
color: #1a1d23;
|
|
18
|
+
}
|
|
19
|
+
.gct-field-cascader .ant-cascader-menu-item[aria-checked='true'] .gct-option-label {
|
|
20
|
+
background-color: color-mix(in srgb, var(--ant-primary-color) 8%, transparent);
|
|
21
|
+
color: var(--ant-primary-color);
|
|
22
|
+
}
|
|
23
|
+
.gct-field-cascader .ant-cascader-menu-item:hover {
|
|
24
|
+
background-color: #fff;
|
|
25
|
+
font-weight: normal;
|
|
26
|
+
}
|
|
27
|
+
.gct-field-cascader .ant-cascader-menu-item .ant-cascader-menu-item-content {
|
|
28
|
+
overflow: hidden;
|
|
29
|
+
text-overflow: ellipsis;
|
|
30
|
+
white-space: nowrap;
|
|
31
|
+
}
|
|
32
|
+
.gct-field-cascader .ant-cascader-menu-item .ant-cascader-menu-item-expand-icon {
|
|
33
|
+
display: none;
|
|
34
|
+
}
|
|
35
|
+
.gct-field-cascader .ant-cascader-menu-item .ant-cascader-menu-item-loading-icon {
|
|
36
|
+
display: none;
|
|
37
|
+
}
|
|
38
|
+
.gct-field-cascader .ant-cascader-menu-item .gct-option-label {
|
|
39
|
+
box-sizing: border-box;
|
|
40
|
+
margin: 0 5px;
|
|
41
|
+
padding: 6px;
|
|
42
|
+
border-radius: 4px;
|
|
43
|
+
}
|
|
44
|
+
.gct-field-cascader .ant-cascader-menu-item .gct-option-label .iconfont {
|
|
45
|
+
color: #5a5f6b;
|
|
46
|
+
font-size: 14px;
|
|
47
|
+
}
|
|
48
|
+
.gct-field-cascader .ant-cascader-menu-item .gct-option-title {
|
|
49
|
+
box-sizing: border-box;
|
|
50
|
+
margin: 0 5px;
|
|
51
|
+
padding: 6px;
|
|
52
|
+
color: #8b8b8b;
|
|
53
|
+
}
|
|
54
|
+
.gct-field-cascader .ant-cascader-menu-item-active {
|
|
55
|
+
background-color: #fff;
|
|
56
|
+
font-weight: normal;
|
|
57
|
+
}
|
|
58
|
+
.gct-field-cascader .ant-cascader-menu-item-active .gct-option-label {
|
|
59
|
+
background-color: #f2f5f8;
|
|
60
|
+
}
|
|
61
|
+
.gct-field-cascader .ant-cascader-menu-item-active .gct-option-label .iconfont {
|
|
62
|
+
color: var(--ant-primary-color);
|
|
63
|
+
}
|
|
64
|
+
.cascader-expand-to-left .ant-cascader-menus {
|
|
65
|
+
flex-direction: row-reverse;
|
|
66
|
+
}
|
|
67
|
+
.cascader-expand-to-left .ant-cascader-menus .ant-cascader-menu {
|
|
68
|
+
width: 230px;
|
|
69
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
import { comPropsType } from './hooks';
|
|
3
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
4
|
+
fieldMetaList: {
|
|
5
|
+
type: PropType<comPropsType["fieldMetaList"]>;
|
|
6
|
+
default: () => comPropsType["fieldMetaList"];
|
|
7
|
+
};
|
|
8
|
+
filterFieldByFunction: {
|
|
9
|
+
type: FunctionConstructor;
|
|
10
|
+
default: () => boolean;
|
|
11
|
+
};
|
|
12
|
+
maxLevel: {
|
|
13
|
+
type: NumberConstructor;
|
|
14
|
+
default: number;
|
|
15
|
+
};
|
|
16
|
+
value: {
|
|
17
|
+
type: StringConstructor;
|
|
18
|
+
default: string;
|
|
19
|
+
};
|
|
20
|
+
allowClear: {
|
|
21
|
+
type: BooleanConstructor;
|
|
22
|
+
default: boolean;
|
|
23
|
+
};
|
|
24
|
+
valueSeparator: {
|
|
25
|
+
type: StringConstructor;
|
|
26
|
+
default: string;
|
|
27
|
+
};
|
|
28
|
+
searchable: {
|
|
29
|
+
type: BooleanConstructor;
|
|
30
|
+
default: boolean;
|
|
31
|
+
};
|
|
32
|
+
expandToLeft: {
|
|
33
|
+
type: BooleanConstructor;
|
|
34
|
+
default: boolean;
|
|
35
|
+
};
|
|
36
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
37
|
+
FieldClick: (...args: any[]) => void;
|
|
38
|
+
labelChange: (...args: any[]) => void;
|
|
39
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
40
|
+
fieldMetaList: {
|
|
41
|
+
type: PropType<comPropsType["fieldMetaList"]>;
|
|
42
|
+
default: () => comPropsType["fieldMetaList"];
|
|
43
|
+
};
|
|
44
|
+
filterFieldByFunction: {
|
|
45
|
+
type: FunctionConstructor;
|
|
46
|
+
default: () => boolean;
|
|
47
|
+
};
|
|
48
|
+
maxLevel: {
|
|
49
|
+
type: NumberConstructor;
|
|
50
|
+
default: number;
|
|
51
|
+
};
|
|
52
|
+
value: {
|
|
53
|
+
type: StringConstructor;
|
|
54
|
+
default: string;
|
|
55
|
+
};
|
|
56
|
+
allowClear: {
|
|
57
|
+
type: BooleanConstructor;
|
|
58
|
+
default: boolean;
|
|
59
|
+
};
|
|
60
|
+
valueSeparator: {
|
|
61
|
+
type: StringConstructor;
|
|
62
|
+
default: string;
|
|
63
|
+
};
|
|
64
|
+
searchable: {
|
|
65
|
+
type: BooleanConstructor;
|
|
66
|
+
default: boolean;
|
|
67
|
+
};
|
|
68
|
+
expandToLeft: {
|
|
69
|
+
type: BooleanConstructor;
|
|
70
|
+
default: boolean;
|
|
71
|
+
};
|
|
72
|
+
}>> & Readonly<{
|
|
73
|
+
onFieldClick?: ((...args: any[]) => any) | undefined;
|
|
74
|
+
onLabelChange?: ((...args: any[]) => any) | undefined;
|
|
75
|
+
}>, {
|
|
76
|
+
value: string;
|
|
77
|
+
allowClear: boolean;
|
|
78
|
+
fieldMetaList: (import('@gct-paas/api/apaas').FieldMetaDTO & {
|
|
79
|
+
__bindFields: string[];
|
|
80
|
+
})[];
|
|
81
|
+
maxLevel: number;
|
|
82
|
+
filterFieldByFunction: Function;
|
|
83
|
+
valueSeparator: string;
|
|
84
|
+
searchable: boolean;
|
|
85
|
+
expandToLeft: boolean;
|
|
86
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
87
|
+
export default _default;
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { defineComponent, ref, resolveComponent, openBlock, createBlock, unref, h } from 'vue';
|
|
2
|
+
import { useFieldCascader } from './hooks.mjs';
|
|
3
|
+
|
|
4
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
5
|
+
__name: "FieldCascader",
|
|
6
|
+
props: {
|
|
7
|
+
fieldMetaList: {
|
|
8
|
+
type: Object,
|
|
9
|
+
default: () => {
|
|
10
|
+
return [];
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
filterFieldByFunction: {
|
|
14
|
+
type: Function,
|
|
15
|
+
default: () => true
|
|
16
|
+
},
|
|
17
|
+
maxLevel: {
|
|
18
|
+
type: Number,
|
|
19
|
+
default: 3
|
|
20
|
+
},
|
|
21
|
+
value: {
|
|
22
|
+
type: String,
|
|
23
|
+
default: ""
|
|
24
|
+
},
|
|
25
|
+
allowClear: {
|
|
26
|
+
type: Boolean,
|
|
27
|
+
default: false
|
|
28
|
+
},
|
|
29
|
+
valueSeparator: {
|
|
30
|
+
type: String,
|
|
31
|
+
default: "$"
|
|
32
|
+
},
|
|
33
|
+
searchable: {
|
|
34
|
+
type: Boolean,
|
|
35
|
+
default: true
|
|
36
|
+
},
|
|
37
|
+
// 级联向左展开
|
|
38
|
+
expandToLeft: {
|
|
39
|
+
type: Boolean,
|
|
40
|
+
default: false
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
emits: ["FieldClick", "labelChange"],
|
|
44
|
+
setup(__props, { emit: __emit }) {
|
|
45
|
+
const emit = __emit;
|
|
46
|
+
const props = __props;
|
|
47
|
+
const {
|
|
48
|
+
visibleValue,
|
|
49
|
+
getChildrenOptionsByKey,
|
|
50
|
+
filterOptions,
|
|
51
|
+
fieldValues,
|
|
52
|
+
fieldMapByKey
|
|
53
|
+
} = useFieldCascader(props, {
|
|
54
|
+
onFieldClick
|
|
55
|
+
});
|
|
56
|
+
const lastSelectedIds = ref();
|
|
57
|
+
const loadData = async (selectedOptions) => {
|
|
58
|
+
if (selectedOptions.map((i) => i.value).join(",") === lastSelectedIds.value)
|
|
59
|
+
return;
|
|
60
|
+
lastSelectedIds.value = selectedOptions.slice(0, -1).map((item) => item.value).join(",");
|
|
61
|
+
const targetOption = selectedOptions.at(-1);
|
|
62
|
+
if (!targetOption.isExpandField) return;
|
|
63
|
+
await getChildrenOptionsByKey(
|
|
64
|
+
targetOption.__props,
|
|
65
|
+
selectedOptions.length + 1
|
|
66
|
+
);
|
|
67
|
+
};
|
|
68
|
+
function dropdownVisibleChange(v) {
|
|
69
|
+
visibleValue.value = v;
|
|
70
|
+
}
|
|
71
|
+
function onFieldClick(row) {
|
|
72
|
+
const value = row?.__bindFields?.join(props.valueSeparator);
|
|
73
|
+
emit("FieldClick", value, row);
|
|
74
|
+
visibleValue.value = false;
|
|
75
|
+
}
|
|
76
|
+
function displayRender({
|
|
77
|
+
labels,
|
|
78
|
+
selectedOptions
|
|
79
|
+
}) {
|
|
80
|
+
const levelCount = selectedOptions.length;
|
|
81
|
+
let title = selectedOptions.filter((i) => i).map((i, index) => {
|
|
82
|
+
const isLastLevel = index === levelCount - 1;
|
|
83
|
+
return isLastLevel ? i.title : i.titleWithRelation;
|
|
84
|
+
}).join(".");
|
|
85
|
+
if (!title && labels.length > 0) {
|
|
86
|
+
title = labels.map((k) => fieldMapByKey[k]?.name || "").join(".");
|
|
87
|
+
}
|
|
88
|
+
emit("labelChange", title);
|
|
89
|
+
return h(
|
|
90
|
+
"div",
|
|
91
|
+
{
|
|
92
|
+
class: "ell",
|
|
93
|
+
title,
|
|
94
|
+
onClick: (e) => {
|
|
95
|
+
e.stopPropagation();
|
|
96
|
+
e.preventDefault();
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
title
|
|
100
|
+
);
|
|
101
|
+
}
|
|
102
|
+
function change(v) {
|
|
103
|
+
if (v === void 0) {
|
|
104
|
+
emit("FieldClick", v, {});
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
return (_ctx, _cache) => {
|
|
108
|
+
const _component_a_cascader = resolveComponent("a-cascader");
|
|
109
|
+
return openBlock(), createBlock(_component_a_cascader, {
|
|
110
|
+
placeholder: "请选择",
|
|
111
|
+
options: unref(filterOptions),
|
|
112
|
+
"load-data": loadData,
|
|
113
|
+
"expand-trigger": "hover",
|
|
114
|
+
class: "gct-field-cascader-selector",
|
|
115
|
+
"dropdown-class-name": `gct-field-cascader ${props.expandToLeft ? "cascader-expand-to-left" : ""}`,
|
|
116
|
+
open: unref(visibleValue),
|
|
117
|
+
"allow-clear": __props.allowClear,
|
|
118
|
+
"display-render": displayRender,
|
|
119
|
+
value: unref(fieldValues),
|
|
120
|
+
placement: props.expandToLeft ? "topRight" : void 0,
|
|
121
|
+
onMousedown: _cache[0] || (_cache[0] = (e) => e.preventDefault()),
|
|
122
|
+
onDropdownVisibleChange: dropdownVisibleChange,
|
|
123
|
+
onChange: change
|
|
124
|
+
}, null, 8, ["options", "dropdown-class-name", "open", "allow-clear", "value", "placement"]);
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
|
|
129
|
+
export { _sfc_main as default };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
visibleValue: {
|
|
3
|
+
value: boolean;
|
|
4
|
+
};
|
|
5
|
+
};
|
|
6
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
7
|
+
change: (...args: any[]) => void;
|
|
8
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
9
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
10
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import _sfc_main from './SearchInput.vue2.mjs';
|
|
2
|
+
import './SearchInput.css';/* empty css */
|
|
3
|
+
import _export_sfc from '../../../_virtual/_plugin-vue_export-helper.mjs';
|
|
4
|
+
|
|
5
|
+
const SearchInput = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-512c4b38"]]);
|
|
6
|
+
|
|
7
|
+
export { SearchInput as default };
|