@luck-design-biz/luckda 0.0.25-10 → 0.0.25-12
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 +68 -68
- package/es/components/LdAutoForm/index.js +24 -2
- package/es/components/LdFormList/index.js +4 -2
- package/es/components/LdGrid/index.js +6 -5
- package/es/components/LdGridForm/index.js +5 -1
- package/es/components/LdGridForm/index.less +7 -7
- package/es/components/LdTree/index.js +27 -5
- package/es/components/LdTree/index.less +40 -40
- package/es/helper/action.js +6 -6
- package/es/helper/form.js +15 -15
- package/es/helper/index.less +7 -7
- package/es/index.js +0 -1
- package/es/lowcode/constants/api-url.js +84 -84
- package/es/lowcode/constants/event-topics.js +1 -0
- package/es/lowcode/engine/factory/panel-item-factory/StringStrategy.js +1 -1
- package/es/lowcode/engine/launcher.js +5 -0
- package/es/lowcode/engine/meta/box.props.default.json +1 -1
- package/es/lowcode/engine/meta/box.props.json +1 -1
- package/es/lowcode/engine/meta/components-list.json +6 -6
- package/es/lowcode/engine/meta/fieldcolor.props.json +9 -3
- package/es/lowcode/engine/meta/fieldcomplex.props.json +7 -1
- package/es/lowcode/engine/meta/fielddatadic.props.default.json +16 -0
- package/es/lowcode/engine/meta/fielddatadic.props.json +73 -0
- package/es/lowcode/engine/meta/fielddate.props.json +7 -1
- package/es/lowcode/engine/meta/fielddict.props.json +7 -1
- package/es/lowcode/engine/meta/fieldeditor.props.json +7 -1
- package/es/lowcode/engine/meta/fieldgroup.props.json +7 -1
- package/es/lowcode/engine/meta/fieldnumber.props.json +8 -2
- package/es/lowcode/engine/meta/fieldradio.props.json +9 -3
- package/es/lowcode/engine/meta/fieldregion.props.json +9 -3
- package/es/lowcode/engine/meta/fieldselect.props.json +9 -3
- package/es/lowcode/engine/meta/fieldstring.props.default.json +0 -4
- package/es/lowcode/engine/meta/fieldstring.props.json +14 -12
- package/es/lowcode/engine/meta/fieldswitch.props.json +8 -2
- package/es/lowcode/engine/meta/fieldtextarea.props.json +11 -5
- package/es/lowcode/engine/meta/fieldupload.props.json +8 -2
- package/es/lowcode/engine/meta/fielduser.props.json +7 -1
- package/es/lowcode/engine/meta/fieldyear.props.json +26 -3
- package/es/lowcode/engine/meta/form.props.json +22 -2
- package/es/lowcode/engine/meta/js-editor/auto-complete.json +17 -17
- package/es/lowcode/engine/meta/page.props.json +6 -6
- package/es/lowcode/engine/provider/ContextProvider/index.js +34 -34
- package/es/lowcode/engine/provider/RemoteSourceProvider.js +30 -8
- package/es/lowcode/engine/tools/dataProcess.js +76 -76
- package/es/lowcode/engine/tools/diff.js +5 -5
- package/es/lowcode/engine/tools/helper.js +60 -5
- package/es/lowcode/engine/tools/usePageDataStore.js +10 -5
- package/es/lowcode/index.js +1 -4
- package/es/lowcode/painter/Components.js +2 -2
- package/es/lowcode/painter/Design.js +4 -4
- package/es/lowcode/painter/DesignOperator.js +1 -1
- package/es/lowcode/painter/DesignToolbar.js +7 -4
- package/es/lowcode/painter/components/ActionBindModal.js +7 -1
- package/es/lowcode/painter/components/Collapse.js +26 -26
- package/es/lowcode/painter/components/ColorInput.js +24 -24
- 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 -31
- package/es/lowcode/painter/components/SortBox.js +22 -22
- package/es/lowcode/painter/components/code-editor/BaseEditor.js +32 -32
- 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 +44 -34
- package/es/lowcode/painter/components/code-editor/JsonEditor.js +25 -25
- package/es/lowcode/painter/panel-section/ActionsEditor/index.js +3 -1
- package/es/lowcode/painter/panel-section/ComponentSelector.js +36 -0
- package/es/lowcode/painter/panel-section/I18nInput.js +2 -1
- 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/SplitDisplay.js +3 -2
- 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 +2 -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/TreeRootEditor.js +10 -2
- package/es/lowcode/painter/style/action-bind-modal.less +102 -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 +158 -152
- package/es/lowcode/painter/style/display.less +17 -17
- package/es/lowcode/painter/style/dragdrop.less +10 -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 +95 -95
- package/es/lowcode/painter/style/number-input.less +17 -17
- package/es/lowcode/painter/style/outline.less +28 -28
- package/es/lowcode/painter/style/page-layout-display.less +27 -27
- package/es/lowcode/painter/style/panel-attrs.less +43 -43
- package/es/lowcode/painter/style/panel-item.less +54 -54
- package/es/lowcode/painter/style/panel.less +98 -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 +5 -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/style/treedragdrop.less +19 -19
- package/es/lowcode/view/Canvas.js +20 -6
- package/es/lowcode/view/Page.js +3 -4
- package/es/lowcode/view/lc-components/Box/FunctionDesign.js +7 -2
- 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/meta.json +153 -153
- package/es/lowcode/view/lc-components/Dialog/index.js +19 -13
- package/es/lowcode/view/lc-components/Dialog/index.less +3 -3
- package/es/lowcode/view/lc-components/Dialog/meta.json +150 -150
- package/es/lowcode/view/lc-components/Drawer/index.js +15 -12
- package/es/lowcode/view/lc-components/Drawer/index.less +9 -9
- package/es/lowcode/view/lc-components/Drawer/meta.json +131 -131
- package/es/lowcode/view/lc-components/FieldColor/meta.json +69 -63
- package/es/lowcode/view/lc-components/FieldComplex/meta.json +45 -39
- package/es/lowcode/view/lc-components/FieldDate/meta.json +51 -45
- package/es/lowcode/view/lc-components/FieldDict/meta.json +50 -44
- package/es/lowcode/view/lc-components/FieldEditor/meta.json +50 -44
- package/es/lowcode/view/lc-components/FieldGroup/meta.json +79 -73
- package/es/lowcode/view/lc-components/FieldNumber/meta.json +54 -48
- package/es/lowcode/view/lc-components/FieldRadio/meta.json +26 -20
- package/es/lowcode/view/lc-components/FieldRegion/meta.json +32 -26
- package/es/lowcode/view/lc-components/FieldSelect/meta.json +64 -58
- package/es/lowcode/view/lc-components/FieldString/meta.json +64 -62
- package/es/lowcode/view/lc-components/FieldSwitch/meta.json +37 -31
- package/es/lowcode/view/lc-components/FieldTextarea/meta.json +55 -49
- package/es/lowcode/view/lc-components/FieldUpload/meta.json +77 -71
- package/es/lowcode/view/lc-components/FieldUser/meta.json +88 -82
- package/es/lowcode/view/lc-components/FieldYear/meta.json +41 -20
- package/es/lowcode/view/lc-components/Form/index.js +118 -25
- package/es/lowcode/view/lc-components/Form/index.less +4 -4
- package/es/lowcode/view/lc-components/Form/meta.json +616 -605
- package/es/lowcode/view/lc-components/Iframe/meta.json +32 -32
- package/es/lowcode/view/lc-components/ImEx/index.js +29 -29
- package/es/lowcode/view/lc-components/ImEx/index.less +7 -7
- package/es/lowcode/view/lc-components/ImEx/meta.json +113 -113
- package/es/lowcode/view/lc-components/Image/meta.json +114 -114
- package/es/{components/LdRuntimeCom/index.js → lowcode/view/lc-components/JSX/RuntimeComp.js} +12 -15
- package/es/lowcode/view/lc-components/JSX/index.js +5 -6
- package/es/lowcode/view/lc-components/JSX/meta.json +28 -28
- package/es/lowcode/view/lc-components/Layout/index.js +19 -17
- 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 +3 -0
- package/es/lowcode/view/lc-components/Link/meta.json +112 -112
- package/es/lowcode/view/lc-components/Page/meta.json +49 -49
- package/es/lowcode/view/lc-components/PageContent/index.js +3 -1
- package/es/lowcode/view/lc-components/PageContent/meta.json +9 -9
- package/es/lowcode/view/lc-components/PageFooter/index.js +3 -0
- package/es/lowcode/view/lc-components/PageFooter/meta.json +9 -9
- package/es/lowcode/view/lc-components/PageHeader/index.js +3 -0
- package/es/lowcode/view/lc-components/PageHeader/meta.json +9 -9
- package/es/lowcode/view/lc-components/PageLayout/index.js +3 -0
- package/es/lowcode/view/lc-components/PageLayout/meta.json +47 -47
- package/es/lowcode/view/lc-components/Section/index.js +6 -3
- package/es/lowcode/view/lc-components/Section/index.less +7 -7
- package/es/lowcode/view/lc-components/Section/meta.json +107 -107
- package/es/lowcode/view/lc-components/Split/index.js +3 -0
- package/es/lowcode/view/lc-components/Split/meta.json +53 -53
- package/es/lowcode/view/lc-components/Table/index.js +160 -167
- package/es/lowcode/view/lc-components/Table/meta.json +405 -405
- package/es/lowcode/view/lc-components/Tabs/index.js +49 -36
- package/es/lowcode/view/lc-components/Tabs/meta.json +113 -113
- package/es/lowcode/view/lc-components/Text/index.js +3 -0
- package/es/lowcode/view/lc-components/Text/meta.json +66 -66
- package/es/lowcode/view/lc-components/Tree/index.js +96 -96
- package/es/lowcode/view/lc-components/Tree/index.less +4 -4
- package/es/lowcode/view/lc-components/Tree/meta.json +363 -363
- package/es/lowcode/view/lc-components/Wrapper.js +1 -0
- package/es/lowcode/view/style/canvas.less +5 -5
- package/es/lowcode/view/style/loading.less +84 -84
- 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/es/utils/grid.js +1 -1
- package/lib/components/LDActions/index.less +68 -68
- package/lib/components/LdAutoForm/index.js +23 -1
- package/lib/components/LdFormList/index.js +4 -2
- package/lib/components/LdGrid/index.js +6 -5
- package/lib/components/LdGridForm/index.js +5 -1
- package/lib/components/LdGridForm/index.less +7 -7
- package/lib/components/LdTree/index.js +25 -3
- package/lib/components/LdTree/index.less +40 -40
- package/lib/helper/action.js +6 -6
- package/lib/helper/form.js +15 -15
- package/lib/helper/index.less +7 -7
- package/lib/index.js +1 -9
- package/lib/lowcode/constants/api-url.js +84 -84
- package/lib/lowcode/constants/event-topics.js +2 -1
- package/lib/lowcode/engine/factory/panel-item-factory/StringStrategy.js +1 -1
- package/lib/lowcode/engine/launcher.js +11 -0
- package/lib/lowcode/engine/meta/box.props.default.json +1 -1
- package/lib/lowcode/engine/meta/box.props.json +1 -1
- package/lib/lowcode/engine/meta/components-list.json +6 -6
- package/lib/lowcode/engine/meta/fieldcolor.props.json +9 -3
- package/lib/lowcode/engine/meta/fieldcomplex.props.json +7 -1
- package/lib/lowcode/engine/meta/fielddatadic.props.default.json +16 -0
- package/lib/lowcode/engine/meta/fielddatadic.props.json +73 -0
- package/lib/lowcode/engine/meta/fielddate.props.json +7 -1
- package/lib/lowcode/engine/meta/fielddict.props.json +7 -1
- package/lib/lowcode/engine/meta/fieldeditor.props.json +7 -1
- package/lib/lowcode/engine/meta/fieldgroup.props.json +7 -1
- package/lib/lowcode/engine/meta/fieldnumber.props.json +8 -2
- package/lib/lowcode/engine/meta/fieldradio.props.json +9 -3
- package/lib/lowcode/engine/meta/fieldregion.props.json +9 -3
- package/lib/lowcode/engine/meta/fieldselect.props.json +9 -3
- package/lib/lowcode/engine/meta/fieldstring.props.default.json +0 -4
- package/lib/lowcode/engine/meta/fieldstring.props.json +14 -12
- package/lib/lowcode/engine/meta/fieldswitch.props.json +8 -2
- package/lib/lowcode/engine/meta/fieldtextarea.props.json +11 -5
- package/lib/lowcode/engine/meta/fieldupload.props.json +8 -2
- package/lib/lowcode/engine/meta/fielduser.props.json +7 -1
- package/lib/lowcode/engine/meta/fieldyear.props.json +26 -3
- package/lib/lowcode/engine/meta/form.props.json +22 -2
- package/lib/lowcode/engine/meta/js-editor/auto-complete.json +17 -17
- package/lib/lowcode/engine/meta/page.props.json +6 -6
- package/lib/lowcode/engine/provider/ContextProvider/index.js +34 -34
- package/lib/lowcode/engine/provider/RemoteSourceProvider.js +30 -8
- package/lib/lowcode/engine/tools/dataProcess.js +76 -76
- package/lib/lowcode/engine/tools/diff.js +5 -5
- package/lib/lowcode/engine/tools/helper.js +61 -4
- package/lib/lowcode/engine/tools/usePageDataStore.js +9 -4
- package/lib/lowcode/index.js +1 -5
- package/lib/lowcode/painter/Components.js +2 -2
- package/lib/lowcode/painter/Design.js +4 -4
- package/lib/lowcode/painter/DesignOperator.js +1 -1
- package/lib/lowcode/painter/DesignToolbar.js +7 -4
- package/lib/lowcode/painter/components/ActionBindModal.js +6 -0
- package/lib/lowcode/painter/components/Collapse.js +26 -26
- package/lib/lowcode/painter/components/ColorInput.js +24 -24
- 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 -31
- package/lib/lowcode/painter/components/SortBox.js +22 -22
- package/lib/lowcode/painter/components/code-editor/BaseEditor.js +32 -32
- 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 +44 -34
- package/lib/lowcode/painter/components/code-editor/JsonEditor.js +25 -25
- package/lib/lowcode/painter/panel-section/ActionsEditor/index.js +3 -1
- package/lib/lowcode/painter/panel-section/ComponentSelector.js +43 -0
- package/lib/lowcode/painter/panel-section/I18nInput.js +2 -1
- 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/SplitDisplay.js +3 -2
- 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 +2 -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/TreeRootEditor.js +10 -2
- package/lib/lowcode/painter/style/action-bind-modal.less +102 -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 +158 -152
- package/lib/lowcode/painter/style/display.less +17 -17
- package/lib/lowcode/painter/style/dragdrop.less +10 -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 +95 -95
- package/lib/lowcode/painter/style/number-input.less +17 -17
- package/lib/lowcode/painter/style/outline.less +28 -28
- package/lib/lowcode/painter/style/page-layout-display.less +27 -27
- package/lib/lowcode/painter/style/panel-attrs.less +43 -43
- package/lib/lowcode/painter/style/panel-item.less +54 -54
- package/lib/lowcode/painter/style/panel.less +98 -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 +5 -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/style/treedragdrop.less +19 -19
- package/lib/lowcode/view/Canvas.js +20 -5
- package/lib/lowcode/view/Page.js +3 -4
- package/lib/lowcode/view/lc-components/Box/FunctionDesign.js +7 -2
- 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/meta.json +153 -153
- package/lib/lowcode/view/lc-components/Dialog/index.js +19 -13
- package/lib/lowcode/view/lc-components/Dialog/index.less +3 -3
- package/lib/lowcode/view/lc-components/Dialog/meta.json +150 -150
- package/lib/lowcode/view/lc-components/Drawer/index.js +15 -12
- package/lib/lowcode/view/lc-components/Drawer/index.less +9 -9
- package/lib/lowcode/view/lc-components/Drawer/meta.json +131 -131
- package/lib/lowcode/view/lc-components/FieldColor/meta.json +69 -63
- package/lib/lowcode/view/lc-components/FieldComplex/meta.json +45 -39
- package/lib/lowcode/view/lc-components/FieldDate/meta.json +51 -45
- package/lib/lowcode/view/lc-components/FieldDict/meta.json +50 -44
- package/lib/lowcode/view/lc-components/FieldEditor/meta.json +50 -44
- package/lib/lowcode/view/lc-components/FieldGroup/meta.json +79 -73
- package/lib/lowcode/view/lc-components/FieldNumber/meta.json +54 -48
- package/lib/lowcode/view/lc-components/FieldRadio/meta.json +26 -20
- package/lib/lowcode/view/lc-components/FieldRegion/meta.json +32 -26
- package/lib/lowcode/view/lc-components/FieldSelect/meta.json +64 -58
- package/lib/lowcode/view/lc-components/FieldString/meta.json +64 -62
- package/lib/lowcode/view/lc-components/FieldSwitch/meta.json +37 -31
- package/lib/lowcode/view/lc-components/FieldTextarea/meta.json +55 -49
- package/lib/lowcode/view/lc-components/FieldUpload/meta.json +77 -71
- package/lib/lowcode/view/lc-components/FieldUser/meta.json +88 -82
- package/lib/lowcode/view/lc-components/FieldYear/meta.json +41 -20
- package/lib/lowcode/view/lc-components/Form/index.js +117 -24
- package/lib/lowcode/view/lc-components/Form/index.less +4 -4
- package/lib/lowcode/view/lc-components/Form/meta.json +616 -605
- package/lib/lowcode/view/lc-components/Iframe/meta.json +32 -32
- package/lib/lowcode/view/lc-components/ImEx/index.js +29 -29
- package/lib/lowcode/view/lc-components/ImEx/index.less +7 -7
- package/lib/lowcode/view/lc-components/ImEx/meta.json +113 -113
- package/lib/lowcode/view/lc-components/Image/meta.json +114 -114
- package/lib/{components/LdRuntimeCom/index.js → lowcode/view/lc-components/JSX/RuntimeComp.js} +13 -16
- package/lib/lowcode/view/lc-components/JSX/index.js +5 -6
- package/lib/lowcode/view/lc-components/JSX/meta.json +28 -28
- package/lib/lowcode/view/lc-components/Layout/index.js +19 -17
- 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 +3 -0
- package/lib/lowcode/view/lc-components/Link/meta.json +112 -112
- package/lib/lowcode/view/lc-components/Page/meta.json +49 -49
- package/lib/lowcode/view/lc-components/PageContent/index.js +2 -0
- package/lib/lowcode/view/lc-components/PageContent/meta.json +9 -9
- package/lib/lowcode/view/lc-components/PageFooter/index.js +3 -0
- package/lib/lowcode/view/lc-components/PageFooter/meta.json +9 -9
- package/lib/lowcode/view/lc-components/PageHeader/index.js +3 -0
- package/lib/lowcode/view/lc-components/PageHeader/meta.json +9 -9
- package/lib/lowcode/view/lc-components/PageLayout/index.js +3 -0
- package/lib/lowcode/view/lc-components/PageLayout/meta.json +47 -47
- package/lib/lowcode/view/lc-components/Section/index.js +6 -3
- package/lib/lowcode/view/lc-components/Section/index.less +7 -7
- package/lib/lowcode/view/lc-components/Section/meta.json +107 -107
- package/lib/lowcode/view/lc-components/Split/index.js +3 -0
- package/lib/lowcode/view/lc-components/Split/meta.json +53 -53
- package/lib/lowcode/view/lc-components/Table/index.js +160 -167
- package/lib/lowcode/view/lc-components/Table/meta.json +405 -405
- package/lib/lowcode/view/lc-components/Tabs/index.js +48 -35
- package/lib/lowcode/view/lc-components/Tabs/meta.json +113 -113
- package/lib/lowcode/view/lc-components/Text/index.js +3 -0
- package/lib/lowcode/view/lc-components/Text/meta.json +66 -66
- package/lib/lowcode/view/lc-components/Tree/index.js +96 -96
- package/lib/lowcode/view/lc-components/Tree/index.less +4 -4
- package/lib/lowcode/view/lc-components/Tree/meta.json +363 -363
- package/lib/lowcode/view/lc-components/Wrapper.js +1 -0
- package/lib/lowcode/view/style/canvas.less +5 -5
- package/lib/lowcode/view/style/loading.less +84 -84
- 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/lib/utils/grid.js +1 -1
- package/lowcode.js +1 -1
- package/package.json +173 -173
- package/upload.js +1 -1
- package/utils.js +1 -1
|
@@ -1,71 +1,77 @@
|
|
|
1
|
-
{
|
|
2
|
-
"component": "FieldUpload",
|
|
3
|
-
"name": "附件上传",
|
|
4
|
-
"group": "field",
|
|
5
|
-
"desc": "附件上传表单项",
|
|
6
|
-
"icon": "icon-fieldstring",
|
|
7
|
-
"groupName": "表单项",
|
|
8
|
-
"order": 1,
|
|
9
|
-
"props": [
|
|
10
|
-
{
|
|
11
|
-
"key": "action",
|
|
12
|
-
"name": "上传地址",
|
|
13
|
-
"type": "string"
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
"key": "listType",
|
|
17
|
-
"name": "展示样式",
|
|
18
|
-
"type": "segmented",
|
|
19
|
-
"options": [
|
|
20
|
-
{
|
|
21
|
-
"label": "文本",
|
|
22
|
-
"value": "text"
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
"label": "图片",
|
|
26
|
-
"value": "picture"
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
"label": "图片卡片",
|
|
30
|
-
"value": "picture-card"
|
|
31
|
-
}
|
|
32
|
-
],
|
|
33
|
-
"default": "text"
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
"key": "num",
|
|
37
|
-
"name": "最大上传数",
|
|
38
|
-
"desc": "上传文件数,超过该值不显示上传按钮,0表示不限数量",
|
|
39
|
-
"type": "number",
|
|
40
|
-
"default": 0
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
"key": "name",
|
|
44
|
-
"name": "发到后台的文件参数名",
|
|
45
|
-
"type": "string",
|
|
46
|
-
"default": "files"
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
"key": "accept",
|
|
50
|
-
"name": "上传的文件类型",
|
|
51
|
-
"type": "string",
|
|
52
|
-
"default": "*"
|
|
53
|
-
}
|
|
54
|
-
],
|
|
55
|
-
"advance": {
|
|
56
|
-
"events": [
|
|
57
|
-
{
|
|
58
|
-
"key": "
|
|
59
|
-
"name": "
|
|
60
|
-
"desc": "
|
|
61
|
-
"func": "function
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
"key": "
|
|
65
|
-
"name": "
|
|
66
|
-
"desc": "
|
|
67
|
-
"func": "function
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
1
|
+
{
|
|
2
|
+
"component": "FieldUpload",
|
|
3
|
+
"name": "附件上传",
|
|
4
|
+
"group": "field",
|
|
5
|
+
"desc": "附件上传表单项",
|
|
6
|
+
"icon": "icon-fieldstring",
|
|
7
|
+
"groupName": "表单项",
|
|
8
|
+
"order": 1,
|
|
9
|
+
"props": [
|
|
10
|
+
{
|
|
11
|
+
"key": "action",
|
|
12
|
+
"name": "上传地址",
|
|
13
|
+
"type": "string"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"key": "listType",
|
|
17
|
+
"name": "展示样式",
|
|
18
|
+
"type": "segmented",
|
|
19
|
+
"options": [
|
|
20
|
+
{
|
|
21
|
+
"label": "文本",
|
|
22
|
+
"value": "text"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"label": "图片",
|
|
26
|
+
"value": "picture"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"label": "图片卡片",
|
|
30
|
+
"value": "picture-card"
|
|
31
|
+
}
|
|
32
|
+
],
|
|
33
|
+
"default": "text"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"key": "num",
|
|
37
|
+
"name": "最大上传数",
|
|
38
|
+
"desc": "上传文件数,超过该值不显示上传按钮,0表示不限数量",
|
|
39
|
+
"type": "number",
|
|
40
|
+
"default": 0
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"key": "name",
|
|
44
|
+
"name": "发到后台的文件参数名",
|
|
45
|
+
"type": "string",
|
|
46
|
+
"default": "files"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"key": "accept",
|
|
50
|
+
"name": "上传的文件类型",
|
|
51
|
+
"type": "string",
|
|
52
|
+
"default": "*"
|
|
53
|
+
}
|
|
54
|
+
],
|
|
55
|
+
"advance": {
|
|
56
|
+
"events": [
|
|
57
|
+
{
|
|
58
|
+
"key": "onValueChange",
|
|
59
|
+
"name": "数据变化事件",
|
|
60
|
+
"desc": "在数据变化事件时,执行方法",
|
|
61
|
+
"func": "function onValueChange(value, field, data, formProps) {\n\t\n}"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"key": "onChange",
|
|
65
|
+
"name": "值变化事件(onChange)",
|
|
66
|
+
"desc": "原生onChange事件,在值发生变化时,执行方法",
|
|
67
|
+
"func": "function onChange(e) {\n\t\n}"
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"key": "beforeUpload",
|
|
71
|
+
"name": "上传之前的回调",
|
|
72
|
+
"desc": "上传文件之前的钩子,参数为上传的文件",
|
|
73
|
+
"func": "function beforeUpload(file,fileList) {\n\t\n}"
|
|
74
|
+
}
|
|
75
|
+
]
|
|
76
|
+
}
|
|
77
|
+
}
|
|
@@ -1,82 +1,88 @@
|
|
|
1
|
-
{
|
|
2
|
-
"component": "FieldUser",
|
|
3
|
-
"name": "用户",
|
|
4
|
-
"group": "field",
|
|
5
|
-
"desc": "用户类型表单项",
|
|
6
|
-
"icon": "icon-fieldstring",
|
|
7
|
-
"groupName": "表单项",
|
|
8
|
-
"order": 1,
|
|
9
|
-
"props": [
|
|
10
|
-
{
|
|
11
|
-
"key": "allowClear",
|
|
12
|
-
"name": "允许清除",
|
|
13
|
-
"type": "switch",
|
|
14
|
-
"default": true
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
"key": "screenable",
|
|
18
|
-
"name": "弹窗选择",
|
|
19
|
-
"type": "switch",
|
|
20
|
-
"default": "true"
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
"key": "mode",
|
|
24
|
-
"name": "更新模式",
|
|
25
|
-
"type": "segmented",
|
|
26
|
-
"options": [
|
|
27
|
-
{
|
|
28
|
-
"label": "覆盖",
|
|
29
|
-
"value": "modify"
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
"label": "追加",
|
|
33
|
-
"value": "except"
|
|
34
|
-
}
|
|
35
|
-
],
|
|
36
|
-
"default": "modify"
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
"key": "extraFilter",
|
|
40
|
-
"name": "登录人过滤",
|
|
41
|
-
"type": "segmented",
|
|
42
|
-
"desc": "按登录人信息过滤",
|
|
43
|
-
"options": [
|
|
44
|
-
{
|
|
45
|
-
"label": "不过滤",
|
|
46
|
-
"value": null
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
"label": "管辖部门",
|
|
50
|
-
"value": "0"
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
"label": "所属部门",
|
|
54
|
-
"value": "1"
|
|
55
|
-
}
|
|
56
|
-
],
|
|
57
|
-
"default": null
|
|
58
|
-
}
|
|
59
|
-
],
|
|
60
|
-
"advance": {
|
|
61
|
-
"events": [
|
|
62
|
-
{
|
|
63
|
-
"key": "
|
|
64
|
-
"name": "数据变化事件",
|
|
65
|
-
"desc": "在数据变化事件时,执行方法",
|
|
66
|
-
"func": "function
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
"key": "
|
|
70
|
-
"name": "
|
|
71
|
-
"desc": "
|
|
72
|
-
"func": "function
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
"key": "
|
|
76
|
-
"name": "
|
|
77
|
-
"desc": "
|
|
78
|
-
"func": "function
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
1
|
+
{
|
|
2
|
+
"component": "FieldUser",
|
|
3
|
+
"name": "用户",
|
|
4
|
+
"group": "field",
|
|
5
|
+
"desc": "用户类型表单项",
|
|
6
|
+
"icon": "icon-fieldstring",
|
|
7
|
+
"groupName": "表单项",
|
|
8
|
+
"order": 1,
|
|
9
|
+
"props": [
|
|
10
|
+
{
|
|
11
|
+
"key": "allowClear",
|
|
12
|
+
"name": "允许清除",
|
|
13
|
+
"type": "switch",
|
|
14
|
+
"default": true
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"key": "screenable",
|
|
18
|
+
"name": "弹窗选择",
|
|
19
|
+
"type": "switch",
|
|
20
|
+
"default": "true"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"key": "mode",
|
|
24
|
+
"name": "更新模式",
|
|
25
|
+
"type": "segmented",
|
|
26
|
+
"options": [
|
|
27
|
+
{
|
|
28
|
+
"label": "覆盖",
|
|
29
|
+
"value": "modify"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"label": "追加",
|
|
33
|
+
"value": "except"
|
|
34
|
+
}
|
|
35
|
+
],
|
|
36
|
+
"default": "modify"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"key": "extraFilter",
|
|
40
|
+
"name": "登录人过滤",
|
|
41
|
+
"type": "segmented",
|
|
42
|
+
"desc": "按登录人信息过滤",
|
|
43
|
+
"options": [
|
|
44
|
+
{
|
|
45
|
+
"label": "不过滤",
|
|
46
|
+
"value": null
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"label": "管辖部门",
|
|
50
|
+
"value": "0"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"label": "所属部门",
|
|
54
|
+
"value": "1"
|
|
55
|
+
}
|
|
56
|
+
],
|
|
57
|
+
"default": null
|
|
58
|
+
}
|
|
59
|
+
],
|
|
60
|
+
"advance": {
|
|
61
|
+
"events": [
|
|
62
|
+
{
|
|
63
|
+
"key": "onValueChange",
|
|
64
|
+
"name": "数据变化事件",
|
|
65
|
+
"desc": "在数据变化事件时,执行方法",
|
|
66
|
+
"func": "function onValueChange(value, field, data, formProps) {\n\t\n}"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"key": "onChange",
|
|
70
|
+
"name": "值变化事件(onChange)",
|
|
71
|
+
"desc": "原生onChange事件,在值发生变化时,执行方法",
|
|
72
|
+
"func": "function onChange(value, extra) {\n\t\n}"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"key": "onSelect",
|
|
76
|
+
"name": "下拉选中事件",
|
|
77
|
+
"desc": "下拉选中时,执行方法",
|
|
78
|
+
"func": "function onSelect(value, option) {\n\t\n}"
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"key": "onBlur",
|
|
82
|
+
"name": "失焦事件",
|
|
83
|
+
"desc": "失去焦点时回调",
|
|
84
|
+
"func": "function onBlur() {\n\t\n}"
|
|
85
|
+
}
|
|
86
|
+
]
|
|
87
|
+
}
|
|
88
|
+
}
|
|
@@ -1,20 +1,41 @@
|
|
|
1
|
-
{
|
|
2
|
-
"component": "FieldYear",
|
|
3
|
-
"name": "年份选择",
|
|
4
|
-
"group": "field",
|
|
5
|
-
"desc": "年份选择表单项",
|
|
6
|
-
"icon": "icon-fieldstring",
|
|
7
|
-
"groupName": "表单项",
|
|
8
|
-
"order": 1,
|
|
9
|
-
"props": [
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
1
|
+
{
|
|
2
|
+
"component": "FieldYear",
|
|
3
|
+
"name": "年份选择",
|
|
4
|
+
"group": "field",
|
|
5
|
+
"desc": "年份选择表单项",
|
|
6
|
+
"icon": "icon-fieldstring",
|
|
7
|
+
"groupName": "表单项",
|
|
8
|
+
"order": 1,
|
|
9
|
+
"props": [
|
|
10
|
+
{
|
|
11
|
+
"key": "allowClear",
|
|
12
|
+
"name": "允许清除",
|
|
13
|
+
"type": "switch"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"key": "disabledDate",
|
|
17
|
+
"name": "不可选日期",
|
|
18
|
+
"type": "_JSEditor",
|
|
19
|
+
"defaultCode": "function disabledDate(currentDate) {return true}",
|
|
20
|
+
"mustConfirm": true,
|
|
21
|
+
"wrapper": "collapse",
|
|
22
|
+
"wrapperProps": { "suppressIcon": true }
|
|
23
|
+
}
|
|
24
|
+
],
|
|
25
|
+
"advance": {
|
|
26
|
+
"events": [
|
|
27
|
+
{
|
|
28
|
+
"key": "onValueChange",
|
|
29
|
+
"name": "数据变化事件",
|
|
30
|
+
"desc": "在数据变化事件时,执行方法",
|
|
31
|
+
"func": "function onValueChange(value, field, data, formProps) {\n\t\n}"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"key": "onChange",
|
|
35
|
+
"name": "值变化事件(onChange)",
|
|
36
|
+
"desc": "原生onChange事件,在值发生变化时,执行方法",
|
|
37
|
+
"func": "function onChange(date, dateString) {\n\t\n}"
|
|
38
|
+
}
|
|
39
|
+
]
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -14,9 +14,9 @@ import { formatMessage, getPageQuery } from '@luck-design-biz/base/utils';
|
|
|
14
14
|
import Wrapper from "../Wrapper";
|
|
15
15
|
import { LdFormList } from "../../../../index";
|
|
16
16
|
import { omitBadProps, executeCode, getLDMetaAttr } from "../../../engine/tools/helper";
|
|
17
|
-
import { useContext, useRemoteSource } from "../../../engine/provider/ContextProvider";
|
|
17
|
+
import { useContext, useRemoteSource, modifyNode } from "../../../engine/provider/ContextProvider";
|
|
18
18
|
import buildUploadForm from "../../../../upload/Form";
|
|
19
|
-
import
|
|
19
|
+
import RuntimeComp from "../JSX/RuntimeComp";
|
|
20
20
|
import defaultMeta from "../../../engine/meta/form.props.default.json";
|
|
21
21
|
import styles from "./index.less";
|
|
22
22
|
var _I18N_PREFIX_ = 'lc.form.validator';
|
|
@@ -66,6 +66,7 @@ var LCForm = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
|
66
66
|
readOnly = _ref2.readOnly,
|
|
67
67
|
showSave = _ref2.showSave,
|
|
68
68
|
saveTitle = _ref2.saveTitle,
|
|
69
|
+
getContainer = _ref2.getContainer,
|
|
69
70
|
settingLayout = _ref2.settingLayout,
|
|
70
71
|
renderFormLeft = _ref2.renderFormLeft,
|
|
71
72
|
renderFormRight = _ref2.renderFormRight,
|
|
@@ -85,15 +86,21 @@ var LCForm = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
|
85
86
|
return i.serial;
|
|
86
87
|
})) || [];
|
|
87
88
|
}, [remoteSource.serials]);
|
|
89
|
+
var _blocks = useCreation(function () {
|
|
90
|
+
return blocks.filter(function (_ref3) {
|
|
91
|
+
var hidden = _ref3.hidden;
|
|
92
|
+
return !hidden;
|
|
93
|
+
});
|
|
94
|
+
}, [blocks]);
|
|
88
95
|
useMount(function () {
|
|
89
96
|
ctx.doAction(advance.events.onMount, {
|
|
90
97
|
instance: (ref || formRef).current
|
|
91
98
|
});
|
|
92
99
|
});
|
|
93
100
|
useEffect(function () {
|
|
94
|
-
var tid = ctx.$subscriber(ctx.topics.PAGE_PUBLIC_RESOURCE_CHANGED).on(function (
|
|
95
|
-
var resource =
|
|
96
|
-
prevResource =
|
|
101
|
+
var tid = ctx.$subscriber(ctx.topics.PAGE_PUBLIC_RESOURCE_CHANGED).on(function (_ref4) {
|
|
102
|
+
var resource = _ref4.resource,
|
|
103
|
+
prevResource = _ref4.prevResource;
|
|
97
104
|
ctx.doAction(advance.events.onPagePublicResourceChanged, {
|
|
98
105
|
resource: resource,
|
|
99
106
|
prevResource: prevResource,
|
|
@@ -109,27 +116,111 @@ var LCForm = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
|
109
116
|
}, []);
|
|
110
117
|
useImperativeHandle(apiRef, function () {
|
|
111
118
|
return {
|
|
112
|
-
/**
|
|
113
|
-
* 获取表格实例
|
|
114
|
-
* @method
|
|
119
|
+
/**
|
|
120
|
+
* 获取表格实例
|
|
121
|
+
* @method
|
|
115
122
|
*/
|
|
116
123
|
getInstance: function getInstance() {
|
|
117
124
|
return (ref || formRef).current;
|
|
118
125
|
},
|
|
119
|
-
/**
|
|
120
|
-
* 提交表格数据
|
|
121
|
-
* @method
|
|
126
|
+
/**
|
|
127
|
+
* 提交表格数据
|
|
128
|
+
* @method
|
|
122
129
|
*/
|
|
123
130
|
submit: function submit() {
|
|
124
131
|
var _ctx$pagePublicResour;
|
|
125
132
|
var instance = (ref || formRef).current;
|
|
126
|
-
var
|
|
127
|
-
formMode =
|
|
133
|
+
var _ref5 = ((_ctx$pagePublicResour = ctx.pagePublicResource) === null || _ctx$pagePublicResour === void 0 ? void 0 : _ctx$pagePublicResour[id]) || initData || _initData || {},
|
|
134
|
+
formMode = _ref5.formMode;
|
|
128
135
|
if (formMode === 'add') {
|
|
129
136
|
instance.onAdd();
|
|
130
137
|
} else if (formMode === 'update') {
|
|
131
138
|
instance.onBatchUpdate();
|
|
132
139
|
}
|
|
140
|
+
},
|
|
141
|
+
/**
|
|
142
|
+
* @typedef {Object} Field
|
|
143
|
+
* @property {Object} target - 字段引用
|
|
144
|
+
* @property {boolean} disabled - 字段不可维护
|
|
145
|
+
* @property {boolean} required - 字段必填
|
|
146
|
+
* @property {any} value - 字段值
|
|
147
|
+
*/
|
|
148
|
+
/**
|
|
149
|
+
* @typedef {Object} Block
|
|
150
|
+
* @property {Object} target - 区块引用
|
|
151
|
+
* @property {function(fieldName): Field} getField - 获取区块下的表单域
|
|
152
|
+
*/
|
|
153
|
+
/**
|
|
154
|
+
* 获取区块
|
|
155
|
+
* @param {*} blockId - 区块ID
|
|
156
|
+
* @returns {Block}
|
|
157
|
+
*/
|
|
158
|
+
getBlock: function getBlock(blockId) {
|
|
159
|
+
var instance = (ref || formRef).current;
|
|
160
|
+
var block = instance.formRefs[blockId];
|
|
161
|
+
if (!block) {
|
|
162
|
+
console.e('未发现区块');
|
|
163
|
+
return {};
|
|
164
|
+
}
|
|
165
|
+
var getField = function getField(fieldName) {
|
|
166
|
+
if (block.current.props.type !== 'auto') {
|
|
167
|
+
console.e('该区块无法获取表单域');
|
|
168
|
+
return {};
|
|
169
|
+
}
|
|
170
|
+
var basicForm = block.current.props.wrappedComponentRef.current;
|
|
171
|
+
var field = basicForm.fieldsRef[fieldName];
|
|
172
|
+
if (!field) {
|
|
173
|
+
console.e("\u672A\u53D1\u73B0".concat(fieldName, "\u5B57\u6BB5"));
|
|
174
|
+
return {};
|
|
175
|
+
}
|
|
176
|
+
return new Proxy({
|
|
177
|
+
target: field
|
|
178
|
+
}, {
|
|
179
|
+
set: function set(_, property, receiver) {
|
|
180
|
+
if (['disabled', 'required'].includes(property)) {
|
|
181
|
+
var bi = blocks.findIndex(function (b) {
|
|
182
|
+
return b.id === blockId;
|
|
183
|
+
});
|
|
184
|
+
var fi = blocks[bi].fields.findIndex(function (f) {
|
|
185
|
+
return f.field === fieldName;
|
|
186
|
+
});
|
|
187
|
+
modifyNode(id, _defineProperty({}, "blocks[".concat(bi, "].fields[").concat(fi, "].config.").concat(property), receiver));
|
|
188
|
+
} else if ('value' === property) {
|
|
189
|
+
block.current.setFieldsValue(_defineProperty({}, fieldName, receiver));
|
|
190
|
+
}
|
|
191
|
+
},
|
|
192
|
+
get: function get(target, property, receiver) {
|
|
193
|
+
if (['disabled', 'required'].includes(property)) {
|
|
194
|
+
return field.props.config[property];
|
|
195
|
+
} else if ('value' === property) {
|
|
196
|
+
block.current.getFieldValue(fieldName);
|
|
197
|
+
}
|
|
198
|
+
return Reflect.get(target, property, receiver);
|
|
199
|
+
}
|
|
200
|
+
});
|
|
201
|
+
};
|
|
202
|
+
return new Proxy({
|
|
203
|
+
target: block.current,
|
|
204
|
+
getField: getField
|
|
205
|
+
}, {
|
|
206
|
+
set: function set(_, property, receiver) {
|
|
207
|
+
if (['hidden', 'readOnly'].includes(property)) {
|
|
208
|
+
var i = blocks.findIndex(function (b) {
|
|
209
|
+
return b.id === blockId;
|
|
210
|
+
});
|
|
211
|
+
modifyNode(id, _defineProperty({}, "blocks[".concat(i, "].").concat(property), receiver));
|
|
212
|
+
}
|
|
213
|
+
},
|
|
214
|
+
get: function get(target, property, receiver) {
|
|
215
|
+
if (['hidden', 'readOnly'].includes(property)) {
|
|
216
|
+
var item = blocks.find(function (b) {
|
|
217
|
+
return b.id === blockId;
|
|
218
|
+
});
|
|
219
|
+
return item === null || item === void 0 ? void 0 : item[property];
|
|
220
|
+
}
|
|
221
|
+
return Reflect.get(target, property, receiver);
|
|
222
|
+
}
|
|
223
|
+
});
|
|
133
224
|
}
|
|
134
225
|
};
|
|
135
226
|
});
|
|
@@ -142,11 +233,12 @@ var LCForm = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
|
142
233
|
};
|
|
143
234
|
return executeCode(ctx, defaultDataSourceFormat, ['defaultValues'], defaultValues);
|
|
144
235
|
});
|
|
145
|
-
var handleDataSourceFormat = useMemoizedFn(function (dataSourceFormat, dataSetKey,
|
|
146
|
-
var values =
|
|
147
|
-
submitData =
|
|
236
|
+
var handleDataSourceFormat = useMemoizedFn(function (dataSourceFormat, dataSetKey, _ref6) {
|
|
237
|
+
var values = _ref6.values,
|
|
238
|
+
submitData = _ref6.submitData,
|
|
239
|
+
behaviorKey = _ref6.behaviorKey;
|
|
148
240
|
if (isNil(dataSourceFormat)) return _defineProperty({}, dataSetKey, submitData);
|
|
149
|
-
return executeCode(ctx, dataSourceFormat, ['dataSetKey', 'values', 'submitData'], dataSetKey, values, submitData);
|
|
241
|
+
return executeCode(ctx, dataSourceFormat, ['dataSetKey', 'values', 'submitData', 'behaviorKey'], dataSetKey, values, submitData, behaviorKey);
|
|
150
242
|
});
|
|
151
243
|
var handleResetActionsColumn = useMemoizedFn(function (actionsColumnReset, data, index, actions, params) {
|
|
152
244
|
return executeCode(ctx, actionsColumnReset, ['data', 'index', 'actions', 'params'], data, index, actions, params);
|
|
@@ -174,7 +266,7 @@ var LCForm = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
|
174
266
|
if (!isNil(onUploadChange)) return executeCode(ctx, onUploadChange, ['event'], e);
|
|
175
267
|
});
|
|
176
268
|
var renderAffix = useMemoizedFn(function (_render) {
|
|
177
|
-
return _render ? /*#__PURE__*/React.createElement(
|
|
269
|
+
return _render ? /*#__PURE__*/React.createElement(RuntimeComp, null, _render) : null;
|
|
178
270
|
});
|
|
179
271
|
var setVerifyRules = function setVerifyRules(_props, verifyListObj) {
|
|
180
272
|
var _verifyListObj$length, _verifyListObj$min, _verifyListObj$max, _verifyListObj$rules;
|
|
@@ -228,7 +320,7 @@ var LCForm = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
|
228
320
|
return props;
|
|
229
321
|
};
|
|
230
322
|
var transEventsInfields = function transEventsInfields(fields) {
|
|
231
|
-
return fields.map(function (setting) {
|
|
323
|
+
return (fields === null || fields === void 0 ? void 0 : fields.map(function (setting) {
|
|
232
324
|
var advance = setting.advance,
|
|
233
325
|
rest = _objectWithoutProperties(setting, _excluded);
|
|
234
326
|
var props = reduce(rest, function (result, value, key) {
|
|
@@ -257,10 +349,10 @@ var LCForm = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
|
257
349
|
}, {})
|
|
258
350
|
});
|
|
259
351
|
return props;
|
|
260
|
-
});
|
|
352
|
+
})) || [];
|
|
261
353
|
};
|
|
262
354
|
var renderFormList = useMemoizedFn(function (formConfig) {
|
|
263
|
-
return reduce(
|
|
355
|
+
return reduce(_blocks, function (result, item) {
|
|
264
356
|
if (includes(['auto', 'grid', 'writer'], item.type) && includes(item.mode, formConfig.formMode)) {
|
|
265
357
|
var _item$dataset;
|
|
266
358
|
var data = {
|
|
@@ -312,7 +404,7 @@ var LCForm = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
|
312
404
|
}, []);
|
|
313
405
|
});
|
|
314
406
|
var renderFormExtra = useMemoizedFn(function (formConfig) {
|
|
315
|
-
return reduce(
|
|
407
|
+
return reduce(_blocks, function (result, item) {
|
|
316
408
|
if (includes(item.mode, formConfig.formMode) && !item.serial || item.serialEffect === 'disable' || includes(serials, item.serial)) {
|
|
317
409
|
if (item.type === 'uploadForm') {
|
|
318
410
|
var dom = /*#__PURE__*/React.createElement(Header, {
|
|
@@ -370,7 +462,7 @@ var LCForm = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
|
370
462
|
});
|
|
371
463
|
var beforeSubmit = useMemoizedFn(function (values, data) {
|
|
372
464
|
return new Promise( /*#__PURE__*/function () {
|
|
373
|
-
var
|
|
465
|
+
var _ref8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(resolve) {
|
|
374
466
|
var _data;
|
|
375
467
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
376
468
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -398,7 +490,7 @@ var LCForm = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
|
398
490
|
}, _callee);
|
|
399
491
|
}));
|
|
400
492
|
return function (_x) {
|
|
401
|
-
return
|
|
493
|
+
return _ref8.apply(this, arguments);
|
|
402
494
|
};
|
|
403
495
|
}());
|
|
404
496
|
});
|
|
@@ -454,7 +546,8 @@ var LCForm = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
|
454
546
|
afterSubmit: advance.events.onSaveCallback ? afterSubmit : null,
|
|
455
547
|
onValueChange: onValueChange,
|
|
456
548
|
onChildChange: onChildChange,
|
|
457
|
-
setVerifyRules: setVerifyRules
|
|
549
|
+
setVerifyRules: setVerifyRules,
|
|
550
|
+
getContainer: isNil(getContainer) ? null : ctx.componentMap.get(getContainer).api.getSelfDom
|
|
458
551
|
})));
|
|
459
552
|
});
|
|
460
553
|
LCForm.defaultProps = omitBadProps(defaultMeta);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
.lc-component-form{
|
|
2
|
-
}
|
|
3
|
-
.lc-component-form.runtime-form {
|
|
4
|
-
|
|
1
|
+
.lc-component-form{
|
|
2
|
+
}
|
|
3
|
+
.lc-component-form.runtime-form {
|
|
4
|
+
|
|
5
5
|
}
|