@luck-design-biz/luckda 1.0.1-9 → 1.0.2
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/LICENSE +21 -21
- package/README.md +40 -40
- package/es/components/LDActions/index.less +70 -68
- package/es/components/LdCard/index.js +154 -67
- package/es/components/LdGrid/index.js +4 -4
- package/es/components/LdGridForm/index.less +7 -7
- package/es/components/LdTree/index.js +14 -8
- package/es/components/LdTree/index.less +42 -40
- package/es/helper/action.js +6 -6
- package/es/helper/form.js +14 -14
- package/es/helper/index.less +7 -7
- package/es/helper/ldBuilder.js +1 -1
- package/es/locales/zh-CN.js +10 -4
- package/es/lowcode/constants/api-url.js +87 -87
- package/es/lowcode/constants/index.js +1 -1
- package/es/lowcode/engine/meta/cardlist.props.default.json +27 -7
- package/es/lowcode/engine/meta/cardlist.props.json +254 -73
- package/es/lowcode/engine/meta/components-list.json +30 -0
- package/es/lowcode/engine/meta/grouptree.props.default.json +16 -0
- package/es/lowcode/engine/meta/grouptree.props.json +83 -0
- package/es/lowcode/engine/meta/iframe.props.default.json +1 -2
- package/es/lowcode/engine/meta/iframe.props.json +3 -5
- package/es/lowcode/engine/meta/image.props.default.json +3 -3
- package/es/lowcode/engine/meta/image.props.json +51 -17
- package/es/lowcode/engine/meta/imex.props.json +1 -1
- package/es/lowcode/engine/meta/js-editor/auto-complete.json +47 -29
- package/es/lowcode/engine/meta/link.props.default.json +1 -2
- package/es/lowcode/engine/meta/link.props.json +9 -10
- package/es/lowcode/engine/meta/tabs.props.default.json +1 -1
- package/es/lowcode/engine/meta/tabs.props.json +1 -1
- package/es/lowcode/engine/meta/tree.props.json +2 -2
- package/es/lowcode/engine/provider/ContextProvider/index.js +50 -46
- package/es/lowcode/engine/provider/ContextProvider/usePageDataStore.js +82 -2
- package/es/lowcode/engine/tools/dataProcess.js +76 -76
- package/es/lowcode/engine/tools/helper.js +21 -0
- package/es/lowcode/painter/Components.js +8 -3
- package/es/lowcode/painter/DesignOperator.js +10 -5
- package/es/lowcode/painter/DesignToolbar.js +78 -47
- package/es/lowcode/painter/Ribbon.js +14 -1
- package/es/lowcode/painter/components/ActionBindModal.js +3 -7
- package/es/lowcode/painter/components/Collapse.js +26 -26
- package/es/lowcode/painter/components/ColorInput.js +24 -24
- package/es/lowcode/painter/components/DragDrop/DragDropContext.js +144 -37
- package/es/lowcode/painter/components/DragDrop/DragDropWrapper.js +29 -6
- package/es/lowcode/painter/components/DragDrop/Overlay.js +5 -2
- package/es/lowcode/painter/components/DragDrop/TreeDragDropWrapper.js +7 -4
- package/es/lowcode/painter/components/ListEditor.js +24 -24
- package/es/lowcode/painter/components/NumberInput.js +28 -28
- package/es/lowcode/painter/components/PanelItem.js +24 -24
- package/es/lowcode/painter/components/PopConfirm.js +8 -8
- package/es/lowcode/painter/components/PopForm.js +27 -27
- package/es/lowcode/painter/components/RuleInput.js +30 -30
- package/es/lowcode/painter/components/SortBox.js +22 -22
- package/es/lowcode/painter/components/code-editor/BaseEditor.js +34 -33
- package/es/lowcode/painter/components/code-editor/CssEditor.js +25 -25
- package/es/lowcode/painter/components/code-editor/FullScreenEditor.js +23 -23
- package/es/lowcode/painter/components/code-editor/JSEditor.js +20 -20
- package/es/lowcode/painter/components/code-editor/JsonEditor.js +25 -25
- package/es/lowcode/painter/components/field-setting/FieldAttrs.js +2 -2
- package/es/lowcode/painter/expect.js +27 -0
- package/es/lowcode/painter/panel-section/ActionsEditor/ActionEditor.js +20 -2
- package/es/lowcode/painter/panel-section/ActionsEditor/index.js +18 -3
- package/es/lowcode/painter/panel-section/ComplexPop.js +1 -1
- package/es/lowcode/painter/panel-section/DataSetSelector.js +14 -3
- package/es/lowcode/painter/panel-section/GroupClassSelector.js +55 -0
- package/es/lowcode/painter/panel-section/Icon.js +23 -23
- package/es/lowcode/painter/panel-section/IconSelector.js +16 -16
- package/es/lowcode/painter/panel-section/LayoutRatio.js +21 -21
- package/es/lowcode/painter/panel-section/PageVars.js +1 -1
- package/es/lowcode/painter/panel-section/StylePanel/BackGround.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/Border.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/BorderRadius.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/BorderRadiusSelector.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/BorderSelector.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/Display.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/Font.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/FontEditor.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/GapSelector.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/HighLightPanel.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/HighLigthtSpan.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/HightLightSvg.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/MainPanel.js +3 -2
- package/es/lowcode/painter/panel-section/StylePanel/Margin.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/Opacity.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/Padding.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/Pointer.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/Shadow.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/Size.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/StyleContext.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/StyleRow.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/WidthHeight.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/index.js +15 -15
- package/es/lowcode/painter/panel-section/TabItems.js +1 -1
- package/es/lowcode/painter/panel-section/TableTopFilter.js +3 -3
- package/es/lowcode/painter/style/action-bind-modal.less +104 -102
- package/es/lowcode/painter/style/actions-editor.less +15 -15
- package/es/lowcode/painter/style/border-editor.less +36 -36
- package/es/lowcode/painter/style/border-radius-selector.less +42 -42
- package/es/lowcode/painter/style/border-selector.less +39 -39
- package/es/lowcode/painter/style/button-type.less +5 -5
- package/es/lowcode/painter/style/collapse.less +28 -28
- package/es/lowcode/painter/style/color-input.less +19 -19
- package/es/lowcode/painter/style/components.less +91 -91
- package/es/lowcode/painter/style/design.less +179 -166
- package/es/lowcode/painter/style/display.less +17 -17
- package/es/lowcode/painter/style/dragdrop.less +56 -10
- package/es/lowcode/painter/style/fields-setting.less +25 -25
- package/es/lowcode/painter/style/font-editor.less +9 -9
- package/es/lowcode/painter/style/fullscreen-editor.less +17 -17
- package/es/lowcode/painter/style/icon-selector.less +22 -22
- package/es/lowcode/painter/style/icon.less +10 -10
- package/es/lowcode/painter/style/impexp.less +7 -7
- package/es/lowcode/painter/style/index.less +6 -6
- package/es/lowcode/painter/style/layout-ratio.less +51 -51
- package/es/lowcode/painter/style/list-editor.less +97 -95
- package/es/lowcode/painter/style/number-input.less +19 -17
- package/es/lowcode/painter/style/outline.less +30 -28
- package/es/lowcode/painter/style/page-layout-display.less +27 -27
- package/es/lowcode/painter/style/page-vars.less +25 -25
- package/es/lowcode/painter/style/panel-attrs.less +47 -43
- package/es/lowcode/painter/style/panel-item.less +54 -54
- package/es/lowcode/painter/style/panel.less +100 -98
- package/es/lowcode/painter/style/pop-confirm.less +17 -17
- package/es/lowcode/painter/style/pop-form.less +19 -19
- package/es/lowcode/painter/style/radio.less +24 -24
- package/es/lowcode/painter/style/ribbon.less +7 -5
- package/es/lowcode/painter/style/rule-input.less +12 -12
- package/es/lowcode/painter/style/split-display.less +18 -18
- package/es/lowcode/painter/style/style-panel.less +37 -37
- package/es/lowcode/painter/style/tabitems.less +90 -90
- package/es/lowcode/painter/svg/code.svg +3 -0
- package/es/lowcode/painter/svg/expect.svg +9 -0
- package/es/lowcode/view/lc-components/Box/index.js +4 -4
- package/es/lowcode/view/lc-components/Box/index.less +14 -14
- package/es/lowcode/view/lc-components/Box/meta.json +40 -40
- package/es/lowcode/view/lc-components/Button/index.js +33 -33
- package/es/lowcode/view/lc-components/Button/meta.json +127 -127
- package/es/lowcode/view/lc-components/Button/style.less +2 -2
- package/es/lowcode/view/lc-components/CardList/index.js +481 -12
- package/es/lowcode/view/lc-components/CardList/meta.json +335 -154
- package/es/lowcode/view/lc-components/Dialog/index.js +13 -13
- package/es/lowcode/view/lc-components/Dialog/index.less +12 -12
- package/es/lowcode/view/lc-components/Dialog/meta.json +204 -204
- package/es/lowcode/view/lc-components/Drawer/index.js +13 -13
- package/es/lowcode/view/lc-components/Drawer/index.less +13 -13
- package/es/lowcode/view/lc-components/Drawer/meta.json +242 -242
- package/es/lowcode/view/lc-components/FieldColor/meta.json +157 -157
- package/es/lowcode/view/lc-components/FieldComplex/meta.json +140 -140
- package/es/lowcode/view/lc-components/FieldDate/meta.json +141 -141
- package/es/lowcode/view/lc-components/FieldDict/meta.json +138 -138
- package/es/lowcode/view/lc-components/FieldEditor/meta.json +138 -138
- package/es/lowcode/view/lc-components/FieldGroup/meta.json +167 -167
- package/es/lowcode/view/lc-components/FieldNumber/meta.json +143 -143
- package/es/lowcode/view/lc-components/FieldRadio/meta.json +115 -115
- package/es/lowcode/view/lc-components/FieldRegion/meta.json +121 -121
- package/es/lowcode/view/lc-components/FieldSelect/meta.json +152 -152
- package/es/lowcode/view/lc-components/FieldString/meta.json +152 -152
- package/es/lowcode/view/lc-components/FieldSwitch/meta.json +125 -125
- package/es/lowcode/view/lc-components/FieldTextarea/meta.json +143 -143
- package/es/lowcode/view/lc-components/FieldUpload/meta.json +165 -165
- package/es/lowcode/view/lc-components/FieldUser/meta.json +176 -176
- package/es/lowcode/view/lc-components/FieldYear/meta.json +129 -129
- package/es/lowcode/view/lc-components/Form/index.js +20 -20
- package/es/lowcode/view/lc-components/Form/meta.json +645 -645
- package/es/lowcode/view/lc-components/GroupTree/FunctionDesign.js +10 -0
- package/es/lowcode/view/lc-components/GroupTree/FunctionLive.js +10 -0
- package/es/lowcode/view/lc-components/GroupTree/FunctionPreview.js +10 -0
- package/es/lowcode/view/lc-components/GroupTree/index.js +212 -0
- package/es/lowcode/view/lc-components/GroupTree/index.less +12 -0
- package/es/lowcode/view/lc-components/GroupTree/meta.json +83 -0
- package/es/lowcode/view/lc-components/Iframe/index.js +57 -7
- package/es/lowcode/view/lc-components/Iframe/meta.json +31 -33
- package/es/lowcode/view/lc-components/ImEx/index.js +25 -25
- package/es/lowcode/view/lc-components/ImEx/index.less +7 -7
- package/es/lowcode/view/lc-components/ImEx/meta.json +134 -134
- package/es/lowcode/view/lc-components/Image/index.js +82 -6
- package/es/lowcode/view/lc-components/Image/index.less +27 -0
- package/es/lowcode/view/lc-components/Image/meta.json +149 -115
- package/es/lowcode/view/lc-components/JSX/RuntimeComp.js +4 -4
- package/es/lowcode/view/lc-components/JSX/meta.json +28 -28
- package/es/lowcode/view/lc-components/Layout/index.js +16 -16
- package/es/lowcode/view/lc-components/Layout/index.less +5 -5
- package/es/lowcode/view/lc-components/Layout/meta.json +107 -107
- package/es/lowcode/view/lc-components/Link/index.js +53 -5
- package/es/lowcode/view/lc-components/Link/index.less +15 -0
- package/es/lowcode/view/lc-components/Link/meta.json +112 -113
- package/es/lowcode/view/lc-components/Page/meta.json +61 -61
- package/es/lowcode/view/lc-components/PageContent/meta.json +9 -9
- package/es/lowcode/view/lc-components/PageFooter/meta.json +9 -9
- package/es/lowcode/view/lc-components/PageHeader/meta.json +9 -9
- package/es/lowcode/view/lc-components/PageLayout/meta.json +59 -59
- package/es/lowcode/view/lc-components/Section/index.less +7 -7
- package/es/lowcode/view/lc-components/Section/meta.json +108 -108
- package/es/lowcode/view/lc-components/Split/meta.json +53 -53
- package/es/lowcode/view/lc-components/Table/index.js +150 -152
- package/es/lowcode/view/lc-components/Table/meta.json +450 -450
- package/es/lowcode/view/lc-components/Tabs/FunctionDesign.js +40 -4
- package/es/lowcode/view/lc-components/Tabs/index.js +24 -24
- package/es/lowcode/view/lc-components/Tabs/meta.json +113 -113
- package/es/lowcode/view/lc-components/Text/meta.json +56 -56
- package/es/lowcode/view/lc-components/Tree/index.js +117 -115
- package/es/lowcode/view/lc-components/Tree/index.less +4 -4
- package/es/lowcode/view/lc-components/Tree/meta.json +357 -357
- package/es/lowcode/view/style/canvas.less +5 -5
- package/es/lowcode/view/style/loading.less +98 -98
- package/es/lowcode/view/style/page.less +7 -7
- package/es/upload/FilesWall/index.js +13 -13
- package/es/upload/FilesWall/index.less +74 -74
- package/es/upload/Form/index.less +7 -7
- package/es/upload/FormItem/index.js +15 -15
- package/es/utils/form.js +21 -21
- package/lib/components/LDActions/index.less +70 -68
- package/lib/components/LdCard/index.js +153 -66
- package/lib/components/LdGrid/index.js +4 -4
- package/lib/components/LdGridForm/index.less +7 -7
- package/lib/components/LdTree/index.js +14 -8
- package/lib/components/LdTree/index.less +42 -40
- package/lib/helper/action.js +6 -6
- package/lib/helper/form.js +14 -14
- package/lib/helper/index.less +7 -7
- package/lib/helper/ldBuilder.js +2 -2
- package/lib/locales/zh-CN.js +10 -4
- package/lib/lowcode/constants/api-url.js +87 -87
- package/lib/lowcode/constants/index.js +1 -1
- package/lib/lowcode/engine/meta/cardlist.props.default.json +27 -7
- package/lib/lowcode/engine/meta/cardlist.props.json +254 -73
- package/lib/lowcode/engine/meta/components-list.json +30 -0
- package/lib/lowcode/engine/meta/grouptree.props.default.json +16 -0
- package/lib/lowcode/engine/meta/grouptree.props.json +83 -0
- package/lib/lowcode/engine/meta/iframe.props.default.json +1 -2
- package/lib/lowcode/engine/meta/iframe.props.json +3 -5
- package/lib/lowcode/engine/meta/image.props.default.json +3 -3
- package/lib/lowcode/engine/meta/image.props.json +51 -17
- package/lib/lowcode/engine/meta/imex.props.json +1 -1
- package/lib/lowcode/engine/meta/js-editor/auto-complete.json +47 -29
- package/lib/lowcode/engine/meta/link.props.default.json +1 -2
- package/lib/lowcode/engine/meta/link.props.json +9 -10
- package/lib/lowcode/engine/meta/tabs.props.default.json +1 -1
- package/lib/lowcode/engine/meta/tabs.props.json +1 -1
- package/lib/lowcode/engine/meta/tree.props.json +2 -2
- package/lib/lowcode/engine/provider/ContextProvider/index.js +50 -46
- package/lib/lowcode/engine/provider/ContextProvider/usePageDataStore.js +83 -3
- package/lib/lowcode/engine/tools/dataProcess.js +76 -76
- package/lib/lowcode/engine/tools/helper.js +22 -0
- package/lib/lowcode/painter/Components.js +8 -3
- package/lib/lowcode/painter/DesignOperator.js +10 -5
- package/lib/lowcode/painter/DesignToolbar.js +78 -47
- package/lib/lowcode/painter/Ribbon.js +14 -1
- package/lib/lowcode/painter/components/ActionBindModal.js +3 -7
- package/lib/lowcode/painter/components/Collapse.js +26 -26
- package/lib/lowcode/painter/components/ColorInput.js +24 -24
- package/lib/lowcode/painter/components/DragDrop/DragDropContext.js +142 -35
- package/lib/lowcode/painter/components/DragDrop/DragDropWrapper.js +27 -4
- package/lib/lowcode/painter/components/DragDrop/Overlay.js +5 -2
- package/lib/lowcode/painter/components/DragDrop/TreeDragDropWrapper.js +7 -4
- package/lib/lowcode/painter/components/ListEditor.js +24 -24
- package/lib/lowcode/painter/components/NumberInput.js +28 -28
- package/lib/lowcode/painter/components/PanelItem.js +24 -24
- package/lib/lowcode/painter/components/PopConfirm.js +8 -8
- package/lib/lowcode/painter/components/PopForm.js +27 -27
- package/lib/lowcode/painter/components/RuleInput.js +30 -30
- package/lib/lowcode/painter/components/SortBox.js +22 -22
- package/lib/lowcode/painter/components/code-editor/BaseEditor.js +34 -33
- package/lib/lowcode/painter/components/code-editor/CssEditor.js +25 -25
- package/lib/lowcode/painter/components/code-editor/FullScreenEditor.js +23 -23
- package/lib/lowcode/painter/components/code-editor/JSEditor.js +20 -20
- package/lib/lowcode/painter/components/code-editor/JsonEditor.js +25 -25
- package/lib/lowcode/painter/components/field-setting/FieldAttrs.js +2 -2
- package/lib/lowcode/painter/expect.js +34 -0
- package/lib/lowcode/painter/panel-section/ActionsEditor/ActionEditor.js +19 -1
- package/lib/lowcode/painter/panel-section/ActionsEditor/index.js +18 -3
- package/lib/lowcode/painter/panel-section/ComplexPop.js +1 -1
- package/lib/lowcode/painter/panel-section/DataSetSelector.js +14 -3
- package/lib/lowcode/painter/panel-section/GroupClassSelector.js +63 -0
- package/lib/lowcode/painter/panel-section/Icon.js +23 -23
- package/lib/lowcode/painter/panel-section/IconSelector.js +16 -16
- package/lib/lowcode/painter/panel-section/LayoutRatio.js +21 -21
- package/lib/lowcode/painter/panel-section/PageVars.js +1 -1
- package/lib/lowcode/painter/panel-section/StylePanel/BackGround.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/Border.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/BorderRadius.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/BorderRadiusSelector.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/BorderSelector.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/Display.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/Font.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/FontEditor.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/GapSelector.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/HighLightPanel.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/HighLigthtSpan.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/HightLightSvg.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/MainPanel.js +3 -2
- package/lib/lowcode/painter/panel-section/StylePanel/Margin.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/Opacity.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/Padding.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/Pointer.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/Shadow.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/Size.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/StyleContext.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/StyleRow.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/WidthHeight.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/index.js +15 -15
- package/lib/lowcode/painter/panel-section/TabItems.js +1 -1
- package/lib/lowcode/painter/panel-section/TableTopFilter.js +3 -3
- package/lib/lowcode/painter/style/action-bind-modal.less +104 -102
- package/lib/lowcode/painter/style/actions-editor.less +15 -15
- package/lib/lowcode/painter/style/border-editor.less +36 -36
- package/lib/lowcode/painter/style/border-radius-selector.less +42 -42
- package/lib/lowcode/painter/style/border-selector.less +39 -39
- package/lib/lowcode/painter/style/button-type.less +5 -5
- package/lib/lowcode/painter/style/collapse.less +28 -28
- package/lib/lowcode/painter/style/color-input.less +19 -19
- package/lib/lowcode/painter/style/components.less +91 -91
- package/lib/lowcode/painter/style/design.less +179 -166
- package/lib/lowcode/painter/style/display.less +17 -17
- package/lib/lowcode/painter/style/dragdrop.less +56 -10
- package/lib/lowcode/painter/style/fields-setting.less +25 -25
- package/lib/lowcode/painter/style/font-editor.less +9 -9
- package/lib/lowcode/painter/style/fullscreen-editor.less +17 -17
- package/lib/lowcode/painter/style/icon-selector.less +22 -22
- package/lib/lowcode/painter/style/icon.less +10 -10
- package/lib/lowcode/painter/style/impexp.less +7 -7
- package/lib/lowcode/painter/style/index.less +6 -6
- package/lib/lowcode/painter/style/layout-ratio.less +51 -51
- package/lib/lowcode/painter/style/list-editor.less +97 -95
- package/lib/lowcode/painter/style/number-input.less +19 -17
- package/lib/lowcode/painter/style/outline.less +30 -28
- package/lib/lowcode/painter/style/page-layout-display.less +27 -27
- package/lib/lowcode/painter/style/page-vars.less +25 -25
- package/lib/lowcode/painter/style/panel-attrs.less +47 -43
- package/lib/lowcode/painter/style/panel-item.less +54 -54
- package/lib/lowcode/painter/style/panel.less +100 -98
- package/lib/lowcode/painter/style/pop-confirm.less +17 -17
- package/lib/lowcode/painter/style/pop-form.less +19 -19
- package/lib/lowcode/painter/style/radio.less +24 -24
- package/lib/lowcode/painter/style/ribbon.less +7 -5
- package/lib/lowcode/painter/style/rule-input.less +12 -12
- package/lib/lowcode/painter/style/split-display.less +18 -18
- package/lib/lowcode/painter/style/style-panel.less +37 -37
- package/lib/lowcode/painter/style/tabitems.less +90 -90
- package/lib/lowcode/painter/svg/code.svg +3 -0
- package/lib/lowcode/painter/svg/expect.svg +9 -0
- package/lib/lowcode/view/lc-components/Box/index.js +4 -4
- package/lib/lowcode/view/lc-components/Box/index.less +14 -14
- package/lib/lowcode/view/lc-components/Box/meta.json +40 -40
- package/lib/lowcode/view/lc-components/Button/index.js +33 -33
- package/lib/lowcode/view/lc-components/Button/meta.json +127 -127
- package/lib/lowcode/view/lc-components/Button/style.less +2 -2
- package/lib/lowcode/view/lc-components/CardList/index.js +480 -11
- package/lib/lowcode/view/lc-components/CardList/meta.json +335 -154
- package/lib/lowcode/view/lc-components/Dialog/index.js +13 -13
- package/lib/lowcode/view/lc-components/Dialog/index.less +12 -12
- package/lib/lowcode/view/lc-components/Dialog/meta.json +204 -204
- package/lib/lowcode/view/lc-components/Drawer/index.js +13 -13
- package/lib/lowcode/view/lc-components/Drawer/index.less +13 -13
- package/lib/lowcode/view/lc-components/Drawer/meta.json +242 -242
- package/lib/lowcode/view/lc-components/FieldColor/meta.json +157 -157
- package/lib/lowcode/view/lc-components/FieldComplex/meta.json +140 -140
- package/lib/lowcode/view/lc-components/FieldDate/meta.json +141 -141
- package/lib/lowcode/view/lc-components/FieldDict/meta.json +138 -138
- package/lib/lowcode/view/lc-components/FieldEditor/meta.json +138 -138
- package/lib/lowcode/view/lc-components/FieldGroup/meta.json +167 -167
- package/lib/lowcode/view/lc-components/FieldNumber/meta.json +143 -143
- package/lib/lowcode/view/lc-components/FieldRadio/meta.json +115 -115
- package/lib/lowcode/view/lc-components/FieldRegion/meta.json +121 -121
- package/lib/lowcode/view/lc-components/FieldSelect/meta.json +152 -152
- package/lib/lowcode/view/lc-components/FieldString/meta.json +152 -152
- package/lib/lowcode/view/lc-components/FieldSwitch/meta.json +125 -125
- package/lib/lowcode/view/lc-components/FieldTextarea/meta.json +143 -143
- package/lib/lowcode/view/lc-components/FieldUpload/meta.json +165 -165
- package/lib/lowcode/view/lc-components/FieldUser/meta.json +176 -176
- package/lib/lowcode/view/lc-components/FieldYear/meta.json +129 -129
- package/lib/lowcode/view/lc-components/Form/index.js +20 -20
- package/lib/lowcode/view/lc-components/Form/meta.json +645 -645
- package/lib/lowcode/view/lc-components/GroupTree/FunctionDesign.js +17 -0
- package/lib/lowcode/view/lc-components/GroupTree/FunctionLive.js +17 -0
- package/lib/lowcode/view/lc-components/GroupTree/FunctionPreview.js +17 -0
- package/lib/lowcode/view/lc-components/GroupTree/index.js +220 -0
- package/lib/lowcode/view/lc-components/GroupTree/index.less +12 -0
- package/lib/lowcode/view/lc-components/GroupTree/meta.json +83 -0
- package/lib/lowcode/view/lc-components/Iframe/index.js +55 -5
- package/lib/lowcode/view/lc-components/Iframe/meta.json +31 -33
- package/lib/lowcode/view/lc-components/ImEx/index.js +25 -25
- package/lib/lowcode/view/lc-components/ImEx/index.less +7 -7
- package/lib/lowcode/view/lc-components/ImEx/meta.json +134 -134
- package/lib/lowcode/view/lc-components/Image/index.js +80 -4
- package/lib/lowcode/view/lc-components/Image/index.less +27 -0
- package/lib/lowcode/view/lc-components/Image/meta.json +149 -115
- package/lib/lowcode/view/lc-components/JSX/RuntimeComp.js +4 -4
- package/lib/lowcode/view/lc-components/JSX/meta.json +28 -28
- package/lib/lowcode/view/lc-components/Layout/index.js +16 -16
- package/lib/lowcode/view/lc-components/Layout/index.less +5 -5
- package/lib/lowcode/view/lc-components/Layout/meta.json +107 -107
- package/lib/lowcode/view/lc-components/Link/index.js +52 -4
- package/lib/lowcode/view/lc-components/Link/index.less +15 -0
- package/lib/lowcode/view/lc-components/Link/meta.json +112 -113
- package/lib/lowcode/view/lc-components/Page/meta.json +61 -61
- package/lib/lowcode/view/lc-components/PageContent/meta.json +9 -9
- package/lib/lowcode/view/lc-components/PageFooter/meta.json +9 -9
- package/lib/lowcode/view/lc-components/PageHeader/meta.json +9 -9
- package/lib/lowcode/view/lc-components/PageLayout/meta.json +59 -59
- package/lib/lowcode/view/lc-components/Section/index.less +7 -7
- package/lib/lowcode/view/lc-components/Section/meta.json +108 -108
- package/lib/lowcode/view/lc-components/Split/meta.json +53 -53
- package/lib/lowcode/view/lc-components/Table/index.js +150 -152
- package/lib/lowcode/view/lc-components/Table/meta.json +450 -450
- package/lib/lowcode/view/lc-components/Tabs/FunctionDesign.js +38 -2
- package/lib/lowcode/view/lc-components/Tabs/index.js +24 -24
- package/lib/lowcode/view/lc-components/Tabs/meta.json +113 -113
- package/lib/lowcode/view/lc-components/Text/meta.json +56 -56
- package/lib/lowcode/view/lc-components/Tree/index.js +116 -114
- package/lib/lowcode/view/lc-components/Tree/index.less +4 -4
- package/lib/lowcode/view/lc-components/Tree/meta.json +357 -357
- package/lib/lowcode/view/style/canvas.less +5 -5
- package/lib/lowcode/view/style/loading.less +98 -98
- package/lib/lowcode/view/style/page.less +7 -7
- package/lib/upload/FilesWall/index.js +13 -13
- package/lib/upload/FilesWall/index.less +74 -74
- package/lib/upload/Form/index.less +7 -7
- package/lib/upload/FormItem/index.js +15 -15
- package/lib/utils/form.js +21 -21
- package/lowcode.js +1 -1
- package/package.json +176 -175
- package/upload.js +1 -1
- package/utils.js +1 -1
- package/es/lowcode/painter/style/treedragdrop.less +0 -19
- package/lib/lowcode/painter/style/treedragdrop.less +0 -19
|
@@ -5,32 +5,32 @@ import { useMemoizedFn, useCreation } from 'ahooks';
|
|
|
5
5
|
import styles from "../style/collapse.less";
|
|
6
6
|
import { Icon, Tooltip } from 'luck-design/antd';
|
|
7
7
|
|
|
8
|
-
/**
|
|
9
|
-
* Collapse 组件是一个可折叠区域的实现,用于显示或隐藏内容。它支持自定义标签、描述以及默认的折叠状态。
|
|
10
|
-
* 该组件还可以通过 `next` 函数来自定义点击操作,而不是简单地切换折叠状态。
|
|
11
|
-
* 提供的工具提示可以显示额外信息,如字段名和描述,以帮助用户更好地理解折叠内容的作用。
|
|
12
|
-
*
|
|
13
|
-
* @component
|
|
14
|
-
* @example
|
|
15
|
-
* <Collapse
|
|
16
|
-
* field="exampleField"
|
|
17
|
-
* label="示例标签"
|
|
18
|
-
* desc="这是一个用于演示的折叠组件"
|
|
19
|
-
* defaultCollapsed={true}
|
|
20
|
-
* next={() => console.log('Custom next function executed')}
|
|
21
|
-
* >
|
|
22
|
-
* <p>这里是可折叠的内容</p>
|
|
23
|
-
* </Collapse>
|
|
24
|
-
*
|
|
25
|
-
* @param {Object} props - 组件的属性。
|
|
26
|
-
* @param {React.ReactNode} children - 折叠区域展开时显示的内容。
|
|
27
|
-
* @param {string} [props.field] - 与折叠内容相关联的字段名。
|
|
28
|
-
* @param {string} props.label - 折叠区域的标签名称。
|
|
29
|
-
* @param {string} [props.desc] - 关于折叠内容的描述信息。
|
|
30
|
-
* @param {boolean} [props.defaultCollapsed=false] - 折叠区域的默认状态。如果为 true,则默认为折叠状态。
|
|
31
|
-
* @param {Function} [props.next] - 点击操作的自定义函数。如果提供,点击时将执行此函数,而不是切换折叠状态。
|
|
32
|
-
*
|
|
33
|
-
* @returns {ReactElement} 返回一个 React 元素,表示一个具有可折叠功能的容器。
|
|
8
|
+
/**
|
|
9
|
+
* Collapse 组件是一个可折叠区域的实现,用于显示或隐藏内容。它支持自定义标签、描述以及默认的折叠状态。
|
|
10
|
+
* 该组件还可以通过 `next` 函数来自定义点击操作,而不是简单地切换折叠状态。
|
|
11
|
+
* 提供的工具提示可以显示额外信息,如字段名和描述,以帮助用户更好地理解折叠内容的作用。
|
|
12
|
+
*
|
|
13
|
+
* @component
|
|
14
|
+
* @example
|
|
15
|
+
* <Collapse
|
|
16
|
+
* field="exampleField"
|
|
17
|
+
* label="示例标签"
|
|
18
|
+
* desc="这是一个用于演示的折叠组件"
|
|
19
|
+
* defaultCollapsed={true}
|
|
20
|
+
* next={() => console.log('Custom next function executed')}
|
|
21
|
+
* >
|
|
22
|
+
* <p>这里是可折叠的内容</p>
|
|
23
|
+
* </Collapse>
|
|
24
|
+
*
|
|
25
|
+
* @param {Object} props - 组件的属性。
|
|
26
|
+
* @param {React.ReactNode} children - 折叠区域展开时显示的内容。
|
|
27
|
+
* @param {string} [props.field] - 与折叠内容相关联的字段名。
|
|
28
|
+
* @param {string} props.label - 折叠区域的标签名称。
|
|
29
|
+
* @param {string} [props.desc] - 关于折叠内容的描述信息。
|
|
30
|
+
* @param {boolean} [props.defaultCollapsed=false] - 折叠区域的默认状态。如果为 true,则默认为折叠状态。
|
|
31
|
+
* @param {Function} [props.next] - 点击操作的自定义函数。如果提供,点击时将执行此函数,而不是切换折叠状态。
|
|
32
|
+
*
|
|
33
|
+
* @returns {ReactElement} 返回一个 React 元素,表示一个具有可折叠功能的容器。
|
|
34
34
|
*/
|
|
35
35
|
export default function (_ref) {
|
|
36
36
|
var children = _ref.children,
|
|
@@ -10,30 +10,30 @@ import { Input } from 'luck-design/antd';
|
|
|
10
10
|
import styles from "../style/color-input.less";
|
|
11
11
|
import { SketchPicker } from 'react-color';
|
|
12
12
|
|
|
13
|
-
/**
|
|
14
|
-
* ColorInput 组件是一个集成颜色选择器的输入框组件,允许用户以 RGBA 或十六进制格式输入颜色值。
|
|
15
|
-
* 组件内部通过 PopConfirm 弹出一个 SketchPicker 颜色选择器,以提供一个直观的颜色选择界面。
|
|
16
|
-
* 用户输入的颜色值在内部转换为适当的格式,并通过 onChange 回调暴露给外部使用。
|
|
17
|
-
* 此组件还支持通过传入的 value 属性初始化颜色值,并响应其后续更改。
|
|
18
|
-
*
|
|
19
|
-
* @component
|
|
20
|
-
* @example
|
|
21
|
-
* const handleColorChange = (newColor) => {
|
|
22
|
-
* console.log('Selected color:', newColor);
|
|
23
|
-
* };
|
|
24
|
-
* <ColorInput
|
|
25
|
-
* value="rgba(255, 0, 0, 0.5)"
|
|
26
|
-
* onChange={handleColorChange}
|
|
27
|
-
* wrapperStyle={{ margin: '20px' }}
|
|
28
|
-
* />
|
|
29
|
-
*
|
|
30
|
-
* @param {Object} props - 组件的属性。
|
|
31
|
-
* @param {string} props.value - 初始化颜色值,支持 RGBA 字符串或十六进制格式。
|
|
32
|
-
* @param {Function} props.onChange - 当颜色值变更时触发的回调函数。传递新的颜色值作为参数。
|
|
33
|
-
* @param {Object} [props.wrapperStyle] - 自定义包装器 div 的样式对象。
|
|
34
|
-
* @param {Object} rest - 传递给 Input 组件的其他属性。
|
|
35
|
-
*
|
|
36
|
-
* @returns {ReactElement} 返回一个 React 元素,表示一个带有颜色选择器的输入框组件。
|
|
13
|
+
/**
|
|
14
|
+
* ColorInput 组件是一个集成颜色选择器的输入框组件,允许用户以 RGBA 或十六进制格式输入颜色值。
|
|
15
|
+
* 组件内部通过 PopConfirm 弹出一个 SketchPicker 颜色选择器,以提供一个直观的颜色选择界面。
|
|
16
|
+
* 用户输入的颜色值在内部转换为适当的格式,并通过 onChange 回调暴露给外部使用。
|
|
17
|
+
* 此组件还支持通过传入的 value 属性初始化颜色值,并响应其后续更改。
|
|
18
|
+
*
|
|
19
|
+
* @component
|
|
20
|
+
* @example
|
|
21
|
+
* const handleColorChange = (newColor) => {
|
|
22
|
+
* console.log('Selected color:', newColor);
|
|
23
|
+
* };
|
|
24
|
+
* <ColorInput
|
|
25
|
+
* value="rgba(255, 0, 0, 0.5)"
|
|
26
|
+
* onChange={handleColorChange}
|
|
27
|
+
* wrapperStyle={{ margin: '20px' }}
|
|
28
|
+
* />
|
|
29
|
+
*
|
|
30
|
+
* @param {Object} props - 组件的属性。
|
|
31
|
+
* @param {string} props.value - 初始化颜色值,支持 RGBA 字符串或十六进制格式。
|
|
32
|
+
* @param {Function} props.onChange - 当颜色值变更时触发的回调函数。传递新的颜色值作为参数。
|
|
33
|
+
* @param {Object} [props.wrapperStyle] - 自定义包装器 div 的样式对象。
|
|
34
|
+
* @param {Object} rest - 传递给 Input 组件的其他属性。
|
|
35
|
+
*
|
|
36
|
+
* @returns {ReactElement} 返回一个 React 元素,表示一个带有颜色选择器的输入框组件。
|
|
37
37
|
*/
|
|
38
38
|
var ColorInput = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
39
39
|
var value = _ref.value,
|
|
@@ -2,12 +2,13 @@ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
|
2
2
|
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
3
3
|
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
4
4
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
5
|
-
import React, { useState } from 'react';
|
|
5
|
+
import React, { useState, useEffect, useCallback } from 'react';
|
|
6
6
|
import { DndContext, DragOverlay, useSensor, MouseSensor, useSensors } from '@dnd-kit/core';
|
|
7
7
|
import Overlay from "./Overlay";
|
|
8
8
|
import { CONTAINER_UNITS } from "../../../constants";
|
|
9
|
-
import { useContext } from "../../../engine/provider/ContextProvider";
|
|
9
|
+
import { useContext, moveNode } from "../../../engine/provider/ContextProvider";
|
|
10
10
|
import { isNil } from 'lodash';
|
|
11
|
+
import { suid } from '@luck-design-biz/base/utils';
|
|
11
12
|
var SIDE_DiSTANCE = 20;
|
|
12
13
|
var SIDE_DiSTANCE_TREENODE = 10;
|
|
13
14
|
export var Action = /*#__PURE__*/_createClass(function Action() {
|
|
@@ -26,15 +27,50 @@ export default function (_ref) {
|
|
|
26
27
|
var _active$component;
|
|
27
28
|
var children = _ref.children;
|
|
28
29
|
var ctx = useContext();
|
|
30
|
+
useEffect(function () {
|
|
31
|
+
var event_drag = ctx.$subscriber(ctx.topics.COMPONENT_DRAG_END).on(function (_ref2) {
|
|
32
|
+
var id = _ref2.id,
|
|
33
|
+
fromId = _ref2.fromId,
|
|
34
|
+
fromComp = _ref2.fromComp,
|
|
35
|
+
action = _ref2.action,
|
|
36
|
+
actionSide = _ref2.actionSide,
|
|
37
|
+
vaild = _ref2.vaild;
|
|
38
|
+
// console.log('onDargEnd', id, fromId, fromComp, action, actionSide);
|
|
39
|
+
if (vaild) {
|
|
40
|
+
switch (action) {
|
|
41
|
+
case 'move':
|
|
42
|
+
{
|
|
43
|
+
moveNode(fromId, id, actionSide);
|
|
44
|
+
}
|
|
45
|
+
break;
|
|
46
|
+
case 'add':
|
|
47
|
+
{
|
|
48
|
+
var compName = fromComp.component.toLowerCase();
|
|
49
|
+
var json = require("../../../engine/meta/".concat(compName, ".props.default.json"));
|
|
50
|
+
moveNode(null, id, actionSide, "".concat(compName, "_").concat(suid()), json);
|
|
51
|
+
}
|
|
52
|
+
break;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}).watch();
|
|
56
|
+
return function () {
|
|
57
|
+
ctx.$unsubscriber(ctx.topics.COMPONENT_DRAG_END, event_drag);
|
|
58
|
+
};
|
|
59
|
+
}, []);
|
|
29
60
|
var _useState = useState(null),
|
|
30
61
|
_useState2 = _slicedToArray(_useState, 2),
|
|
31
62
|
active = _useState2[0],
|
|
32
63
|
setActive = _useState2[1];
|
|
64
|
+
var _useState3 = useState(null),
|
|
65
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
66
|
+
noDrag = _useState4[0],
|
|
67
|
+
setNoDrag = _useState4[1];
|
|
33
68
|
function handleDragStart(event) {
|
|
34
69
|
setActive(event.active.data.current);
|
|
35
70
|
}
|
|
36
71
|
function handleDragEnd(event) {
|
|
37
72
|
setActive(null);
|
|
73
|
+
setNoDrag(null);
|
|
38
74
|
pubEvent(event, ctx.topics.COMPONENT_DRAG_END, ctx);
|
|
39
75
|
}
|
|
40
76
|
function handleDragMove(event) {
|
|
@@ -47,34 +83,65 @@ export default function (_ref) {
|
|
|
47
83
|
}
|
|
48
84
|
});
|
|
49
85
|
var sensors = useSensors(mouseSensor);
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
86
|
+
var pubEvent = useCallback(function (event, eventName, ctx) {
|
|
87
|
+
if (event.active && event.over && event.active.data.current.id !== event.over.data.current.id) {
|
|
88
|
+
var vaild = true;
|
|
89
|
+
var dropperId = event.over.data.current.id;
|
|
90
|
+
var dropNodeData = ctx.$(dropperId).api.getSelfAndParentData();
|
|
91
|
+
var dropNode = dropNodeData === null || dropNodeData === void 0 ? void 0 : dropNodeData.node;
|
|
92
|
+
var dropParentNode = dropNodeData === null || dropNodeData === void 0 ? void 0 : dropNodeData.parent;
|
|
93
|
+
|
|
94
|
+
// console.log('dropperId', dropperId)
|
|
95
|
+
|
|
96
|
+
var actionSide = getAction(event.over.data.current.type, event.over.data.current.component.component, event.active.rect.current.translated, event.over.rect, dropNode, dropParentNode);
|
|
97
|
+
|
|
98
|
+
// console.log('actionSide', actionSide)
|
|
99
|
+
|
|
100
|
+
if (event.active.data.current.action === 'move') {
|
|
101
|
+
var draggerId = event.active.data.current.id;
|
|
102
|
+
// console.log('draggerId', draggerId, event.active.data.current)
|
|
103
|
+
|
|
104
|
+
var dragNodeData = ctx.$(draggerId).api.getSelfAndParentData();
|
|
105
|
+
var dragNode = dragNodeData === null || dragNodeData === void 0 ? void 0 : dragNodeData.node;
|
|
106
|
+
var dragParentNode = dragNodeData === null || dragNodeData === void 0 ? void 0 : dragNodeData.parent;
|
|
107
|
+
|
|
108
|
+
// 如果是拖拽到父容器上则不进行处理
|
|
109
|
+
if (dragParentNode && dragParentNode.props.id === event.over.data.current.id) {
|
|
110
|
+
vaild = false;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
// 父结构不容许拖入子结构
|
|
114
|
+
if (findParent(ctx, dropperId, draggerId)) {
|
|
115
|
+
vaild = false;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
// 如果是build类型的组件,不容许跨节点拖拽
|
|
119
|
+
if (dragNode.props.buildIn == true && (dragNode.props.parentId != dropNode.props.parentId || actionSide == ActionSide.INSIDE)) {
|
|
120
|
+
vaild = false;
|
|
121
|
+
}
|
|
122
|
+
;
|
|
123
|
+
} else if (event.active.data.current.action === 'add') {
|
|
124
|
+
vaild = true;
|
|
125
|
+
}
|
|
126
|
+
if (!actionSide) {
|
|
127
|
+
vaild = false;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
// console.log('vaild', vaild, actionSide)
|
|
131
|
+
|
|
132
|
+
setNoDrag(!vaild);
|
|
133
|
+
|
|
134
|
+
// console.log({
|
|
135
|
+
// eventName,
|
|
136
|
+
// id: event.over.data.current.id,
|
|
137
|
+
// fromId: event.active.data.current.id,
|
|
138
|
+
// fromComp: event.active.data.current.component,
|
|
139
|
+
// action: event.active.data.current.action,
|
|
140
|
+
// actionSide,
|
|
141
|
+
// });
|
|
142
|
+
|
|
77
143
|
ctx.$publisher(eventName, {
|
|
144
|
+
vaild: vaild,
|
|
78
145
|
id: event.over.data.current.id,
|
|
79
146
|
// 拖拽目标组件id
|
|
80
147
|
fromId: event.active.data.current.id,
|
|
@@ -85,18 +152,57 @@ function pubEvent(event, eventName, ctx) {
|
|
|
85
152
|
// 行为 add move delete
|
|
86
153
|
actionSide: actionSide // 目标位置 left inside right
|
|
87
154
|
});
|
|
155
|
+
} else {
|
|
156
|
+
setNoDrag(true);
|
|
157
|
+
ctx.$publisher(eventName, {
|
|
158
|
+
vaild: false
|
|
159
|
+
});
|
|
88
160
|
}
|
|
89
|
-
}
|
|
161
|
+
}, []);
|
|
162
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(DndContext, {
|
|
163
|
+
sensors: sensors,
|
|
164
|
+
onDragStart: handleDragStart,
|
|
165
|
+
onDragEnd: handleDragEnd,
|
|
166
|
+
onDragMove: handleDragMove
|
|
167
|
+
}, children, /*#__PURE__*/React.createElement(DragOverlay, {
|
|
168
|
+
style: {
|
|
169
|
+
zIndex: 21
|
|
170
|
+
},
|
|
171
|
+
dropAnimation: null
|
|
172
|
+
}, active && /*#__PURE__*/React.createElement(Overlay, {
|
|
173
|
+
noDrag: noDrag
|
|
174
|
+
}, active === null || active === void 0 || (_active$component = active.component) === null || _active$component === void 0 ? void 0 : _active$component.name))));
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
// 查找id是否属于parentid的子层级
|
|
178
|
+
function findParent(ctx, id, parentid) {
|
|
179
|
+
// 安全地获取节点数据
|
|
180
|
+
var nodeData = ctx.componentMap.get(id).api.getSelfAndParentData();
|
|
181
|
+
var node = nodeData === null || nodeData === void 0 ? void 0 : nodeData.node; // 确保这里是 'node' 而非 'nodel'
|
|
182
|
+
|
|
183
|
+
// 检查当前节点的parentId是否为目标parentid
|
|
184
|
+
if (node && node.props.parentId === parentid) return true;
|
|
185
|
+
|
|
186
|
+
// 检查是否已经到达页面根节点
|
|
187
|
+
if (!node.props.parentId || node.props.parentId === 'page_root') return false;
|
|
188
|
+
|
|
189
|
+
// 递归调用,检查上一级父节点
|
|
190
|
+
return findParent(ctx, node.props.parentId, parentid);
|
|
90
191
|
}
|
|
91
192
|
function isContainerUnit(node) {
|
|
92
193
|
if (isNil(node)) return false;
|
|
93
194
|
return CONTAINER_UNITS.includes(node.props.component);
|
|
94
195
|
}
|
|
95
|
-
function getAction(type, overComponentName, activeRect, overRect,
|
|
196
|
+
function getAction(type, overComponentName, activeRect, overRect, dropNode, dropParentNode) {
|
|
96
197
|
var action = null;
|
|
97
|
-
var
|
|
198
|
+
var dropNodeParent = dropParentNode;
|
|
199
|
+
var parentIsContainer = isContainerUnit(dropNodeParent);
|
|
200
|
+
var buildIn = dropNode.props.buildIn;
|
|
201
|
+
// console.log('buildIn', buildIn, dropNode, dropNodeParent)
|
|
202
|
+
|
|
98
203
|
if (type == 'comp') {
|
|
99
204
|
if (CONTAINER_UNITS.includes(overComponentName)) {
|
|
205
|
+
// console.log('parentIsContainer', parentIsContainer, parentNode)
|
|
100
206
|
// 如果是最小单元容器
|
|
101
207
|
if (Math.abs(activeRect.left - overRect.left) <= SIDE_DiSTANCE) {
|
|
102
208
|
if (parentIsContainer) action = ActionSide.LEFT;
|
|
@@ -107,20 +213,21 @@ function getAction(type, overComponentName, activeRect, overRect, parentNode) {
|
|
|
107
213
|
}
|
|
108
214
|
} else {
|
|
109
215
|
// 独立组件
|
|
110
|
-
|
|
216
|
+
// console.log('pos:',activeRect.left, overRect.left)
|
|
217
|
+
if (activeRect.left <= overRect.left + overRect.width / 2) {
|
|
111
218
|
if (parentIsContainer) action = ActionSide.LEFT;
|
|
112
|
-
} else if (activeRect.left > overRect.left + overRect.width / 2
|
|
219
|
+
} else if (activeRect.left > overRect.left + overRect.width / 2) {
|
|
113
220
|
if (parentIsContainer) action = ActionSide.RIGHT;
|
|
114
221
|
}
|
|
115
222
|
}
|
|
116
223
|
} else {
|
|
117
|
-
//
|
|
224
|
+
// 大纲树处理
|
|
118
225
|
if (CONTAINER_UNITS.includes(overComponentName)) {
|
|
119
226
|
// 如果是最小单元容器
|
|
120
227
|
if (Math.abs(activeRect.top - overRect.top) <= SIDE_DiSTANCE_TREENODE) {
|
|
121
|
-
if (parentIsContainer) action = ActionSide.LEFT;
|
|
228
|
+
if (parentIsContainer || buildIn) action = ActionSide.LEFT;
|
|
122
229
|
} else if (Math.abs(activeRect.top - overRect.bottom) <= SIDE_DiSTANCE_TREENODE) {
|
|
123
|
-
if (parentIsContainer) action = ActionSide.RIGHT;
|
|
230
|
+
if (parentIsContainer || buildIn) action = ActionSide.RIGHT;
|
|
124
231
|
} else {
|
|
125
232
|
action = ActionSide.INSIDE;
|
|
126
233
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
2
|
import { cloneElement, useEffect } from 'react';
|
|
3
3
|
import { useCreation } from 'ahooks';
|
|
4
|
-
import { useDraggable, useDroppable } from '@dnd-kit/core';
|
|
4
|
+
import { useDraggable, useDroppable, useDndMonitor } from '@dnd-kit/core';
|
|
5
5
|
import { useContext } from "../../../engine/provider/ContextProvider";
|
|
6
|
-
import { Action } from "./DragDropContext";
|
|
6
|
+
import { Action, ActionSide } from "./DragDropContext";
|
|
7
7
|
import { NO_DRAGABLE, NO_DROPABLE } from "../../../constants";
|
|
8
8
|
export default function (_ref) {
|
|
9
9
|
var id = _ref.id,
|
|
@@ -38,13 +38,36 @@ export default function (_ref) {
|
|
|
38
38
|
}, []);
|
|
39
39
|
useEffect(function () {
|
|
40
40
|
var dom = getTargetDom();
|
|
41
|
-
if (dom)
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}
|
|
41
|
+
if (!dom || !itemInfo.component) return;
|
|
42
|
+
if (!NO_DRAGABLE.includes(itemInfo.component)) setDragRef(dom);
|
|
43
|
+
if (!NO_DROPABLE.includes(itemInfo.component)) setDropRef(dom);
|
|
45
44
|
}, []);
|
|
46
45
|
var comp = useCreation(function () {
|
|
47
46
|
return /*#__PURE__*/cloneElement(children, _objectSpread(_objectSpread(_objectSpread({}, children.props), _memoListeners), attributes));
|
|
48
47
|
}, [id, children]);
|
|
48
|
+
useEffect(function () {
|
|
49
|
+
var event_drag = ctx.$subscriber(ctx.topics.COMPONENT_DRAG_OVER).on(function (_ref2) {
|
|
50
|
+
var itemId = _ref2.id,
|
|
51
|
+
actionSide = _ref2.actionSide;
|
|
52
|
+
if (actionSide === ActionSide.INSIDE) {
|
|
53
|
+
ctx.$publisher(ctx.topics.COMPONENT_HOVER, {
|
|
54
|
+
target: itemId
|
|
55
|
+
});
|
|
56
|
+
} else if (actionSide === ActionSide.LEFT || actionSide === ActionSide.RIGHT) {
|
|
57
|
+
ctx.$publisher(ctx.topics.COMPONENT_HOVER, {
|
|
58
|
+
target: itemId,
|
|
59
|
+
side: actionSide
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
}).watch();
|
|
63
|
+
return function () {
|
|
64
|
+
ctx.$unsubscriber(ctx.topics.COMPONENT_DRAG_OVER, event_drag);
|
|
65
|
+
};
|
|
66
|
+
}, []);
|
|
67
|
+
useDndMonitor({
|
|
68
|
+
onDragEnd: function onDragEnd() {
|
|
69
|
+
ctx.$publisher(ctx.topics.COMPONENT_HOVER, null);
|
|
70
|
+
}
|
|
71
|
+
});
|
|
49
72
|
return comp;
|
|
50
73
|
}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
1
2
|
import React from 'react';
|
|
3
|
+
import classNames from 'classnames';
|
|
2
4
|
import styles from "../../style/dragdrop.less";
|
|
3
5
|
export default function (_ref) {
|
|
4
|
-
var children = _ref.children
|
|
6
|
+
var children = _ref.children,
|
|
7
|
+
noDrag = _ref.noDrag;
|
|
5
8
|
return /*#__PURE__*/React.createElement("div", {
|
|
6
|
-
className: styles['dragdrop-overlay']
|
|
9
|
+
className: classNames([styles['dragdrop-overlay'], _defineProperty({}, styles['no-drag'], noDrag)])
|
|
7
10
|
}, children);
|
|
8
11
|
}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
3
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
3
4
|
import React, { useEffect, useState } from 'react';
|
|
5
|
+
import classNames from 'classnames';
|
|
4
6
|
import { useDraggable, useDroppable, useDndMonitor } from '@dnd-kit/core';
|
|
5
7
|
import { Action } from "./DragDropContext";
|
|
6
8
|
import { useContext } from "../../../engine/provider/ContextProvider";
|
|
7
|
-
import styles from "../../style/
|
|
9
|
+
import styles from "../../style/dragdrop.less";
|
|
8
10
|
import { NO_DRAGABLE, NO_DROPABLE } from "../../../constants";
|
|
9
11
|
export default function (_ref) {
|
|
10
12
|
var item = _ref.item,
|
|
@@ -19,8 +21,9 @@ export default function (_ref) {
|
|
|
19
21
|
var event_drag = context.$subscriber(context.topics.COMPONENT_DRAG_OVER).on(function (_ref2) {
|
|
20
22
|
var itemId = _ref2.id,
|
|
21
23
|
fromId = _ref2.fromId,
|
|
22
|
-
actionSide = _ref2.actionSide
|
|
23
|
-
|
|
24
|
+
actionSide = _ref2.actionSide,
|
|
25
|
+
vaild = _ref2.vaild;
|
|
26
|
+
if (vaild && itemId === id) {
|
|
24
27
|
setSide(actionSide);
|
|
25
28
|
} else {
|
|
26
29
|
setSide(null);
|
|
@@ -58,7 +61,7 @@ export default function (_ref) {
|
|
|
58
61
|
}),
|
|
59
62
|
setDropRef = _useDroppable.setNodeRef;
|
|
60
63
|
return /*#__PURE__*/React.createElement("div", _extends({
|
|
61
|
-
className:
|
|
64
|
+
className: classNames([styles['lc-painter-components-treedragdrop'], _defineProperty(_defineProperty({}, styles["".concat(side, "-side")], side), styles['ondrag'], isDragging)]),
|
|
62
65
|
ref: function ref(node) {
|
|
63
66
|
if (!NO_DRAGABLE.includes(item.component)) setDragRef(node);
|
|
64
67
|
if (!NO_DROPABLE.includes(item.component)) setDropRef(node);
|
|
@@ -4,14 +4,14 @@ import { Icon, Button } from 'luck-design/antd';
|
|
|
4
4
|
import { formatMessage } from '@luck-design-biz/base/utils';
|
|
5
5
|
import styles from "../style/list-editor.less";
|
|
6
6
|
|
|
7
|
-
/**
|
|
8
|
-
* ListEditor 是一个用于管理和展示一组可编辑标签项的容器组件。
|
|
9
|
-
* 它提供了一个添加新标签项的操作按钮,并通过 children 属性接收一组 ListEditorItem 组件。
|
|
10
|
-
*
|
|
11
|
-
* @param {Object} props - 组件接收的属性。
|
|
12
|
-
* @param {ReactNode} props.children - ListEditorItem 组件的实例,表示可编辑的标签项。
|
|
13
|
-
* @param {Function} props.handleAdd - 一个回调函数,当用户点击添加按钮时被触发,用于添加新的标签项。
|
|
14
|
-
* @returns {ReactNode} 渲染一个带有操作按钮和标签项的容器。
|
|
7
|
+
/**
|
|
8
|
+
* ListEditor 是一个用于管理和展示一组可编辑标签项的容器组件。
|
|
9
|
+
* 它提供了一个添加新标签项的操作按钮,并通过 children 属性接收一组 ListEditorItem 组件。
|
|
10
|
+
*
|
|
11
|
+
* @param {Object} props - 组件接收的属性。
|
|
12
|
+
* @param {ReactNode} props.children - ListEditorItem 组件的实例,表示可编辑的标签项。
|
|
13
|
+
* @param {Function} props.handleAdd - 一个回调函数,当用户点击添加按钮时被触发,用于添加新的标签项。
|
|
14
|
+
* @returns {ReactNode} 渲染一个带有操作按钮和标签项的容器。
|
|
15
15
|
*/
|
|
16
16
|
export var ListEditor = function ListEditor(_ref) {
|
|
17
17
|
var children = _ref.children,
|
|
@@ -41,22 +41,22 @@ export var ListEditor = function ListEditor(_ref) {
|
|
|
41
41
|
}))));
|
|
42
42
|
};
|
|
43
43
|
|
|
44
|
-
/**
|
|
45
|
-
* ListEditorItem 是一个可编辑的标签项组件,用于在 ListEditor 容器内展示。
|
|
46
|
-
* 它支持拖拽排序,并可以通过左侧和右侧的插槽来自定义内容。
|
|
47
|
-
*
|
|
48
|
-
* @param {Object} props - 组件接收的属性。
|
|
49
|
-
* @param {Object} props.item - 表示标签项数据的对象。
|
|
50
|
-
* @param {ReactNode} props.left - 放置在标签项左侧的内容,通常用于展示标签名称或其他信息。
|
|
51
|
-
* @param {ReactNode} props.right - 放置在标签项右侧的内容,通常用于展示操作按钮如编辑或删除。
|
|
52
|
-
* @param {Function} props.setNodeRef - 用于设置拖拽组件根节点的引用。
|
|
53
|
-
* @param {Function} props.setActivatorNodeRef - 用于设置激活拖拽操作的节点引用。
|
|
54
|
-
* @param {Object} props.style - 应用于标签项的样式对象,通常包含拖拽过程中的动态变化样式。
|
|
55
|
-
* @param {Object} props.attributes - 包含与拖拽相关的HTML属性。
|
|
56
|
-
* @param {Object} props.listeners - 包含处理拖拽事件的监听器。
|
|
57
|
-
* @param {CSSProperties} props.transform - 应用于组件的CSS变换属性,用于实现拖拽效果。
|
|
58
|
-
* @param {string} props.transition - 定义拖拽动画的CSS过渡属性。
|
|
59
|
-
* @returns {ReactNode} 渲染一个可编辑的标签项,支持拖拽排序。
|
|
44
|
+
/**
|
|
45
|
+
* ListEditorItem 是一个可编辑的标签项组件,用于在 ListEditor 容器内展示。
|
|
46
|
+
* 它支持拖拽排序,并可以通过左侧和右侧的插槽来自定义内容。
|
|
47
|
+
*
|
|
48
|
+
* @param {Object} props - 组件接收的属性。
|
|
49
|
+
* @param {Object} props.item - 表示标签项数据的对象。
|
|
50
|
+
* @param {ReactNode} props.left - 放置在标签项左侧的内容,通常用于展示标签名称或其他信息。
|
|
51
|
+
* @param {ReactNode} props.right - 放置在标签项右侧的内容,通常用于展示操作按钮如编辑或删除。
|
|
52
|
+
* @param {Function} props.setNodeRef - 用于设置拖拽组件根节点的引用。
|
|
53
|
+
* @param {Function} props.setActivatorNodeRef - 用于设置激活拖拽操作的节点引用。
|
|
54
|
+
* @param {Object} props.style - 应用于标签项的样式对象,通常包含拖拽过程中的动态变化样式。
|
|
55
|
+
* @param {Object} props.attributes - 包含与拖拽相关的HTML属性。
|
|
56
|
+
* @param {Object} props.listeners - 包含处理拖拽事件的监听器。
|
|
57
|
+
* @param {CSSProperties} props.transform - 应用于组件的CSS变换属性,用于实现拖拽效果。
|
|
58
|
+
* @param {string} props.transition - 定义拖拽动画的CSS过渡属性。
|
|
59
|
+
* @returns {ReactNode} 渲染一个可编辑的标签项,支持拖拽排序。
|
|
60
60
|
*/
|
|
61
61
|
export var ListEditorItem = function ListEditorItem(_ref2) {
|
|
62
62
|
var item = _ref2.item,
|
|
@@ -8,34 +8,34 @@ import styles from "../style/number-input.less";
|
|
|
8
8
|
import { InputNumber, Dropdown, Menu } from 'luck-design/antd';
|
|
9
9
|
import { isNil } from 'lodash';
|
|
10
10
|
|
|
11
|
-
/**
|
|
12
|
-
* NumberInput 组件是一个带单位选择的数字输入框组件,允许用户输入一个数值并从预定义的选项中选择一个单位。
|
|
13
|
-
* 它支持默认值、空值、自动类型转换以及自定义更改处理逻辑。
|
|
14
|
-
* 组件内部通过 Dropdown 组件提供一个单位的下拉选择菜单,并通过 InputNumber 接收数值输入。
|
|
15
|
-
* 该组件也支持将输入值转换为整数或保持为原始格式,并允许通过 options 定制可选单位。
|
|
16
|
-
*
|
|
17
|
-
* @component
|
|
18
|
-
* @example
|
|
19
|
-
* const options = [{ value: 'px', label: '像素' }, { value: '%', label: '百分比' }];
|
|
20
|
-
* <NumberInput
|
|
21
|
-
* value={100}
|
|
22
|
-
* options={options}
|
|
23
|
-
* onChange={(newValue) => console.log('New value:', newValue)}
|
|
24
|
-
* defaultValue={0}
|
|
25
|
-
* allowNull={true}
|
|
26
|
-
* convertInt={false}
|
|
27
|
-
* />
|
|
28
|
-
*
|
|
29
|
-
* @param {Object} props - 组件的属性。
|
|
30
|
-
* @param {number|string} props.value - 初始化输入框的值。
|
|
31
|
-
* @param {Object[]} props.options - 可选单位的数组,每个对象包含 value(单位的值)和 label(显示在下拉菜单中的标签)。
|
|
32
|
-
* @param {Function} props.onChange - 当输入值或单位改变时触发的回调函数。传递新的值作为参数。
|
|
33
|
-
* @param {number|string} [props.defaultValue] - 未指定 value 时的默认值。
|
|
34
|
-
* @param {boolean} [props.allowNull=true] - 是否允许空值。
|
|
35
|
-
* @param {boolean} [props.convertInt=false] - 是否将输入值转换为整数。
|
|
36
|
-
* @param {Object} rest - 传递给 InputNumber 组件的其他属性。
|
|
37
|
-
*
|
|
38
|
-
* @returns {ReactElement} 返回一个 React 元素,表示一个带单位选择的数字输入框组件。
|
|
11
|
+
/**
|
|
12
|
+
* NumberInput 组件是一个带单位选择的数字输入框组件,允许用户输入一个数值并从预定义的选项中选择一个单位。
|
|
13
|
+
* 它支持默认值、空值、自动类型转换以及自定义更改处理逻辑。
|
|
14
|
+
* 组件内部通过 Dropdown 组件提供一个单位的下拉选择菜单,并通过 InputNumber 接收数值输入。
|
|
15
|
+
* 该组件也支持将输入值转换为整数或保持为原始格式,并允许通过 options 定制可选单位。
|
|
16
|
+
*
|
|
17
|
+
* @component
|
|
18
|
+
* @example
|
|
19
|
+
* const options = [{ value: 'px', label: '像素' }, { value: '%', label: '百分比' }];
|
|
20
|
+
* <NumberInput
|
|
21
|
+
* value={100}
|
|
22
|
+
* options={options}
|
|
23
|
+
* onChange={(newValue) => console.log('New value:', newValue)}
|
|
24
|
+
* defaultValue={0}
|
|
25
|
+
* allowNull={true}
|
|
26
|
+
* convertInt={false}
|
|
27
|
+
* />
|
|
28
|
+
*
|
|
29
|
+
* @param {Object} props - 组件的属性。
|
|
30
|
+
* @param {number|string} props.value - 初始化输入框的值。
|
|
31
|
+
* @param {Object[]} props.options - 可选单位的数组,每个对象包含 value(单位的值)和 label(显示在下拉菜单中的标签)。
|
|
32
|
+
* @param {Function} props.onChange - 当输入值或单位改变时触发的回调函数。传递新的值作为参数。
|
|
33
|
+
* @param {number|string} [props.defaultValue] - 未指定 value 时的默认值。
|
|
34
|
+
* @param {boolean} [props.allowNull=true] - 是否允许空值。
|
|
35
|
+
* @param {boolean} [props.convertInt=false] - 是否将输入值转换为整数。
|
|
36
|
+
* @param {Object} rest - 传递给 InputNumber 组件的其他属性。
|
|
37
|
+
*
|
|
38
|
+
* @returns {ReactElement} 返回一个 React 元素,表示一个带单位选择的数字输入框组件。
|
|
39
39
|
*/
|
|
40
40
|
export default function (_ref) {
|
|
41
41
|
var value = _ref.value,
|
|
@@ -7,30 +7,30 @@ import { startsWith } from 'lodash';
|
|
|
7
7
|
import classNames from 'classnames';
|
|
8
8
|
import styles from "../style/panel-item.less";
|
|
9
9
|
|
|
10
|
-
/**
|
|
11
|
-
* `PanelItem` 组件用于展示属性面板中的单个属性项。
|
|
12
|
-
* 它支持展示一个标签(属性名称)及对应的组件(例如输入框、选择器等),并可通过传入的 `addon` 属性添加额外的内容。
|
|
13
|
-
* 此组件支持折叠功能,可以通过 `collapsed` 属性控制初始折叠状态。
|
|
14
|
-
*
|
|
15
|
-
* @component
|
|
16
|
-
* @example
|
|
17
|
-
* ```jsx
|
|
18
|
-
* <PanelItem
|
|
19
|
-
* label="属性名称"
|
|
20
|
-
* collapsed={false}
|
|
21
|
-
* addon={<div>额外内容</div>}
|
|
22
|
-
* >
|
|
23
|
-
* <input type="text" />
|
|
24
|
-
* </PanelItem>
|
|
25
|
-
* ```
|
|
26
|
-
*
|
|
27
|
-
* @param {Object} props 组件接收的参数。
|
|
28
|
-
* @param {string} props.label 显示的属性名称。如果标签以 `#` 开头,则不显示。
|
|
29
|
-
* @param {boolean} [props.collapsed=true] 初始是否折叠。默认为 `true`。
|
|
30
|
-
* @param {React.ReactNode} props.addon 当属性项展开时,可以在下方显示额外内容。
|
|
31
|
-
* @param {React.ReactNode} props.children 对应于属性名称的组件,可以是输入框、下拉菜单等 React 节点。
|
|
32
|
-
*
|
|
33
|
-
* @returns {React.Element} 渲染属性名称、对应的组件以及可选的额外内容。
|
|
10
|
+
/**
|
|
11
|
+
* `PanelItem` 组件用于展示属性面板中的单个属性项。
|
|
12
|
+
* 它支持展示一个标签(属性名称)及对应的组件(例如输入框、选择器等),并可通过传入的 `addon` 属性添加额外的内容。
|
|
13
|
+
* 此组件支持折叠功能,可以通过 `collapsed` 属性控制初始折叠状态。
|
|
14
|
+
*
|
|
15
|
+
* @component
|
|
16
|
+
* @example
|
|
17
|
+
* ```jsx
|
|
18
|
+
* <PanelItem
|
|
19
|
+
* label="属性名称"
|
|
20
|
+
* collapsed={false}
|
|
21
|
+
* addon={<div>额外内容</div>}
|
|
22
|
+
* >
|
|
23
|
+
* <input type="text" />
|
|
24
|
+
* </PanelItem>
|
|
25
|
+
* ```
|
|
26
|
+
*
|
|
27
|
+
* @param {Object} props 组件接收的参数。
|
|
28
|
+
* @param {string} props.label 显示的属性名称。如果标签以 `#` 开头,则不显示。
|
|
29
|
+
* @param {boolean} [props.collapsed=true] 初始是否折叠。默认为 `true`。
|
|
30
|
+
* @param {React.ReactNode} props.addon 当属性项展开时,可以在下方显示额外内容。
|
|
31
|
+
* @param {React.ReactNode} props.children 对应于属性名称的组件,可以是输入框、下拉菜单等 React 节点。
|
|
32
|
+
*
|
|
33
|
+
* @returns {React.Element} 渲染属性名称、对应的组件以及可选的额外内容。
|
|
34
34
|
*/
|
|
35
35
|
export default function (_ref) {
|
|
36
36
|
var field = _ref.field,
|