@luck-design-biz/luckda 0.0.24-2 → 0.0.25-1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/components/Builder/index.js +6 -4
- package/es/components/IconFont/index.js +5 -0
- package/es/components/LDActions/index.js +133 -0
- package/es/components/LDActions/index.less +65 -0
- package/es/components/LdAutoForm/index.js +1 -1
- package/es/components/LdCom/index.js +2 -1
- package/es/components/LdFormList/index.js +15 -10
- package/es/components/LdGrid/index.js +14 -8
- package/es/components/LdGridForm/index.js +5 -4
- package/es/components/LdRuntimeCom/index.js +20 -7
- package/es/components/LdTree/index.js +112 -31
- package/es/components/LdTree/index.less +6 -1
- package/es/helper/ldBuilder.js +28 -12
- package/es/helper/ldComBuild.js +29 -14
- package/es/index.js +1 -0
- package/es/locales/zh-CN.js +221 -0
- package/es/lowcode/constants/api-url.js +380 -262
- package/es/lowcode/constants/event-topics.js +4 -0
- package/es/lowcode/constants/index.js +30 -2
- package/es/lowcode/engine/factory/panel-item-factory/CheckboxStrategy.js +32 -0
- package/es/lowcode/engine/factory/panel-item-factory/index.js +2 -0
- package/es/lowcode/engine/meta/box.props.default.json +3 -2
- package/es/lowcode/engine/meta/box.props.json +1 -3
- package/es/lowcode/engine/meta/button.props.default.json +5 -2
- package/es/lowcode/engine/meta/button.props.json +8 -8
- package/es/lowcode/engine/meta/cardlist.props.default.json +4 -2
- package/es/lowcode/engine/meta/cardlist.props.json +1 -2
- package/es/lowcode/engine/meta/dialog.props.default.json +4 -2
- package/es/lowcode/engine/meta/dialog.props.json +0 -1
- package/es/lowcode/engine/meta/drawer.props.default.json +4 -2
- package/es/lowcode/engine/meta/drawer.props.json +0 -1
- package/es/lowcode/engine/meta/form.props.default.json +53 -4
- package/es/lowcode/engine/meta/form.props.json +584 -55
- package/es/lowcode/engine/meta/iframe.props.default.json +1 -1
- package/es/lowcode/engine/meta/iframe.props.json +1 -1
- package/es/lowcode/engine/meta/image.props.default.json +5 -2
- package/es/lowcode/engine/meta/image.props.json +1 -1
- package/es/lowcode/engine/meta/imex.props.default.json +5 -2
- package/es/lowcode/engine/meta/imex.props.json +1 -1
- package/es/lowcode/engine/meta/js-editor/auto-complete.json +152 -26
- package/es/lowcode/engine/meta/jsx.props.default.json +2 -1
- package/es/lowcode/engine/meta/jsx.props.json +10 -5
- package/es/lowcode/engine/meta/layout.props.default.json +5 -2
- package/es/lowcode/engine/meta/layout.props.json +1 -2
- package/es/lowcode/engine/meta/link.props.default.json +5 -2
- package/es/lowcode/engine/meta/link.props.json +2 -2
- package/es/lowcode/engine/meta/local/local.zh-cn.js +97 -0
- package/es/lowcode/engine/meta/page.props.default.json +12 -0
- package/es/lowcode/engine/meta/page.props.json +49 -0
- package/es/lowcode/engine/meta/pagecontent.props.default.json +6 -0
- package/es/lowcode/engine/meta/pagecontent.props.json +7 -0
- package/es/lowcode/engine/meta/pagefooter.props.default.json +6 -0
- package/es/lowcode/engine/meta/pagefooter.props.json +7 -0
- package/es/lowcode/engine/meta/pageheader.props.default.json +6 -0
- package/es/lowcode/engine/meta/pageheader.props.json +7 -0
- package/es/lowcode/engine/meta/section.props.default.json +5 -2
- package/es/lowcode/engine/meta/section.props.json +1 -1
- package/es/lowcode/engine/meta/split.props.default.json +9 -4
- package/es/lowcode/engine/meta/split.props.json +14 -29
- package/es/lowcode/engine/meta/table.props.default.json +23 -3
- package/es/lowcode/engine/meta/table.props.json +257 -55
- package/es/lowcode/engine/meta/tabs.props.default.json +16 -9
- package/es/lowcode/engine/meta/tabs.props.json +57 -81
- package/es/lowcode/engine/meta/text.props.default.json +5 -2
- package/es/lowcode/engine/meta/text.props.json +1 -1
- package/es/lowcode/engine/meta/tree.props.default.json +20 -7
- package/es/lowcode/engine/meta/tree.props.json +225 -79
- package/es/lowcode/engine/provider/ContextProvider/index.js +169 -0
- package/es/lowcode/engine/provider/RemoteSourceProvider.js +161 -0
- package/es/lowcode/engine/tools/dataProcess.js +64 -2
- package/es/lowcode/engine/tools/helper.js +96 -19
- package/es/lowcode/engine/tools/useCanvasRender.js +75 -0
- package/es/lowcode/engine/tools/usePromiseState.js +8 -6
- package/es/lowcode/engine/tools/useTodo.js +78 -0
- package/es/lowcode/index.js +1 -0
- package/es/lowcode/painter/Components.js +47 -21
- package/es/lowcode/painter/DesignOperator.js +47 -28
- package/es/lowcode/painter/DesignToolbar.js +86 -15
- package/es/lowcode/painter/I18n.js +2 -2
- package/es/lowcode/painter/Outline.js +31 -26
- package/es/lowcode/painter/Panel.js +100 -142
- package/es/lowcode/painter/Ribbon.js +1 -1
- package/es/lowcode/painter/components/ActionBindModal.js +293 -0
- package/es/lowcode/painter/components/AdvancePanel.js +140 -0
- package/es/lowcode/painter/components/AttrsPanel.js +145 -0
- package/es/lowcode/painter/components/Collapse.js +20 -9
- package/es/lowcode/painter/components/ColorInput.js +5 -3
- package/es/lowcode/painter/components/DragDrop/DragDropContext.js +137 -0
- package/es/lowcode/painter/components/DragDrop/DragDropWrapper.js +47 -0
- package/es/lowcode/painter/components/DragDrop/Overlay.js +8 -0
- package/es/lowcode/painter/components/DragDrop/TreeDragDropWrapper.js +67 -0
- package/es/lowcode/painter/components/FieldSelector.js +44 -0
- package/es/lowcode/painter/components/ListEditor.js +18 -9
- package/es/lowcode/painter/components/PanelItem.js +1 -1
- package/es/lowcode/painter/components/PopConfirm.js +10 -3
- package/es/lowcode/painter/components/SortBox.js +11 -4
- package/es/lowcode/painter/components/TreeEditor.js +13 -0
- package/es/lowcode/painter/components/code-editor/BaseEditor.js +14 -2
- package/es/lowcode/painter/components/code-editor/JSEditor.js +25 -14
- package/es/lowcode/painter/components/code-editor/JsonEditor.js +41 -0
- package/es/lowcode/painter/components/field-setting/BatchSetting.js +144 -0
- package/es/lowcode/painter/components/field-setting/CheckRules.js +126 -0
- package/es/lowcode/painter/components/field-setting/FieldAttrs.js +287 -0
- package/es/lowcode/painter/components/field-setting/FieldAttrsModal.js +290 -0
- package/es/lowcode/painter/components/field-setting/FieldDefaultValue.js +63 -0
- package/es/lowcode/painter/components/field-setting/FieldRulesModal.js +116 -0
- package/es/lowcode/painter/components/field-setting/SettingUI.js +419 -0
- package/es/lowcode/painter/components/field-setting/index.js +363 -0
- package/es/lowcode/painter/index.js +3 -1
- package/es/lowcode/painter/panel-section/ActionsEditor/ActionEditor.js +101 -0
- package/es/lowcode/painter/{components/actions-editor → panel-section/ActionsEditor}/index.js +74 -13
- package/es/lowcode/painter/panel-section/BlockEditor/index.js +24 -0
- package/es/lowcode/painter/panel-section/BlocksEditor/BlockEditorItem.js +44 -0
- package/es/lowcode/painter/panel-section/BlocksEditor/index.js +202 -0
- package/es/lowcode/painter/panel-section/DataSetSelector.js +115 -43
- package/es/lowcode/painter/panel-section/FieldsSetting.js +308 -0
- package/es/lowcode/painter/panel-section/Icon.js +14 -14
- package/es/lowcode/painter/panel-section/IconConditionSelector.js +111 -0
- package/es/lowcode/painter/panel-section/IconSelector.js +5 -2
- package/es/lowcode/painter/panel-section/ImpExp.js +91 -0
- package/es/lowcode/painter/panel-section/JSEditor.js +49 -0
- package/es/lowcode/painter/panel-section/LayoutRatio.js +6 -7
- package/es/lowcode/painter/panel-section/SerialsSelector.js +44 -0
- package/es/lowcode/painter/panel-section/SplitDisplay.js +248 -0
- package/es/lowcode/painter/panel-section/StylePanel/MainPanel.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/StyleContext.js +2 -22
- package/es/lowcode/painter/panel-section/TabItems.js +46 -30
- package/es/lowcode/painter/panel-section/TableTopFilter.js +306 -0
- package/es/lowcode/painter/panel-section/TableZebra.js +66 -6
- package/es/lowcode/painter/panel-section/TreeRootEditor.js +78 -0
- package/es/lowcode/painter/services/toolbar.js +25 -0
- package/es/lowcode/painter/style/action-bind-modal.less +102 -0
- package/es/lowcode/painter/style/collapse.less +6 -0
- package/es/lowcode/painter/style/components.less +5 -4
- package/es/lowcode/painter/style/design.less +2 -3
- package/es/lowcode/painter/style/dragdrop.less +10 -0
- package/es/lowcode/painter/style/fields-setting.less +25 -0
- package/es/lowcode/painter/style/impexp.less +7 -0
- package/es/lowcode/painter/style/panel-attrs.less +43 -0
- package/es/lowcode/painter/style/panel.less +6 -37
- package/es/lowcode/painter/style/pop-confirm.less +9 -2
- package/es/lowcode/painter/style/split-display.less +28 -0
- package/es/lowcode/painter/style/treedragdrop.less +19 -0
- package/es/lowcode/preview/index.js +14 -0
- package/es/lowcode/view/Canvas.js +34 -139
- package/es/lowcode/view/Loading.js +6 -2
- package/es/lowcode/view/Page.js +16 -14
- package/es/lowcode/view/lc-components/Box/FunctionPreview.js +9 -0
- package/es/lowcode/view/lc-components/Box/index.js +11 -2
- package/es/lowcode/view/lc-components/Box/index.less +0 -1
- package/es/lowcode/view/lc-components/Box/meta.json +1 -3
- package/es/lowcode/view/lc-components/Button/FunctionDesign.js +8 -10
- package/es/lowcode/view/lc-components/Button/FunctionLive.js +3 -6
- package/es/lowcode/view/lc-components/Button/FunctionPreview.js +6 -0
- package/es/lowcode/view/lc-components/Button/index.js +43 -20
- package/es/lowcode/view/lc-components/Button/meta.json +8 -8
- package/es/lowcode/view/lc-components/CardList/FunctionPreview.js +9 -0
- package/es/lowcode/view/lc-components/CardList/index.js +1 -0
- package/es/lowcode/view/lc-components/CardList/meta.json +1 -2
- package/es/lowcode/view/lc-components/Dialog/FunctionDesign.js +17 -23
- package/es/lowcode/view/lc-components/Dialog/FunctionPreview.js +9 -0
- package/es/lowcode/view/lc-components/Dialog/index.js +1 -0
- package/es/lowcode/view/lc-components/Dialog/meta.json +0 -1
- package/es/lowcode/view/lc-components/Drawer/FunctionDesign.js +4 -2
- package/es/lowcode/view/lc-components/Drawer/FunctionPreview.js +9 -0
- package/es/lowcode/view/lc-components/Drawer/index.js +17 -0
- package/es/lowcode/view/lc-components/Drawer/index.less +3 -0
- package/es/lowcode/view/lc-components/Drawer/meta.json +0 -1
- package/es/lowcode/view/lc-components/Form/FunctionDesign.js +31 -2
- package/es/lowcode/view/lc-components/Form/FunctionPreview.js +9 -0
- package/es/lowcode/view/lc-components/Form/index.js +114 -8
- package/es/lowcode/view/lc-components/Form/index.less +5 -0
- package/es/lowcode/view/lc-components/Form/meta.json +534 -55
- package/es/lowcode/view/lc-components/Iframe/FunctionPreview.js +9 -0
- package/es/lowcode/view/lc-components/Iframe/index.js +1 -0
- package/es/lowcode/view/lc-components/Iframe/meta.json +1 -1
- package/es/lowcode/view/lc-components/ImEx/FunctionPreview.js +9 -0
- package/es/lowcode/view/lc-components/ImEx/index.js +1 -0
- package/es/lowcode/view/lc-components/ImEx/meta.json +1 -1
- package/es/lowcode/view/lc-components/Image/FunctionPreview.js +9 -0
- package/es/lowcode/view/lc-components/Image/index.js +1 -0
- package/es/lowcode/view/lc-components/Image/meta.json +1 -1
- package/es/lowcode/view/lc-components/JSX/FunctionPreview.js +9 -0
- package/es/lowcode/view/lc-components/JSX/index.js +19 -6
- package/es/lowcode/view/lc-components/JSX/meta.json +8 -5
- package/es/lowcode/view/lc-components/Layout/FunctionDesign.js +19 -17
- package/es/lowcode/view/lc-components/Layout/FunctionLive.js +3 -8
- package/es/lowcode/view/lc-components/Layout/FunctionPreview.js +9 -0
- package/es/lowcode/view/lc-components/Layout/index.js +1 -0
- package/es/lowcode/view/lc-components/Layout/meta.json +1 -2
- package/es/lowcode/view/lc-components/Link/FunctionPreview.js +9 -0
- package/es/lowcode/view/lc-components/Link/index.js +1 -0
- package/es/lowcode/view/lc-components/Link/meta.json +2 -2
- package/es/lowcode/view/lc-components/Page/meta.json +49 -0
- package/es/lowcode/view/lc-components/PageContent/index.js +53 -0
- package/es/lowcode/view/lc-components/PageContent/meta.json +9 -0
- package/es/lowcode/view/lc-components/PageFooter/index.js +38 -0
- package/es/lowcode/view/lc-components/PageFooter/meta.json +9 -0
- package/es/lowcode/view/lc-components/PageHeader/index.js +40 -0
- package/es/lowcode/view/lc-components/PageHeader/meta.json +9 -0
- package/es/lowcode/view/lc-components/PageModal/index.js +23 -0
- package/es/lowcode/view/lc-components/Section/FunctionPreview.js +9 -0
- package/es/lowcode/view/lc-components/Section/index.js +1 -0
- package/es/lowcode/view/lc-components/Section/meta.json +1 -1
- package/es/lowcode/view/lc-components/Split/FunctionDesign.js +59 -2
- package/es/lowcode/view/lc-components/Split/FunctionPreview.js +9 -0
- package/es/lowcode/view/lc-components/Split/index.js +46 -7
- package/es/lowcode/view/lc-components/Split/meta.json +10 -29
- package/es/lowcode/view/lc-components/Table/FunctionDesign.js +41 -4
- package/es/lowcode/view/lc-components/Table/FunctionPreview.js +9 -0
- package/es/lowcode/view/lc-components/Table/components/TopFilter.js +96 -0
- package/es/lowcode/view/lc-components/Table/index.js +365 -49
- package/es/lowcode/view/lc-components/Table/meta.json +229 -55
- package/es/lowcode/view/lc-components/Tabs/FunctionDesign.js +72 -2
- package/es/lowcode/view/lc-components/Tabs/FunctionLive.js +1 -0
- package/es/lowcode/view/lc-components/Tabs/FunctionPreview.js +10 -0
- package/es/lowcode/view/lc-components/Tabs/index.js +113 -10
- package/es/lowcode/view/lc-components/Tabs/meta.json +53 -81
- package/es/lowcode/view/lc-components/Text/FunctionPreview.js +9 -0
- package/es/lowcode/view/lc-components/Text/index.js +1 -0
- package/es/lowcode/view/lc-components/Text/meta.json +1 -1
- package/es/lowcode/view/lc-components/Tree/FunctionDesign.js +63 -3
- package/es/lowcode/view/lc-components/Tree/FunctionPreview.js +26 -0
- package/es/lowcode/view/lc-components/Tree/index.js +323 -8
- package/es/lowcode/view/lc-components/Tree/index.less +5 -0
- package/es/lowcode/view/lc-components/Tree/meta.json +224 -80
- package/es/lowcode/view/lc-components/Wrapper.js +44 -27
- package/es/lowcode/view/style/page.less +3 -0
- package/es/services.js +5 -3
- package/es/utils/grid.js +2 -2
- package/lib/components/Builder/index.js +4 -1
- package/lib/components/IconFont/index.js +11 -0
- package/lib/components/LDActions/index.js +141 -0
- package/lib/components/LDActions/index.less +65 -0
- package/lib/components/LdAutoForm/index.js +1 -1
- package/lib/components/LdCom/index.js +2 -1
- package/lib/components/LdFormList/index.js +14 -9
- package/lib/components/LdGrid/index.js +13 -7
- package/lib/components/LdGridForm/index.js +4 -3
- package/lib/components/LdRuntimeCom/index.js +21 -8
- package/lib/components/LdTree/index.js +112 -31
- package/lib/components/LdTree/index.less +6 -1
- package/lib/helper/ldBuilder.js +28 -12
- package/lib/helper/ldComBuild.js +27 -12
- package/lib/index.js +8 -0
- package/lib/locales/zh-CN.js +227 -0
- package/lib/lowcode/constants/api-url.js +382 -263
- package/lib/lowcode/constants/event-topics.js +5 -1
- package/lib/lowcode/constants/index.js +31 -3
- package/lib/lowcode/engine/factory/panel-item-factory/CheckboxStrategy.js +38 -0
- package/lib/lowcode/engine/factory/panel-item-factory/index.js +2 -0
- package/lib/lowcode/engine/meta/box.props.default.json +3 -2
- package/lib/lowcode/engine/meta/box.props.json +1 -3
- package/lib/lowcode/engine/meta/button.props.default.json +5 -2
- package/lib/lowcode/engine/meta/button.props.json +8 -8
- package/lib/lowcode/engine/meta/cardlist.props.default.json +4 -2
- package/lib/lowcode/engine/meta/cardlist.props.json +1 -2
- package/lib/lowcode/engine/meta/dialog.props.default.json +4 -2
- package/lib/lowcode/engine/meta/dialog.props.json +0 -1
- package/lib/lowcode/engine/meta/drawer.props.default.json +4 -2
- package/lib/lowcode/engine/meta/drawer.props.json +0 -1
- package/lib/lowcode/engine/meta/form.props.default.json +53 -4
- package/lib/lowcode/engine/meta/form.props.json +584 -55
- package/lib/lowcode/engine/meta/iframe.props.default.json +1 -1
- package/lib/lowcode/engine/meta/iframe.props.json +1 -1
- package/lib/lowcode/engine/meta/image.props.default.json +5 -2
- package/lib/lowcode/engine/meta/image.props.json +1 -1
- package/lib/lowcode/engine/meta/imex.props.default.json +5 -2
- package/lib/lowcode/engine/meta/imex.props.json +1 -1
- package/lib/lowcode/engine/meta/js-editor/auto-complete.json +152 -26
- package/lib/lowcode/engine/meta/jsx.props.default.json +2 -1
- package/lib/lowcode/engine/meta/jsx.props.json +10 -5
- package/lib/lowcode/engine/meta/layout.props.default.json +5 -2
- package/lib/lowcode/engine/meta/layout.props.json +1 -2
- package/lib/lowcode/engine/meta/link.props.default.json +5 -2
- package/lib/lowcode/engine/meta/link.props.json +2 -2
- package/lib/lowcode/engine/meta/local/local.zh-cn.js +103 -0
- package/lib/lowcode/engine/meta/page.props.default.json +12 -0
- package/lib/lowcode/engine/meta/page.props.json +49 -0
- package/lib/lowcode/engine/meta/pagecontent.props.default.json +6 -0
- package/lib/lowcode/engine/meta/pagecontent.props.json +7 -0
- package/lib/lowcode/engine/meta/pagefooter.props.default.json +6 -0
- package/lib/lowcode/engine/meta/pagefooter.props.json +7 -0
- package/lib/lowcode/engine/meta/pageheader.props.default.json +6 -0
- package/lib/lowcode/engine/meta/pageheader.props.json +7 -0
- package/lib/lowcode/engine/meta/section.props.default.json +5 -2
- package/lib/lowcode/engine/meta/section.props.json +1 -1
- package/lib/lowcode/engine/meta/split.props.default.json +9 -4
- package/lib/lowcode/engine/meta/split.props.json +14 -29
- package/lib/lowcode/engine/meta/table.props.default.json +23 -3
- package/lib/lowcode/engine/meta/table.props.json +257 -55
- package/lib/lowcode/engine/meta/tabs.props.default.json +16 -9
- package/lib/lowcode/engine/meta/tabs.props.json +57 -81
- package/lib/lowcode/engine/meta/text.props.default.json +5 -2
- package/lib/lowcode/engine/meta/text.props.json +1 -1
- package/lib/lowcode/engine/meta/tree.props.default.json +20 -7
- package/lib/lowcode/engine/meta/tree.props.json +225 -79
- package/lib/lowcode/engine/provider/ContextProvider/index.js +177 -0
- package/lib/lowcode/engine/provider/RemoteSourceProvider.js +169 -0
- package/lib/lowcode/engine/tools/dataProcess.js +64 -1
- package/lib/lowcode/engine/tools/helper.js +100 -18
- package/lib/lowcode/engine/tools/useCanvasRender.js +90 -0
- package/lib/lowcode/engine/tools/usePromiseState.js +7 -5
- package/lib/lowcode/engine/tools/useTodo.js +85 -0
- package/lib/lowcode/index.js +7 -0
- package/lib/lowcode/painter/Components.js +46 -20
- package/lib/lowcode/painter/DesignOperator.js +45 -26
- package/lib/lowcode/painter/DesignToolbar.js +82 -11
- package/lib/lowcode/painter/I18n.js +1 -1
- package/lib/lowcode/painter/Outline.js +29 -24
- package/lib/lowcode/painter/Panel.js +97 -139
- package/lib/lowcode/painter/Ribbon.js +1 -1
- package/lib/lowcode/painter/components/ActionBindModal.js +300 -0
- package/lib/lowcode/painter/components/AdvancePanel.js +148 -0
- package/lib/lowcode/painter/components/AttrsPanel.js +153 -0
- package/lib/lowcode/painter/components/Collapse.js +20 -9
- package/lib/lowcode/painter/components/ColorInput.js +5 -3
- package/lib/lowcode/painter/components/DragDrop/DragDropContext.js +146 -0
- package/lib/lowcode/painter/components/DragDrop/DragDropWrapper.js +54 -0
- package/lib/lowcode/painter/components/DragDrop/Overlay.js +15 -0
- package/lib/lowcode/painter/components/DragDrop/TreeDragDropWrapper.js +75 -0
- package/lib/lowcode/painter/components/FieldSelector.js +52 -0
- package/lib/lowcode/painter/components/ListEditor.js +17 -8
- package/lib/lowcode/painter/components/PanelItem.js +1 -1
- package/lib/lowcode/painter/components/PopConfirm.js +10 -3
- package/lib/lowcode/painter/components/SortBox.js +12 -5
- package/lib/lowcode/painter/components/TreeEditor.js +20 -0
- package/lib/lowcode/painter/components/code-editor/BaseEditor.js +14 -2
- package/lib/lowcode/painter/components/code-editor/JSEditor.js +25 -14
- package/lib/lowcode/painter/components/code-editor/JsonEditor.js +48 -0
- package/lib/lowcode/painter/components/field-setting/BatchSetting.js +151 -0
- package/lib/lowcode/painter/components/field-setting/CheckRules.js +133 -0
- package/lib/lowcode/painter/components/field-setting/FieldAttrs.js +295 -0
- package/lib/lowcode/painter/components/field-setting/FieldAttrsModal.js +298 -0
- package/lib/lowcode/painter/components/field-setting/FieldDefaultValue.js +70 -0
- package/lib/lowcode/painter/components/field-setting/FieldRulesModal.js +123 -0
- package/lib/lowcode/painter/components/field-setting/SettingUI.js +427 -0
- package/lib/lowcode/painter/components/field-setting/index.js +370 -0
- package/lib/lowcode/painter/index.js +3 -1
- package/lib/lowcode/painter/{components/actions-editor → panel-section/ActionsEditor}/ActionEditor.js +20 -66
- package/lib/lowcode/painter/{components/actions-editor → panel-section/ActionsEditor}/index.js +71 -10
- package/lib/lowcode/painter/panel-section/BlockEditor/index.js +31 -0
- package/lib/lowcode/painter/panel-section/BlocksEditor/BlockEditorItem.js +51 -0
- package/lib/lowcode/painter/panel-section/BlocksEditor/index.js +208 -0
- package/lib/lowcode/painter/panel-section/DataSetSelector.js +112 -40
- package/lib/lowcode/painter/panel-section/FieldsSetting.js +316 -0
- package/lib/lowcode/painter/panel-section/Icon.js +16 -14
- package/lib/lowcode/painter/panel-section/IconConditionSelector.js +119 -0
- package/lib/lowcode/painter/panel-section/IconSelector.js +5 -2
- package/lib/lowcode/painter/panel-section/ImpExp.js +98 -0
- package/lib/lowcode/painter/panel-section/JSEditor.js +57 -0
- package/lib/lowcode/painter/panel-section/LayoutRatio.js +5 -6
- package/lib/lowcode/painter/panel-section/SerialsSelector.js +51 -0
- package/lib/lowcode/painter/panel-section/SplitDisplay.js +256 -0
- package/lib/lowcode/painter/panel-section/StylePanel/MainPanel.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/StyleContext.js +3 -23
- package/lib/lowcode/painter/panel-section/TabItems.js +45 -29
- package/lib/lowcode/painter/panel-section/TableTopFilter.js +314 -0
- package/lib/lowcode/painter/panel-section/TableZebra.js +67 -6
- package/lib/lowcode/painter/panel-section/TreeRootEditor.js +86 -0
- package/lib/lowcode/painter/services/toolbar.js +32 -0
- package/lib/lowcode/painter/style/action-bind-modal.less +102 -0
- package/lib/lowcode/painter/style/collapse.less +6 -0
- package/lib/lowcode/painter/style/components.less +5 -4
- package/lib/lowcode/painter/style/design.less +2 -3
- package/lib/lowcode/painter/style/dragdrop.less +10 -0
- package/lib/lowcode/painter/style/fields-setting.less +25 -0
- package/lib/lowcode/painter/style/impexp.less +7 -0
- package/lib/lowcode/painter/style/panel-attrs.less +43 -0
- package/lib/lowcode/painter/style/panel.less +6 -37
- package/lib/lowcode/painter/style/pop-confirm.less +9 -2
- package/lib/lowcode/painter/style/split-display.less +28 -0
- package/lib/lowcode/painter/style/treedragdrop.less +19 -0
- package/lib/lowcode/preview/index.js +21 -0
- package/lib/lowcode/view/Canvas.js +32 -145
- package/lib/lowcode/view/Loading.js +6 -2
- package/lib/lowcode/view/Page.js +12 -10
- package/lib/lowcode/view/lc-components/Box/FunctionPreview.js +16 -0
- package/lib/lowcode/view/lc-components/Box/index.js +11 -2
- package/lib/lowcode/view/lc-components/Box/index.less +0 -1
- package/lib/lowcode/view/lc-components/Box/meta.json +1 -3
- package/lib/lowcode/view/lc-components/Button/FunctionDesign.js +8 -10
- package/lib/lowcode/view/lc-components/Button/FunctionLive.js +3 -6
- package/lib/lowcode/view/lc-components/Button/FunctionPreview.js +13 -0
- package/lib/lowcode/view/lc-components/Button/index.js +41 -18
- package/lib/lowcode/view/lc-components/Button/meta.json +8 -8
- package/lib/lowcode/view/lc-components/CardList/FunctionPreview.js +16 -0
- package/lib/lowcode/view/lc-components/CardList/index.js +1 -0
- package/lib/lowcode/view/lc-components/CardList/meta.json +1 -2
- package/lib/lowcode/view/lc-components/Dialog/FunctionDesign.js +16 -23
- package/lib/lowcode/view/lc-components/Dialog/FunctionPreview.js +16 -0
- package/lib/lowcode/view/lc-components/Dialog/index.js +1 -0
- package/lib/lowcode/view/lc-components/Dialog/meta.json +0 -1
- package/lib/lowcode/view/lc-components/Drawer/FunctionDesign.js +4 -2
- package/lib/lowcode/view/lc-components/Drawer/FunctionPreview.js +16 -0
- package/lib/lowcode/view/lc-components/Drawer/index.js +17 -0
- package/lib/lowcode/view/lc-components/Drawer/index.less +3 -0
- package/lib/lowcode/view/lc-components/Drawer/meta.json +0 -1
- package/lib/lowcode/view/lc-components/Form/FunctionDesign.js +32 -2
- package/lib/lowcode/view/lc-components/Form/FunctionPreview.js +16 -0
- package/lib/lowcode/view/lc-components/Form/index.js +113 -7
- package/lib/lowcode/view/lc-components/Form/index.less +5 -0
- package/lib/lowcode/view/lc-components/Form/meta.json +534 -55
- package/lib/lowcode/view/lc-components/Iframe/FunctionPreview.js +16 -0
- package/lib/lowcode/view/lc-components/Iframe/index.js +1 -0
- package/lib/lowcode/view/lc-components/Iframe/meta.json +1 -1
- package/lib/lowcode/view/lc-components/ImEx/FunctionPreview.js +16 -0
- package/lib/lowcode/view/lc-components/ImEx/index.js +1 -0
- package/lib/lowcode/view/lc-components/ImEx/meta.json +1 -1
- package/lib/lowcode/view/lc-components/Image/FunctionPreview.js +16 -0
- package/lib/lowcode/view/lc-components/Image/index.js +1 -0
- package/lib/lowcode/view/lc-components/Image/meta.json +1 -1
- package/lib/lowcode/view/lc-components/JSX/FunctionPreview.js +16 -0
- package/lib/lowcode/view/lc-components/JSX/index.js +19 -6
- package/lib/lowcode/view/lc-components/JSX/meta.json +8 -5
- package/lib/lowcode/view/lc-components/Layout/FunctionDesign.js +21 -18
- package/lib/lowcode/view/lc-components/Layout/FunctionLive.js +3 -8
- package/lib/lowcode/view/lc-components/Layout/FunctionPreview.js +16 -0
- package/lib/lowcode/view/lc-components/Layout/index.js +1 -0
- package/lib/lowcode/view/lc-components/Layout/meta.json +1 -2
- package/lib/lowcode/view/lc-components/Link/FunctionPreview.js +16 -0
- package/lib/lowcode/view/lc-components/Link/index.js +1 -0
- package/lib/lowcode/view/lc-components/Link/meta.json +2 -2
- package/lib/lowcode/view/lc-components/Page/meta.json +49 -0
- package/lib/lowcode/view/lc-components/PageContent/index.js +61 -0
- package/lib/lowcode/view/lc-components/PageContent/meta.json +9 -0
- package/lib/lowcode/view/lc-components/PageFooter/index.js +46 -0
- package/lib/lowcode/view/lc-components/PageFooter/meta.json +9 -0
- package/lib/lowcode/view/lc-components/PageHeader/index.js +48 -0
- package/lib/lowcode/view/lc-components/PageHeader/meta.json +9 -0
- package/lib/lowcode/view/lc-components/PageModal/index.js +30 -0
- package/lib/lowcode/view/lc-components/Section/FunctionPreview.js +16 -0
- package/lib/lowcode/view/lc-components/Section/index.js +1 -0
- package/lib/lowcode/view/lc-components/Section/meta.json +1 -1
- package/lib/lowcode/view/lc-components/Split/FunctionDesign.js +60 -2
- package/lib/lowcode/view/lc-components/Split/FunctionPreview.js +16 -0
- package/lib/lowcode/view/lc-components/Split/index.js +45 -6
- package/lib/lowcode/view/lc-components/Split/meta.json +10 -29
- package/lib/lowcode/view/lc-components/Table/FunctionDesign.js +43 -5
- package/lib/lowcode/view/lc-components/Table/FunctionPreview.js +16 -0
- package/lib/lowcode/view/lc-components/Table/components/TopFilter.js +104 -0
- package/lib/lowcode/view/lc-components/Table/index.js +364 -48
- package/lib/lowcode/view/lc-components/Table/meta.json +229 -55
- package/lib/lowcode/view/lc-components/Tabs/FunctionDesign.js +73 -2
- package/lib/lowcode/view/lc-components/Tabs/FunctionLive.js +2 -1
- package/lib/lowcode/view/lc-components/Tabs/FunctionPreview.js +17 -0
- package/lib/lowcode/view/lc-components/Tabs/index.js +112 -9
- package/lib/lowcode/view/lc-components/Tabs/meta.json +53 -81
- package/lib/lowcode/view/lc-components/Text/FunctionPreview.js +16 -0
- package/lib/lowcode/view/lc-components/Text/index.js +1 -0
- package/lib/lowcode/view/lc-components/Text/meta.json +1 -1
- package/lib/lowcode/view/lc-components/Tree/FunctionDesign.js +64 -3
- package/lib/lowcode/view/lc-components/Tree/FunctionPreview.js +33 -0
- package/lib/lowcode/view/lc-components/Tree/index.js +321 -6
- package/lib/lowcode/view/lc-components/Tree/index.less +5 -0
- package/lib/lowcode/view/lc-components/Tree/meta.json +224 -80
- package/lib/lowcode/view/lc-components/Wrapper.js +42 -25
- package/lib/lowcode/view/style/page.less +3 -0
- package/lib/services.js +5 -3
- package/lib/utils/grid.js +2 -2
- package/package.json +12 -7
- package/es/lowcode/engine/provider/ContextProvider.js +0 -169
- package/es/lowcode/painter/components/actions-editor/ActionEditor.js +0 -147
- package/es/lowcode/painter/panel-section/TableActions.js +0 -19
- package/lib/lowcode/engine/provider/ContextProvider.js +0 -177
- package/lib/lowcode/painter/panel-section/TableActions.js +0 -26
|
@@ -16,7 +16,18 @@
|
|
|
16
16
|
{
|
|
17
17
|
"key": "dataset",
|
|
18
18
|
"name": "数据集",
|
|
19
|
-
"type": "_DataSetSelector"
|
|
19
|
+
"type": "_DataSetSelector",
|
|
20
|
+
"next": {
|
|
21
|
+
"name": "字段配置",
|
|
22
|
+
"props": [
|
|
23
|
+
{
|
|
24
|
+
"key": "fields",
|
|
25
|
+
"name": "#字段配置器",
|
|
26
|
+
"type": "_FieldsSetting",
|
|
27
|
+
"component": "table"
|
|
28
|
+
}
|
|
29
|
+
]
|
|
30
|
+
}
|
|
20
31
|
},
|
|
21
32
|
{
|
|
22
33
|
"key": "autoLoad",
|
|
@@ -32,11 +43,36 @@
|
|
|
32
43
|
"default": false
|
|
33
44
|
},
|
|
34
45
|
{
|
|
35
|
-
"key": "
|
|
36
|
-
"name": "
|
|
46
|
+
"key": "draggable",
|
|
47
|
+
"name": "拖拽排序",
|
|
37
48
|
"type": "switch",
|
|
38
49
|
"default": false
|
|
39
50
|
},
|
|
51
|
+
{
|
|
52
|
+
"key": "topSetting",
|
|
53
|
+
"name": "顶部操作",
|
|
54
|
+
"type": "group",
|
|
55
|
+
"default": true,
|
|
56
|
+
"next": {
|
|
57
|
+
"name": "顶部操作",
|
|
58
|
+
"props": [
|
|
59
|
+
{
|
|
60
|
+
"key": "topActionGroup",
|
|
61
|
+
"name": "顶部按钮组",
|
|
62
|
+
"type": "_ActionsEditor",
|
|
63
|
+
"default": { "display": "button", "max": 2, "moreText": "操作", "todoList": [] },
|
|
64
|
+
"defaultCode": "function todo(instance) { \n \n}",
|
|
65
|
+
"wrapper": "collapse"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"key": "topFilter",
|
|
69
|
+
"name": "顶部过滤器",
|
|
70
|
+
"type": "_TableTopFilter",
|
|
71
|
+
"wrapper": "collapse"
|
|
72
|
+
}
|
|
73
|
+
]
|
|
74
|
+
}
|
|
75
|
+
},
|
|
40
76
|
{
|
|
41
77
|
"key": "actionsColumn",
|
|
42
78
|
"name": "操作列",
|
|
@@ -61,15 +97,100 @@
|
|
|
61
97
|
},
|
|
62
98
|
{
|
|
63
99
|
"key": "actions",
|
|
64
|
-
"name": "
|
|
65
|
-
"
|
|
66
|
-
"
|
|
67
|
-
"
|
|
68
|
-
"
|
|
100
|
+
"name": "表格操作项",
|
|
101
|
+
"type": "_ActionsEditor",
|
|
102
|
+
"default": { "display": "text", "max": 2, "moreText": "更多操作", "todoList": [] },
|
|
103
|
+
"defaultCode": "function onActionClick(data) {\n\n}",
|
|
104
|
+
"wrapper": "collapse",
|
|
105
|
+
"wrapperProps": { "suppressIcon": true }
|
|
69
106
|
}
|
|
70
107
|
]
|
|
71
108
|
}
|
|
72
109
|
},
|
|
110
|
+
{
|
|
111
|
+
"key": "rowSelectionSetting",
|
|
112
|
+
"name": "行选择器",
|
|
113
|
+
"type": "group",
|
|
114
|
+
"default": true,
|
|
115
|
+
"next": {
|
|
116
|
+
"name": "行选择器",
|
|
117
|
+
"props": [
|
|
118
|
+
{
|
|
119
|
+
"key": "rowSelection",
|
|
120
|
+
"name": "开启行选择器",
|
|
121
|
+
"type": "switch",
|
|
122
|
+
"default": false
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"key": "suppressRowSelectionPagination",
|
|
126
|
+
"name": "停用分页多选",
|
|
127
|
+
"desc": "停用分页多选后,选择器将不记录跨页的行选择,而只记录当前页的行选择",
|
|
128
|
+
"type": "switch",
|
|
129
|
+
"default": false
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"key": "rowSelectionMode",
|
|
133
|
+
"name": "选择器模式",
|
|
134
|
+
"type": "segmented",
|
|
135
|
+
"options": [
|
|
136
|
+
{
|
|
137
|
+
"label": "复选",
|
|
138
|
+
"value": "multiple"
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
"label": "单选",
|
|
142
|
+
"value": "single"
|
|
143
|
+
}
|
|
144
|
+
],
|
|
145
|
+
"default": "multiple"
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
"key": "bantchActions",
|
|
149
|
+
"name": "批量操作",
|
|
150
|
+
"type": "_ActionsEditor",
|
|
151
|
+
"default": { "todoList": [] },
|
|
152
|
+
"defaultCode": "function onBatchOperationsClick(key, selectedRows) {\n\n}",
|
|
153
|
+
"suppressDisplay": true,
|
|
154
|
+
"suppressMax": true,
|
|
155
|
+
"suppressMore": true,
|
|
156
|
+
"wrapper": "collapse",
|
|
157
|
+
"wrapperProps": { "suppressIcon": true }
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
"key": "defaultRowSelectedCode",
|
|
161
|
+
"name": "默认选中行",
|
|
162
|
+
"type": "_JSEditor",
|
|
163
|
+
"defaultCode": "function getRowDefaultSelected(data, node) { \n return false; \n}",
|
|
164
|
+
"mustConfirm": true,
|
|
165
|
+
"wrapper": "collapse",
|
|
166
|
+
"wrapperProps": { "suppressIcon": true }
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
"key": "rowSelectableCode",
|
|
170
|
+
"name": "行是否可选",
|
|
171
|
+
"type": "_JSEditor",
|
|
172
|
+
"defaultCode": "function getRowSelectable(data, node) { \n return true; \n}",
|
|
173
|
+
"mustConfirm": true,
|
|
174
|
+
"wrapper": "collapse",
|
|
175
|
+
"wrapperProps": { "suppressIcon": true }
|
|
176
|
+
}
|
|
177
|
+
]
|
|
178
|
+
}
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
"key": "impexpSetting",
|
|
182
|
+
"name": "导入导出",
|
|
183
|
+
"type": "group",
|
|
184
|
+
"props": [
|
|
185
|
+
{
|
|
186
|
+
"key": "impexp",
|
|
187
|
+
"name": "#导入导出",
|
|
188
|
+
"type": "_ImpExp",
|
|
189
|
+
"default": { "export": true },
|
|
190
|
+
"wrapperProps": { "suppressIcon": true }
|
|
191
|
+
}
|
|
192
|
+
]
|
|
193
|
+
},
|
|
73
194
|
{
|
|
74
195
|
"key": "styleSetting",
|
|
75
196
|
"name": "风格和样式",
|
|
@@ -90,14 +211,27 @@
|
|
|
90
211
|
{
|
|
91
212
|
"key": "zebra",
|
|
92
213
|
"name": "斑马纹",
|
|
214
|
+
"desc": "设置条件后按条件显示斑马纹,未设置条件按偶数行显示斑马纹,删除色码将不显示斑马纹",
|
|
93
215
|
"type": "_TableZebra",
|
|
94
216
|
"default": false
|
|
95
217
|
},
|
|
218
|
+
{
|
|
219
|
+
"key": "suppressPreset",
|
|
220
|
+
"name": "关闭预设",
|
|
221
|
+
"type": "switch",
|
|
222
|
+
"default": false
|
|
223
|
+
},
|
|
96
224
|
{
|
|
97
225
|
"key": "bordered",
|
|
98
226
|
"name": "边框线",
|
|
99
227
|
"type": "switch",
|
|
100
228
|
"default": false
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
"key": "renderIndex",
|
|
232
|
+
"name": "显示序号",
|
|
233
|
+
"type": "switch",
|
|
234
|
+
"default": true
|
|
101
235
|
}
|
|
102
236
|
]
|
|
103
237
|
},
|
|
@@ -114,7 +248,7 @@
|
|
|
114
248
|
},
|
|
115
249
|
{
|
|
116
250
|
"key": "showSizeChanger",
|
|
117
|
-
"name": "
|
|
251
|
+
"name": "pageSize选择",
|
|
118
252
|
"type": "switch",
|
|
119
253
|
"default": true
|
|
120
254
|
},
|
|
@@ -146,28 +280,62 @@
|
|
|
146
280
|
]
|
|
147
281
|
},
|
|
148
282
|
{
|
|
149
|
-
"key": "
|
|
150
|
-
"name": "
|
|
151
|
-
"
|
|
152
|
-
"
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
283
|
+
"key": "advance",
|
|
284
|
+
"name": "高级设置",
|
|
285
|
+
"type": "group",
|
|
286
|
+
"default": true,
|
|
287
|
+
"next": {
|
|
288
|
+
"name": "高级设置",
|
|
289
|
+
"props": [
|
|
290
|
+
{
|
|
291
|
+
"key": "formatDataSource",
|
|
292
|
+
"name": "格式化数据",
|
|
293
|
+
"type": "_JSEditor",
|
|
294
|
+
"defaultCode": "function formatDataSource(list, detail) { \n return []; \n}",
|
|
295
|
+
"mustConfirm": true,
|
|
296
|
+
"wrapper": "collapse",
|
|
297
|
+
"wrapperProps": { "suppressIcon": true }
|
|
298
|
+
},
|
|
299
|
+
{
|
|
300
|
+
"key": "getDataPath",
|
|
301
|
+
"name": "构建树层级",
|
|
302
|
+
"type": "_JSEditor",
|
|
303
|
+
"defaultCode": "function getDataPath(data) { \n return []; \n}",
|
|
304
|
+
"mustConfirm": true,
|
|
305
|
+
"wrapper": "collapse",
|
|
306
|
+
"wrapperProps": { "suppressIcon": true }
|
|
307
|
+
},
|
|
308
|
+
{
|
|
309
|
+
"key": "columnsRewrite",
|
|
310
|
+
"name": "重写表格列",
|
|
311
|
+
"desc": "自定义某些表格列",
|
|
312
|
+
"type": "_JSEditor",
|
|
313
|
+
"defaultCode": "function columnsRewrite(columns) { \n return columns; \n}",
|
|
314
|
+
"mustConfirm": true,
|
|
315
|
+
"wrapper": "collapse",
|
|
316
|
+
"wrapperProps": { "suppressIcon": true }
|
|
317
|
+
},
|
|
318
|
+
{
|
|
319
|
+
"key": "columnsReset",
|
|
320
|
+
"name": "重置表格列",
|
|
321
|
+
"desc": "完全自定义所有表格列,优先级大于columnsRewrite",
|
|
322
|
+
"type": "_JSEditor",
|
|
323
|
+
"defaultCode": "function columnsReset(columns) { \n return columns; \n}",
|
|
324
|
+
"mustConfirm": true,
|
|
325
|
+
"wrapper": "collapse",
|
|
326
|
+
"wrapperProps": { "suppressIcon": true }
|
|
327
|
+
},
|
|
328
|
+
{
|
|
329
|
+
"key": "modelParams",
|
|
330
|
+
"name": "model参数",
|
|
331
|
+
"type": "_JSEditor",
|
|
332
|
+
"defaultCode": "function getModelParams() { \n return {}; \n}",
|
|
333
|
+
"mustConfirm": true,
|
|
334
|
+
"wrapper": "collapse",
|
|
335
|
+
"wrapperProps": { "suppressIcon": true }
|
|
336
|
+
}
|
|
337
|
+
]
|
|
338
|
+
}
|
|
171
339
|
}
|
|
172
340
|
],
|
|
173
341
|
"advance": {
|
|
@@ -176,31 +344,13 @@
|
|
|
176
344
|
"key": "onMount",
|
|
177
345
|
"name": "组件首次渲染时",
|
|
178
346
|
"desc": "在组件首次渲染时,执行方法",
|
|
179
|
-
"func": "(params)=>{\n\t\n}"
|
|
347
|
+
"func": "(params, instance)=>{\n\t\n}"
|
|
180
348
|
},
|
|
181
349
|
{
|
|
182
350
|
"key": "onUnmount",
|
|
183
351
|
"name": "组件卸载时",
|
|
184
352
|
"desc": "在组件卸载时,执行方法。",
|
|
185
|
-
"func": "(
|
|
186
|
-
},
|
|
187
|
-
{
|
|
188
|
-
"key": "onBatchOperationsClick",
|
|
189
|
-
"name": "批量操作点击",
|
|
190
|
-
"desc": "点击操作的回调函数",
|
|
191
|
-
"func": "(key, selectedRows)=>{\n\t\n}"
|
|
192
|
-
},
|
|
193
|
-
{
|
|
194
|
-
"key": "onActionClick",
|
|
195
|
-
"name": "操作列点击",
|
|
196
|
-
"desc": "点击操作的回调函数",
|
|
197
|
-
"func": "(itemData)=>{\n\t\n}"
|
|
198
|
-
},
|
|
199
|
-
{
|
|
200
|
-
"key": "actionRender",
|
|
201
|
-
"name": "操作列定制渲染",
|
|
202
|
-
"desc": "返回为false时,该操作不可见",
|
|
203
|
-
"func": "(title, rowData)=>{\n\t\n}"
|
|
353
|
+
"func": "(instance)=>{\n\t\n}"
|
|
204
354
|
},
|
|
205
355
|
{
|
|
206
356
|
"key": "onRowClick",
|
|
@@ -215,10 +365,34 @@
|
|
|
215
365
|
"func": "(data, rowIndex, params)=>{\n\t\n}"
|
|
216
366
|
},
|
|
217
367
|
{
|
|
218
|
-
"key": "
|
|
219
|
-
"name": "
|
|
220
|
-
"desc": "
|
|
221
|
-
"func": "(data,
|
|
368
|
+
"key": "onRowSelected",
|
|
369
|
+
"name": "行选择",
|
|
370
|
+
"desc": "选中行时,执行方法",
|
|
371
|
+
"func": "(data, isSelected, SelectedRows, params)=>{\n\t\n}"
|
|
372
|
+
},
|
|
373
|
+
{
|
|
374
|
+
"key": "onRowSelectChange",
|
|
375
|
+
"name": "行选择变化",
|
|
376
|
+
"desc": "行选中发生变化时,执行方法",
|
|
377
|
+
"func": "(rows, nodes, params)=>{\n\t\n}"
|
|
378
|
+
},
|
|
379
|
+
{
|
|
380
|
+
"key": "onRowDragged",
|
|
381
|
+
"name": "行拖拽后",
|
|
382
|
+
"desc": "拖拽行使其顺序发生变化后,执行方法",
|
|
383
|
+
"func": "(toId, fromId, params)=>{\n\t\n}"
|
|
384
|
+
},
|
|
385
|
+
{
|
|
386
|
+
"key": "afterInit",
|
|
387
|
+
"name": "初始化后的回调",
|
|
388
|
+
"desc": "组件及数据加载完成后,执行方法",
|
|
389
|
+
"func": "(res, dispatch, props)=>{\n\t\n}"
|
|
390
|
+
},
|
|
391
|
+
{
|
|
392
|
+
"key": "afterQuery",
|
|
393
|
+
"name": "数据读取回调",
|
|
394
|
+
"desc": "读取数据源后执行方法,返回接口中原始数据",
|
|
395
|
+
"func": "(res)=>{\n\t\n}"
|
|
222
396
|
}
|
|
223
397
|
]
|
|
224
398
|
}
|
|
@@ -1,9 +1,79 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
3
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
1
4
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
2
|
-
var _excluded = ["children"];
|
|
5
|
+
var _excluded = ["children", "id", "items"];
|
|
6
|
+
import React, { useEffect } from 'react';
|
|
3
7
|
import Index from "./index";
|
|
8
|
+
import { useCreation } from 'ahooks';
|
|
9
|
+
import { cloneDeep, differenceBy } from 'lodash';
|
|
10
|
+
import { suid } from '@luck-design-biz/base/utils';
|
|
11
|
+
import { useContext, usePageData } from "../../../engine/provider/ContextProvider";
|
|
12
|
+
import { add, findNodeAndParent } from "../../../engine/tools/dataProcess";
|
|
13
|
+
import boxDefaultMeta from "../../../engine/meta/box.props.default.json";
|
|
4
14
|
var FunctionDesign = function FunctionDesign(_ref) {
|
|
5
15
|
var children = _ref.children,
|
|
16
|
+
id = _ref.id,
|
|
17
|
+
items = _ref.items,
|
|
6
18
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
7
|
-
|
|
19
|
+
var ctx = useContext();
|
|
20
|
+
var _usePageData = usePageData(),
|
|
21
|
+
_usePageData2 = _slicedToArray(_usePageData, 2),
|
|
22
|
+
setPageData = _usePageData2[1].setPageData;
|
|
23
|
+
useCreation(function () {
|
|
24
|
+
if (children !== null && children !== void 0 && children.length) return;
|
|
25
|
+
ctx.$subscriber(ctx.topics.COMPONENT_APPEND).once(function (_ref2) {
|
|
26
|
+
var compId = _ref2.id,
|
|
27
|
+
pageData = _ref2.pageData;
|
|
28
|
+
if (compId !== id) return;
|
|
29
|
+
var cloneData = cloneDeep(pageData);
|
|
30
|
+
var boxId = "box_".concat(suid());
|
|
31
|
+
add(cloneData, id, boxId, _objectSpread(_objectSpread({}, boxDefaultMeta), {}, {
|
|
32
|
+
buildIn: true,
|
|
33
|
+
tabId: items[0].id
|
|
34
|
+
}));
|
|
35
|
+
setPageData(cloneData);
|
|
36
|
+
}).watch();
|
|
37
|
+
}, []);
|
|
38
|
+
useEffect(function () {
|
|
39
|
+
var cmid = ctx.$subscriber(ctx.topics.COMPONENT_MODIFY).on(function (_ref3) {
|
|
40
|
+
var compId = _ref3.id,
|
|
41
|
+
pageData = _ref3.pageData,
|
|
42
|
+
newValue = _ref3.newValue,
|
|
43
|
+
oldValue = _ref3.oldValue;
|
|
44
|
+
if (compId !== id || !newValue.hasOwnProperty('items')) return;
|
|
45
|
+
if (newValue.items.length > oldValue.items.length) {
|
|
46
|
+
var _differenceBy = differenceBy(newValue.items, oldValue.items, 'id'),
|
|
47
|
+
_differenceBy2 = _slicedToArray(_differenceBy, 1),
|
|
48
|
+
newItem = _differenceBy2[0];
|
|
49
|
+
var boxId = "box_".concat(suid());
|
|
50
|
+
add(pageData, id, boxId, _objectSpread(_objectSpread({}, boxDefaultMeta), {}, {
|
|
51
|
+
buildIn: true,
|
|
52
|
+
tabId: newItem.id
|
|
53
|
+
}));
|
|
54
|
+
setPageData(pageData);
|
|
55
|
+
} else if (newValue.items.length < oldValue.items.length) {
|
|
56
|
+
var _differenceBy3 = differenceBy(oldValue.items, newValue.items, 'id'),
|
|
57
|
+
_differenceBy4 = _slicedToArray(_differenceBy3, 1),
|
|
58
|
+
removeItem = _differenceBy4[0];
|
|
59
|
+
var _findNodeAndParent = findNodeAndParent(id, pageData),
|
|
60
|
+
current = _findNodeAndParent.node;
|
|
61
|
+
var _boxId = current.children.find(function (childId) {
|
|
62
|
+
return current[childId].props.tabId === removeItem.id;
|
|
63
|
+
});
|
|
64
|
+
ctx.$publisher(ctx.topics.COMPONENT_DELETE, {
|
|
65
|
+
id: _boxId,
|
|
66
|
+
pageData: pageData
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
}).watch();
|
|
70
|
+
return function () {
|
|
71
|
+
return ctx.$unsubscriber(ctx.topics.COMPONENT_MODIFY, cmid);
|
|
72
|
+
};
|
|
73
|
+
}, []);
|
|
74
|
+
return /*#__PURE__*/React.createElement(Index, _extends({
|
|
75
|
+
id: id,
|
|
76
|
+
items: items
|
|
77
|
+
}, props), children);
|
|
8
78
|
};
|
|
9
79
|
export default FunctionDesign;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
2
|
+
var _excluded = ["children"];
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import Index from "./index";
|
|
5
|
+
var FunctionPreview = function FunctionPreview(_ref) {
|
|
6
|
+
var children = _ref.children,
|
|
7
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
8
|
+
return /*#__PURE__*/React.createElement(Index, props, children);
|
|
9
|
+
};
|
|
10
|
+
export default FunctionPreview;
|
|
@@ -1,21 +1,124 @@
|
|
|
1
|
-
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
2
|
-
var _excluded = ["id", "children"];
|
|
3
1
|
import React, { useRef } from 'react';
|
|
4
|
-
import {
|
|
2
|
+
import { findDOMNode } from 'react-dom';
|
|
3
|
+
import PropTypes from 'prop-types';
|
|
4
|
+
import { useMemoizedFn, useCreation, useMount, useUnmount } from 'ahooks';
|
|
5
|
+
import styled from 'styled-components';
|
|
6
|
+
import { Tabs } from 'luck-design/antd';
|
|
7
|
+
import { useContext } from "../../../engine/provider/ContextProvider";
|
|
5
8
|
import Wrapper from "../Wrapper";
|
|
9
|
+
import LdRuntimeCom from "../../../../components/LdRuntimeCom";
|
|
10
|
+
import { omitBadProps } from "../../../engine/tools/helper";
|
|
11
|
+
import defaultMeta from "../../../engine/meta/tabs.props.default.json";
|
|
12
|
+
var StyledTabs = styled(Tabs).withConfig({
|
|
13
|
+
displayName: "StyledTabs",
|
|
14
|
+
componentId: "luckda-6530__sc-ht1jge-0"
|
|
15
|
+
})(["", ""], function (props) {
|
|
16
|
+
return props.$css;
|
|
17
|
+
});
|
|
6
18
|
var LCTabs = function LCTabs(_ref) {
|
|
7
|
-
var
|
|
8
|
-
|
|
9
|
-
|
|
19
|
+
var children = _ref.children,
|
|
20
|
+
id = _ref.id,
|
|
21
|
+
items = _ref.items,
|
|
22
|
+
type = _ref.type,
|
|
23
|
+
tabPosition = _ref.tabPosition,
|
|
24
|
+
tabBarGutter = _ref.tabBarGutter,
|
|
25
|
+
tabBarExtraContent = _ref.tabBarExtraContent,
|
|
26
|
+
css = _ref.css,
|
|
27
|
+
advance = _ref.advance;
|
|
10
28
|
var ref = useRef();
|
|
29
|
+
var ctx = useContext();
|
|
30
|
+
var _defaultActiveKey = useCreation(function () {
|
|
31
|
+
var _items$find;
|
|
32
|
+
return (_items$find = items.find(function (_ref2) {
|
|
33
|
+
var active = _ref2.active;
|
|
34
|
+
return active;
|
|
35
|
+
})) === null || _items$find === void 0 ? void 0 : _items$find.id;
|
|
36
|
+
}, [items]);
|
|
37
|
+
useMount(function () {
|
|
38
|
+
ctx.doAction(advance.events.onMount, {
|
|
39
|
+
instance: ref.current
|
|
40
|
+
});
|
|
41
|
+
});
|
|
42
|
+
useUnmount(function () {
|
|
43
|
+
ctx.doAction(advance.events.onUnmount, {
|
|
44
|
+
instance: ref.current
|
|
45
|
+
});
|
|
46
|
+
});
|
|
47
|
+
var handleTabClick = useMemoizedFn(function (tabKey, e) {
|
|
48
|
+
ctx.doAction(advance.events.onTabClick, {
|
|
49
|
+
tabKey: tabKey,
|
|
50
|
+
e: e
|
|
51
|
+
});
|
|
52
|
+
});
|
|
11
53
|
var getTargetDom = useMemoizedFn(function () {
|
|
12
|
-
return ref.current;
|
|
54
|
+
return findDOMNode(ref.current);
|
|
13
55
|
});
|
|
14
56
|
return /*#__PURE__*/React.createElement(Wrapper, {
|
|
15
57
|
id: id,
|
|
58
|
+
displayName: "Tabs",
|
|
16
59
|
getTargetDom: getTargetDom
|
|
17
|
-
}, /*#__PURE__*/React.createElement(
|
|
18
|
-
ref: ref
|
|
19
|
-
|
|
60
|
+
}, /*#__PURE__*/React.createElement(StyledTabs, {
|
|
61
|
+
ref: ref,
|
|
62
|
+
defaultActiveKey: _defaultActiveKey,
|
|
63
|
+
type: type,
|
|
64
|
+
tabPosition: tabPosition,
|
|
65
|
+
tabBarGutter: tabBarGutter,
|
|
66
|
+
tabBarExtraContent: tabBarExtraContent ? /*#__PURE__*/React.createElement(LdRuntimeCom, null, tabBarExtraContent) : null,
|
|
67
|
+
$css: css,
|
|
68
|
+
onTabClick: handleTabClick
|
|
69
|
+
}, items.map(function (item) {
|
|
70
|
+
return /*#__PURE__*/React.createElement(Tabs.TabPane, {
|
|
71
|
+
tab: item.name,
|
|
72
|
+
key: item.id,
|
|
73
|
+
forceRender: item.destory
|
|
74
|
+
}, children === null || children === void 0 ? void 0 : children.find(function (child) {
|
|
75
|
+
return child.props.tabId === item.id;
|
|
76
|
+
}));
|
|
77
|
+
})));
|
|
78
|
+
};
|
|
79
|
+
LCTabs.propTypes = {
|
|
80
|
+
/**
|
|
81
|
+
* @name 唯一标识
|
|
82
|
+
* @type string
|
|
83
|
+
* @disabled true
|
|
84
|
+
*/
|
|
85
|
+
id: PropTypes.string.isRequired,
|
|
86
|
+
/**
|
|
87
|
+
* @name 标签项
|
|
88
|
+
* @type _TabItems
|
|
89
|
+
*/
|
|
90
|
+
items: PropTypes.arrayOf(PropTypes.shape({
|
|
91
|
+
id: PropTypes.string.isRequired,
|
|
92
|
+
name: PropTypes.string,
|
|
93
|
+
active: PropTypes.bool,
|
|
94
|
+
destory: PropTypes.bool,
|
|
95
|
+
serial: PropTypes.string,
|
|
96
|
+
serialEffect: PropTypes.oneOf[('hidden', 'disable')]
|
|
97
|
+
})),
|
|
98
|
+
/**
|
|
99
|
+
* @name 基本样式
|
|
100
|
+
* @type segmented
|
|
101
|
+
* @options [{"label": "线条式","value": "line"},{"label": "卡片式","value": "card"}]
|
|
102
|
+
* @default "line"
|
|
103
|
+
*/
|
|
104
|
+
type: PropTypes.oneOf(['line', 'card']),
|
|
105
|
+
/**
|
|
106
|
+
* @name 页签位置
|
|
107
|
+
* @type segmented
|
|
108
|
+
* @options [{"label": "上","value": "top"},{"label": "右","value": "right"},{"label": "下","value": "bottom"},{"label": "左","value": "left"}]
|
|
109
|
+
* @default "top"
|
|
110
|
+
*/
|
|
111
|
+
tabPosition: PropTypes.oneOf(['top', 'right', 'bottom', 'left']),
|
|
112
|
+
/**
|
|
113
|
+
* @name Tab间隙
|
|
114
|
+
* @type number
|
|
115
|
+
*/
|
|
116
|
+
tabBarGutter: PropTypes.number,
|
|
117
|
+
/**
|
|
118
|
+
* @name tab bar 上额外的元素
|
|
119
|
+
* @type _JSEditor
|
|
120
|
+
*/
|
|
121
|
+
tabBarExtraContent: PropTypes.node
|
|
20
122
|
};
|
|
123
|
+
LCTabs.defaultProps = omitBadProps(defaultMeta);
|
|
21
124
|
export default LCTabs;
|