@luck-design-biz/luckda 0.0.25-2 → 0.0.25-21
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/ComplexItem/index.js +92 -0
- package/es/components/ComplexItem/service.js +21 -0
- package/es/components/LDActions/index.js +8 -10
- package/es/components/LDActions/index.less +68 -65
- package/es/components/LdAutoForm/index.js +57 -12
- package/es/components/LdFormList/index.js +50 -28
- package/es/components/LdGrid/index.js +23 -11
- package/es/components/LdGridForm/index.js +37 -12
- package/es/components/LdGridForm/index.less +7 -7
- package/es/components/LdTree/index.js +59 -19
- package/es/components/LdTree/index.less +40 -40
- package/es/helper/FromItems.js +177 -94
- package/es/helper/action.js +6 -6
- package/es/helper/form.js +69 -28
- package/es/helper/index.less +7 -7
- package/es/helper/props_config.js +17 -0
- package/es/index.js +0 -1
- package/es/locales/zh-CN.js +22 -17
- package/es/lowcode/constants/api-url.js +269 -98
- package/es/lowcode/constants/event-topics.js +3 -0
- package/es/lowcode/constants/index.js +2 -1
- package/es/lowcode/engine/factory/panel-item-factory/RadioStrategy.js +53 -0
- package/es/lowcode/engine/factory/panel-item-factory/SelectStrategy.js +5 -2
- package/es/lowcode/engine/factory/panel-item-factory/StringStrategy.js +2 -2
- package/es/lowcode/engine/factory/panel-item-factory/SwitchStrategy.js +5 -2
- package/es/lowcode/engine/factory/panel-item-factory/index.js +2 -0
- package/es/lowcode/engine/launcher.js +7 -0
- package/es/lowcode/engine/meta/box.props.default.json +1 -1
- package/es/lowcode/engine/meta/box.props.json +4 -4
- package/es/lowcode/engine/meta/button.props.json +3 -3
- package/es/lowcode/engine/meta/cardlist.props.json +13 -3
- package/es/lowcode/engine/meta/components-list.json +116 -8
- package/es/lowcode/engine/meta/dialog.props.default.json +11 -5
- package/es/lowcode/engine/meta/dialog.props.json +79 -42
- package/es/lowcode/engine/meta/drawer.props.json +8 -20
- package/es/lowcode/engine/meta/fieldcolor.props.default.json +16 -0
- package/es/lowcode/engine/meta/fieldcolor.props.json +146 -0
- package/es/lowcode/engine/meta/fieldcomplex.props.default.json +15 -0
- package/es/lowcode/engine/meta/fieldcomplex.props.json +122 -0
- 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.default.json +14 -0
- package/es/lowcode/engine/meta/fielddate.props.json +130 -0
- package/es/lowcode/engine/meta/fielddict.props.default.json +16 -0
- package/es/lowcode/engine/meta/fielddict.props.json +127 -0
- package/es/lowcode/engine/meta/fieldeditor.props.default.json +15 -0
- package/es/lowcode/engine/meta/fieldeditor.props.json +127 -0
- package/es/lowcode/engine/meta/fieldgroup.props.default.json +17 -0
- package/es/lowcode/engine/meta/fieldgroup.props.json +156 -0
- package/es/lowcode/engine/meta/fieldnumber.props.default.json +16 -0
- package/es/lowcode/engine/meta/fieldnumber.props.json +131 -0
- package/es/lowcode/engine/meta/fieldradio.props.default.json +14 -0
- package/es/lowcode/engine/meta/fieldradio.props.json +104 -0
- package/es/lowcode/engine/meta/fieldregion.props.default.json +14 -0
- package/es/lowcode/engine/meta/fieldregion.props.json +110 -0
- package/es/lowcode/engine/meta/fieldselect.props.default.json +16 -0
- package/es/lowcode/engine/meta/fieldselect.props.json +141 -0
- package/es/lowcode/engine/meta/fieldstring.props.default.json +14 -0
- package/es/lowcode/engine/meta/fieldstring.props.json +141 -0
- package/es/lowcode/engine/meta/fieldswitch.props.default.json +14 -0
- package/es/lowcode/engine/meta/fieldswitch.props.json +114 -0
- package/es/lowcode/engine/meta/fieldtextarea.props.default.json +15 -0
- package/es/lowcode/engine/meta/fieldtextarea.props.json +132 -0
- package/es/lowcode/engine/meta/fieldupload.props.default.json +17 -0
- package/es/lowcode/engine/meta/fieldupload.props.json +154 -0
- package/es/lowcode/engine/meta/fielduser.props.default.json +18 -0
- package/es/lowcode/engine/meta/fielduser.props.json +165 -0
- package/es/lowcode/engine/meta/fieldyear.props.default.json +14 -0
- package/es/lowcode/engine/meta/fieldyear.props.json +120 -0
- package/es/lowcode/engine/meta/form.props.default.json +2 -2
- package/es/lowcode/engine/meta/form.props.json +36 -16
- package/es/lowcode/engine/meta/imex.props.default.json +8 -1
- package/es/lowcode/engine/meta/imex.props.json +54 -22
- package/es/lowcode/engine/meta/js-editor/auto-complete.json +106 -14
- package/es/lowcode/engine/meta/layout.props.json +2 -2
- package/es/lowcode/engine/meta/page.props.json +12 -6
- package/es/lowcode/engine/meta/pagelayout.props.default.json +14 -0
- package/es/lowcode/engine/meta/pagelayout.props.json +47 -0
- package/es/lowcode/engine/meta/section.props.json +2 -2
- package/es/lowcode/engine/meta/split.props.default.json +1 -1
- package/es/lowcode/engine/meta/split.props.json +4 -4
- package/es/lowcode/engine/meta/table.props.default.json +2 -1
- package/es/lowcode/engine/meta/table.props.json +27 -14
- package/es/lowcode/engine/meta/tabs.props.json +3 -3
- package/es/lowcode/engine/meta/tree.props.default.json +7 -5
- package/es/lowcode/engine/meta/tree.props.json +112 -55
- package/es/lowcode/engine/provider/ContextProvider/index.js +104 -86
- package/es/lowcode/engine/provider/ContextProvider/usePageState.js +21 -0
- package/es/lowcode/engine/provider/RemoteSourceProvider.js +96 -49
- package/es/lowcode/engine/tools/dataProcess.js +80 -76
- package/es/lowcode/engine/tools/diff.js +60 -0
- package/es/lowcode/engine/tools/helper.js +92 -7
- package/es/lowcode/engine/tools/useCanvasRender.js +3 -2
- package/es/lowcode/engine/tools/useCombinedRefs.js +14 -0
- package/es/lowcode/engine/tools/usePageDataStore.js +350 -0
- package/es/lowcode/engine/tools/usePromiseState.js +12 -23
- package/es/lowcode/engine/tools/useTodo.js +20 -10
- package/es/lowcode/index.js +1 -4
- package/es/lowcode/painter/Components.js +2 -2
- package/es/lowcode/painter/Design.js +8 -5
- package/es/lowcode/painter/DesignOperator.js +111 -85
- package/es/lowcode/painter/DesignToolbar.js +85 -47
- package/es/lowcode/painter/Outline.js +12 -10
- package/es/lowcode/painter/Panel.js +85 -45
- package/es/lowcode/painter/components/ActionBindModal.js +45 -28
- package/es/lowcode/painter/components/AdvancePanel.js +37 -21
- package/es/lowcode/painter/components/AttrsPanel.js +40 -29
- 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 +1 -1
- package/es/lowcode/painter/components/FieldSelector.js +26 -13
- 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/PreviewIframe.js +19 -0
- 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 +35 -34
- 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 +48 -42
- package/es/lowcode/painter/components/code-editor/JsonEditor.js +25 -25
- package/es/lowcode/painter/components/field-setting/CheckFrontRules.js +108 -0
- package/es/lowcode/painter/components/field-setting/CheckRules.js +1 -26
- package/es/lowcode/painter/components/field-setting/FieldRulesModal.js +33 -13
- package/es/lowcode/painter/components/field-setting/SettingUI.js +158 -77
- package/es/lowcode/painter/components/field-setting/index.js +32 -65
- package/es/lowcode/painter/components/field-setting/meta/frontRules.js +53 -0
- package/es/lowcode/painter/panel-section/ActionsEditor/index.js +3 -1
- package/es/lowcode/painter/panel-section/BlocksEditor/index.js +11 -17
- package/es/lowcode/painter/panel-section/ButtonType.js +4 -2
- package/es/lowcode/painter/panel-section/ComponentSelector.js +36 -0
- package/es/lowcode/painter/panel-section/DataSetSelector.js +33 -7
- package/es/lowcode/painter/panel-section/FieldsSetting.js +72 -54
- 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/ImpExp.js +131 -37
- package/es/lowcode/painter/panel-section/ImpExpAlone.js +124 -0
- package/es/lowcode/painter/panel-section/LayoutRatio.js +21 -21
- package/es/lowcode/painter/panel-section/PageLayoutDisplay.js +112 -0
- package/es/lowcode/painter/panel-section/SerialsSelector.js +4 -2
- package/es/lowcode/painter/panel-section/SplitDisplay.js +28 -112
- 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 +4 -4
- 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 +3 -3
- 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 +22 -16
- package/es/lowcode/painter/panel-section/TableTopFilter.js +23 -13
- package/es/lowcode/painter/panel-section/TreeRootEditor.js +12 -4
- 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 +159 -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 +28 -0
- 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 -27
- 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 +34 -8
- package/es/lowcode/view/Page.js +2 -4
- package/es/lowcode/view/lc-components/Box/FunctionDesign.js +8 -2
- package/es/lowcode/view/lc-components/Box/FunctionLive.js +1 -0
- package/es/lowcode/view/lc-components/Box/FunctionPreview.js +1 -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 +35 -39
- 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/FunctionDesign.js +1 -0
- package/es/lowcode/view/lc-components/CardList/FunctionLive.js +1 -0
- package/es/lowcode/view/lc-components/CardList/FunctionPreview.js +1 -0
- package/es/lowcode/view/lc-components/CardList/meta.json +153 -143
- package/es/lowcode/view/lc-components/Dialog/FunctionDesign.js +3 -10
- package/es/lowcode/view/lc-components/Dialog/FunctionLive.js +1 -0
- package/es/lowcode/view/lc-components/Dialog/FunctionPreview.js +1 -0
- package/es/lowcode/view/lc-components/Dialog/index.js +143 -19
- package/es/lowcode/view/lc-components/Dialog/index.less +3 -3
- package/es/lowcode/view/lc-components/Dialog/meta.json +150 -120
- package/es/lowcode/view/lc-components/Drawer/FunctionDesign.js +1 -0
- package/es/lowcode/view/lc-components/Drawer/FunctionLive.js +1 -0
- package/es/lowcode/view/lc-components/Drawer/FunctionPreview.js +1 -0
- 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 -143
- package/es/lowcode/view/lc-components/FieldColor/meta.json +146 -0
- package/es/lowcode/view/lc-components/FieldComplex/meta.json +122 -0
- package/es/lowcode/view/lc-components/FieldDate/meta.json +128 -0
- package/es/lowcode/view/lc-components/FieldDict/meta.json +127 -0
- package/es/lowcode/view/lc-components/FieldEditor/meta.json +127 -0
- package/es/lowcode/view/lc-components/FieldGroup/meta.json +156 -0
- package/es/lowcode/view/lc-components/FieldNumber/meta.json +131 -0
- package/es/lowcode/view/lc-components/FieldRadio/meta.json +104 -0
- package/es/lowcode/view/lc-components/FieldRegion/meta.json +110 -0
- package/es/lowcode/view/lc-components/FieldSelect/meta.json +141 -0
- package/es/lowcode/view/lc-components/FieldString/meta.json +141 -0
- package/es/lowcode/view/lc-components/FieldSwitch/meta.json +114 -0
- package/es/lowcode/view/lc-components/FieldTextarea/meta.json +132 -0
- package/es/lowcode/view/lc-components/FieldUpload/meta.json +154 -0
- package/es/lowcode/view/lc-components/FieldUser/meta.json +165 -0
- package/es/lowcode/view/lc-components/FieldYear/meta.json +118 -0
- package/es/lowcode/view/lc-components/Form/FunctionDesign.js +23 -33
- package/es/lowcode/view/lc-components/Form/FunctionLive.js +1 -0
- package/es/lowcode/view/lc-components/Form/FunctionPreview.js +9 -1
- package/es/lowcode/view/lc-components/Form/index.js +345 -80
- package/es/lowcode/view/lc-components/Form/index.less +4 -4
- package/es/lowcode/view/lc-components/Form/meta.json +610 -599
- package/es/lowcode/view/lc-components/Iframe/FunctionDesign.js +1 -0
- package/es/lowcode/view/lc-components/Iframe/FunctionLive.js +1 -0
- package/es/lowcode/view/lc-components/Iframe/FunctionPreview.js +1 -0
- package/es/lowcode/view/lc-components/Iframe/meta.json +32 -32
- package/es/lowcode/view/lc-components/ImEx/FunctionDesign.js +9 -3
- package/es/lowcode/view/lc-components/ImEx/FunctionLive.js +1 -0
- package/es/lowcode/view/lc-components/ImEx/FunctionPreview.js +1 -0
- package/es/lowcode/view/lc-components/ImEx/index.js +470 -11
- package/es/lowcode/view/lc-components/ImEx/index.less +7 -0
- package/es/lowcode/view/lc-components/ImEx/meta.json +114 -82
- package/es/lowcode/view/lc-components/Image/FunctionDesign.js +1 -0
- package/es/lowcode/view/lc-components/Image/FunctionLive.js +1 -0
- package/es/lowcode/view/lc-components/Image/FunctionPreview.js +1 -0
- package/es/lowcode/view/lc-components/Image/meta.json +114 -114
- package/es/lowcode/view/lc-components/JSX/FunctionDesign.js +1 -0
- package/es/lowcode/view/lc-components/JSX/FunctionLive.js +1 -0
- package/es/lowcode/view/lc-components/JSX/FunctionPreview.js +1 -0
- 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/FunctionDesign.js +12 -19
- package/es/lowcode/view/lc-components/Layout/FunctionPreview.js +1 -0
- 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/FunctionDesign.js +1 -0
- package/es/lowcode/view/lc-components/Link/FunctionLive.js +1 -0
- package/es/lowcode/view/lc-components/Link/FunctionPreview.js +1 -0
- 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 +55 -49
- package/es/lowcode/view/lc-components/PageContent/index.js +11 -10
- package/es/lowcode/view/lc-components/PageContent/meta.json +9 -9
- package/es/lowcode/view/lc-components/PageFooter/index.js +5 -5
- package/es/lowcode/view/lc-components/PageFooter/meta.json +9 -9
- package/es/lowcode/view/lc-components/PageHeader/index.js +8 -6
- package/es/lowcode/view/lc-components/PageHeader/meta.json +9 -9
- package/es/lowcode/view/lc-components/PageLayout/FunctionDesign.js +68 -0
- package/es/lowcode/view/lc-components/PageLayout/FunctionLive.js +10 -0
- package/es/lowcode/view/lc-components/PageLayout/FunctionPreview.js +10 -0
- package/es/lowcode/view/lc-components/PageLayout/index.js +37 -0
- package/es/lowcode/view/lc-components/PageLayout/meta.json +47 -0
- package/es/lowcode/view/lc-components/PageModal/index.js +12 -15
- package/es/lowcode/view/lc-components/Section/FunctionDesign.js +3 -9
- package/es/lowcode/view/lc-components/Section/FunctionLive.js +1 -0
- package/es/lowcode/view/lc-components/Section/FunctionPreview.js +1 -0
- 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/FunctionDesign.js +19 -20
- package/es/lowcode/view/lc-components/Split/FunctionLive.js +1 -0
- package/es/lowcode/view/lc-components/Split/FunctionPreview.js +1 -0
- package/es/lowcode/view/lc-components/Split/index.js +8 -9
- package/es/lowcode/view/lc-components/Split/meta.json +53 -53
- package/es/lowcode/view/lc-components/Table/FunctionLive.js +1 -0
- package/es/lowcode/view/lc-components/Table/FunctionPreview.js +1 -0
- package/es/lowcode/view/lc-components/Table/components/TopFilter.js +78 -57
- package/es/lowcode/view/lc-components/Table/components/TopImex.js +425 -0
- package/es/lowcode/view/lc-components/Table/index.js +426 -202
- package/es/lowcode/view/lc-components/Table/meta.json +451 -399
- package/es/lowcode/view/lc-components/Tabs/FunctionDesign.js +11 -18
- package/es/lowcode/view/lc-components/Tabs/index.js +52 -37
- package/es/lowcode/view/lc-components/Tabs/meta.json +113 -113
- package/es/lowcode/view/lc-components/Text/FunctionDesign.js +1 -0
- package/es/lowcode/view/lc-components/Text/FunctionLive.js +1 -0
- package/es/lowcode/view/lc-components/Text/FunctionPreview.js +1 -0
- 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/FunctionDesign.js +2 -3
- package/es/lowcode/view/lc-components/Tree/FunctionLive.js +1 -0
- package/es/lowcode/view/lc-components/Tree/index.js +173 -119
- package/es/lowcode/view/lc-components/Tree/index.less +4 -4
- package/es/lowcode/view/lc-components/Tree/meta.json +357 -301
- package/es/lowcode/view/lc-components/Wrapper.js +11 -12
- 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/services.js +0 -24
- package/es/upload/FilesWall/file.png +0 -0
- package/es/upload/FilesWall/index.js +422 -0
- package/es/upload/FilesWall/index.less +74 -0
- package/es/upload/Form/gridForm.js +3 -2
- package/es/upload/Form/index.js +2 -1
- package/es/upload/Form/index.less +7 -7
- package/es/upload/FormItem/index.js +20 -21
- package/es/upload/index.js +2 -1
- package/es/utils/action.js +2 -2
- package/es/utils/form.js +37 -24
- package/es/utils/grid.js +10 -7
- package/lib/components/ComplexItem/index.js +100 -0
- package/lib/components/ComplexItem/service.js +28 -0
- package/lib/components/LDActions/index.js +7 -9
- package/lib/components/LDActions/index.less +68 -65
- package/lib/components/LdAutoForm/index.js +56 -11
- package/lib/components/LdFormList/index.js +49 -27
- package/lib/components/LdGrid/index.js +23 -11
- package/lib/components/LdGridForm/index.js +35 -10
- package/lib/components/LdGridForm/index.less +7 -7
- package/lib/components/LdTree/index.js +57 -17
- package/lib/components/LdTree/index.less +40 -40
- package/lib/helper/FromItems.js +175 -92
- package/lib/helper/action.js +6 -6
- package/lib/helper/form.js +67 -27
- package/lib/helper/index.less +7 -7
- package/lib/helper/props_config.js +23 -0
- package/lib/index.js +1 -9
- package/lib/locales/zh-CN.js +22 -17
- package/lib/lowcode/constants/api-url.js +270 -97
- package/lib/lowcode/constants/event-topics.js +4 -1
- package/lib/lowcode/constants/index.js +3 -2
- package/lib/lowcode/engine/factory/panel-item-factory/RadioStrategy.js +59 -0
- package/lib/lowcode/engine/factory/panel-item-factory/SelectStrategy.js +7 -4
- package/lib/lowcode/engine/factory/panel-item-factory/StringStrategy.js +4 -3
- package/lib/lowcode/engine/factory/panel-item-factory/SwitchStrategy.js +6 -3
- package/lib/lowcode/engine/factory/panel-item-factory/index.js +2 -0
- package/lib/lowcode/engine/launcher.js +13 -0
- package/lib/lowcode/engine/meta/box.props.default.json +1 -1
- package/lib/lowcode/engine/meta/box.props.json +4 -4
- package/lib/lowcode/engine/meta/button.props.json +3 -3
- package/lib/lowcode/engine/meta/cardlist.props.json +13 -3
- package/lib/lowcode/engine/meta/components-list.json +116 -8
- package/lib/lowcode/engine/meta/dialog.props.default.json +11 -5
- package/lib/lowcode/engine/meta/dialog.props.json +79 -42
- package/lib/lowcode/engine/meta/drawer.props.json +8 -20
- package/lib/lowcode/engine/meta/fieldcolor.props.default.json +16 -0
- package/lib/lowcode/engine/meta/fieldcolor.props.json +146 -0
- package/lib/lowcode/engine/meta/fieldcomplex.props.default.json +15 -0
- package/lib/lowcode/engine/meta/fieldcomplex.props.json +122 -0
- 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.default.json +14 -0
- package/lib/lowcode/engine/meta/fielddate.props.json +130 -0
- package/lib/lowcode/engine/meta/fielddict.props.default.json +16 -0
- package/lib/lowcode/engine/meta/fielddict.props.json +127 -0
- package/lib/lowcode/engine/meta/fieldeditor.props.default.json +15 -0
- package/lib/lowcode/engine/meta/fieldeditor.props.json +127 -0
- package/lib/lowcode/engine/meta/fieldgroup.props.default.json +17 -0
- package/lib/lowcode/engine/meta/fieldgroup.props.json +156 -0
- package/lib/lowcode/engine/meta/fieldnumber.props.default.json +16 -0
- package/lib/lowcode/engine/meta/fieldnumber.props.json +131 -0
- package/lib/lowcode/engine/meta/fieldradio.props.default.json +14 -0
- package/lib/lowcode/engine/meta/fieldradio.props.json +104 -0
- package/lib/lowcode/engine/meta/fieldregion.props.default.json +14 -0
- package/lib/lowcode/engine/meta/fieldregion.props.json +110 -0
- package/lib/lowcode/engine/meta/fieldselect.props.default.json +16 -0
- package/lib/lowcode/engine/meta/fieldselect.props.json +141 -0
- package/lib/lowcode/engine/meta/fieldstring.props.default.json +14 -0
- package/lib/lowcode/engine/meta/fieldstring.props.json +141 -0
- package/lib/lowcode/engine/meta/fieldswitch.props.default.json +14 -0
- package/lib/lowcode/engine/meta/fieldswitch.props.json +114 -0
- package/lib/lowcode/engine/meta/fieldtextarea.props.default.json +15 -0
- package/lib/lowcode/engine/meta/fieldtextarea.props.json +132 -0
- package/lib/lowcode/engine/meta/fieldupload.props.default.json +17 -0
- package/lib/lowcode/engine/meta/fieldupload.props.json +154 -0
- package/lib/lowcode/engine/meta/fielduser.props.default.json +18 -0
- package/lib/lowcode/engine/meta/fielduser.props.json +165 -0
- package/lib/lowcode/engine/meta/fieldyear.props.default.json +14 -0
- package/lib/lowcode/engine/meta/fieldyear.props.json +120 -0
- package/lib/lowcode/engine/meta/form.props.default.json +2 -2
- package/lib/lowcode/engine/meta/form.props.json +36 -16
- package/lib/lowcode/engine/meta/imex.props.default.json +8 -1
- package/lib/lowcode/engine/meta/imex.props.json +54 -22
- package/lib/lowcode/engine/meta/js-editor/auto-complete.json +106 -14
- package/lib/lowcode/engine/meta/layout.props.json +2 -2
- package/lib/lowcode/engine/meta/page.props.json +12 -6
- package/lib/lowcode/engine/meta/pagelayout.props.default.json +14 -0
- package/lib/lowcode/engine/meta/pagelayout.props.json +47 -0
- package/lib/lowcode/engine/meta/section.props.json +2 -2
- package/lib/lowcode/engine/meta/split.props.default.json +1 -1
- package/lib/lowcode/engine/meta/split.props.json +4 -4
- package/lib/lowcode/engine/meta/table.props.default.json +2 -1
- package/lib/lowcode/engine/meta/table.props.json +27 -14
- package/lib/lowcode/engine/meta/tabs.props.json +3 -3
- package/lib/lowcode/engine/meta/tree.props.default.json +7 -5
- package/lib/lowcode/engine/meta/tree.props.json +112 -55
- package/lib/lowcode/engine/provider/ContextProvider/index.js +120 -86
- package/lib/lowcode/engine/provider/ContextProvider/usePageState.js +28 -0
- package/lib/lowcode/engine/provider/RemoteSourceProvider.js +93 -46
- package/lib/lowcode/engine/tools/dataProcess.js +80 -76
- package/lib/lowcode/engine/tools/diff.js +67 -0
- package/lib/lowcode/engine/tools/helper.js +96 -6
- package/lib/lowcode/engine/tools/useCanvasRender.js +3 -2
- package/lib/lowcode/engine/tools/useCombinedRefs.js +20 -0
- package/lib/lowcode/engine/tools/usePageDataStore.js +357 -0
- package/lib/lowcode/engine/tools/usePromiseState.js +11 -21
- package/lib/lowcode/engine/tools/useTodo.js +19 -9
- package/lib/lowcode/index.js +1 -5
- package/lib/lowcode/painter/Components.js +2 -2
- package/lib/lowcode/painter/Design.js +7 -4
- package/lib/lowcode/painter/DesignOperator.js +108 -82
- package/lib/lowcode/painter/DesignToolbar.js +83 -45
- package/lib/lowcode/painter/Outline.js +10 -8
- package/lib/lowcode/painter/Panel.js +83 -43
- package/lib/lowcode/painter/components/ActionBindModal.js +42 -25
- package/lib/lowcode/painter/components/AdvancePanel.js +36 -20
- package/lib/lowcode/painter/components/AttrsPanel.js +39 -28
- 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 +1 -1
- package/lib/lowcode/painter/components/FieldSelector.js +26 -13
- 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/PreviewIframe.js +26 -0
- 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 +35 -34
- 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 +48 -42
- package/lib/lowcode/painter/components/code-editor/JsonEditor.js +25 -25
- package/lib/lowcode/painter/components/field-setting/CheckFrontRules.js +116 -0
- package/lib/lowcode/painter/components/field-setting/CheckRules.js +1 -26
- package/lib/lowcode/painter/components/field-setting/FieldRulesModal.js +34 -13
- package/lib/lowcode/painter/components/field-setting/SettingUI.js +155 -74
- package/lib/lowcode/painter/components/field-setting/index.js +32 -65
- package/lib/lowcode/painter/components/field-setting/meta/frontRules.js +59 -0
- package/lib/lowcode/painter/panel-section/ActionsEditor/index.js +3 -1
- package/lib/lowcode/painter/panel-section/BlocksEditor/index.js +10 -16
- package/lib/lowcode/painter/panel-section/ButtonType.js +4 -2
- package/lib/lowcode/painter/panel-section/ComponentSelector.js +43 -0
- package/lib/lowcode/painter/panel-section/DataSetSelector.js +33 -7
- package/lib/lowcode/painter/panel-section/FieldsSetting.js +69 -51
- 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/ImpExp.js +131 -36
- package/lib/lowcode/painter/panel-section/ImpExpAlone.js +130 -0
- package/lib/lowcode/painter/panel-section/LayoutRatio.js +21 -21
- package/lib/lowcode/painter/panel-section/PageLayoutDisplay.js +120 -0
- package/lib/lowcode/painter/panel-section/SerialsSelector.js +4 -2
- package/lib/lowcode/painter/panel-section/SplitDisplay.js +27 -111
- 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 +4 -4
- 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 +7 -6
- 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 +22 -16
- package/lib/lowcode/painter/panel-section/TableTopFilter.js +22 -12
- package/lib/lowcode/painter/panel-section/TreeRootEditor.js +12 -4
- 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 +159 -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 +28 -0
- 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 -27
- 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 +34 -7
- package/lib/lowcode/view/Page.js +2 -4
- package/lib/lowcode/view/lc-components/Box/FunctionDesign.js +8 -2
- package/lib/lowcode/view/lc-components/Box/FunctionLive.js +2 -1
- package/lib/lowcode/view/lc-components/Box/FunctionPreview.js +2 -1
- 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 +35 -39
- 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/FunctionDesign.js +2 -1
- package/lib/lowcode/view/lc-components/CardList/FunctionLive.js +2 -1
- package/lib/lowcode/view/lc-components/CardList/FunctionPreview.js +2 -1
- package/lib/lowcode/view/lc-components/CardList/meta.json +153 -143
- package/lib/lowcode/view/lc-components/Dialog/FunctionDesign.js +2 -9
- package/lib/lowcode/view/lc-components/Dialog/FunctionLive.js +2 -1
- package/lib/lowcode/view/lc-components/Dialog/FunctionPreview.js +2 -1
- package/lib/lowcode/view/lc-components/Dialog/index.js +143 -19
- package/lib/lowcode/view/lc-components/Dialog/index.less +3 -3
- package/lib/lowcode/view/lc-components/Dialog/meta.json +150 -120
- package/lib/lowcode/view/lc-components/Drawer/FunctionDesign.js +2 -1
- package/lib/lowcode/view/lc-components/Drawer/FunctionLive.js +2 -1
- package/lib/lowcode/view/lc-components/Drawer/FunctionPreview.js +2 -1
- 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 -143
- package/lib/lowcode/view/lc-components/FieldColor/meta.json +146 -0
- package/lib/lowcode/view/lc-components/FieldComplex/meta.json +122 -0
- package/lib/lowcode/view/lc-components/FieldDate/meta.json +128 -0
- package/lib/lowcode/view/lc-components/FieldDict/meta.json +127 -0
- package/lib/lowcode/view/lc-components/FieldEditor/meta.json +127 -0
- package/lib/lowcode/view/lc-components/FieldGroup/meta.json +156 -0
- package/lib/lowcode/view/lc-components/FieldNumber/meta.json +131 -0
- package/lib/lowcode/view/lc-components/FieldRadio/meta.json +104 -0
- package/lib/lowcode/view/lc-components/FieldRegion/meta.json +110 -0
- package/lib/lowcode/view/lc-components/FieldSelect/meta.json +141 -0
- package/lib/lowcode/view/lc-components/FieldString/meta.json +141 -0
- package/lib/lowcode/view/lc-components/FieldSwitch/meta.json +114 -0
- package/lib/lowcode/view/lc-components/FieldTextarea/meta.json +132 -0
- package/lib/lowcode/view/lc-components/FieldUpload/meta.json +154 -0
- package/lib/lowcode/view/lc-components/FieldUser/meta.json +165 -0
- package/lib/lowcode/view/lc-components/FieldYear/meta.json +118 -0
- package/lib/lowcode/view/lc-components/Form/FunctionDesign.js +20 -31
- package/lib/lowcode/view/lc-components/Form/FunctionLive.js +2 -1
- package/lib/lowcode/view/lc-components/Form/FunctionPreview.js +9 -1
- package/lib/lowcode/view/lc-components/Form/index.js +341 -76
- package/lib/lowcode/view/lc-components/Form/index.less +4 -4
- package/lib/lowcode/view/lc-components/Form/meta.json +610 -599
- package/lib/lowcode/view/lc-components/Iframe/FunctionDesign.js +2 -1
- package/lib/lowcode/view/lc-components/Iframe/FunctionLive.js +2 -1
- package/lib/lowcode/view/lc-components/Iframe/FunctionPreview.js +2 -1
- package/lib/lowcode/view/lc-components/Iframe/meta.json +32 -32
- package/lib/lowcode/view/lc-components/ImEx/FunctionDesign.js +9 -3
- package/lib/lowcode/view/lc-components/ImEx/FunctionLive.js +2 -1
- package/lib/lowcode/view/lc-components/ImEx/FunctionPreview.js +2 -1
- package/lib/lowcode/view/lc-components/ImEx/index.js +468 -9
- package/lib/lowcode/view/lc-components/ImEx/index.less +7 -0
- package/lib/lowcode/view/lc-components/ImEx/meta.json +114 -82
- package/lib/lowcode/view/lc-components/Image/FunctionDesign.js +2 -1
- package/lib/lowcode/view/lc-components/Image/FunctionLive.js +2 -1
- package/lib/lowcode/view/lc-components/Image/FunctionPreview.js +2 -1
- package/lib/lowcode/view/lc-components/Image/meta.json +114 -114
- package/lib/lowcode/view/lc-components/JSX/FunctionDesign.js +2 -1
- package/lib/lowcode/view/lc-components/JSX/FunctionLive.js +2 -1
- package/lib/lowcode/view/lc-components/JSX/FunctionPreview.js +2 -1
- 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/FunctionDesign.js +11 -18
- package/lib/lowcode/view/lc-components/Layout/FunctionPreview.js +2 -1
- 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/FunctionDesign.js +2 -1
- package/lib/lowcode/view/lc-components/Link/FunctionLive.js +2 -1
- package/lib/lowcode/view/lc-components/Link/FunctionPreview.js +2 -1
- 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 +55 -49
- package/lib/lowcode/view/lc-components/PageContent/index.js +9 -8
- package/lib/lowcode/view/lc-components/PageContent/meta.json +9 -9
- package/lib/lowcode/view/lc-components/PageFooter/index.js +5 -5
- package/lib/lowcode/view/lc-components/PageFooter/meta.json +9 -9
- package/lib/lowcode/view/lc-components/PageHeader/index.js +7 -5
- package/lib/lowcode/view/lc-components/PageHeader/meta.json +9 -9
- package/lib/lowcode/view/lc-components/PageLayout/FunctionDesign.js +76 -0
- package/lib/lowcode/view/lc-components/PageLayout/FunctionLive.js +17 -0
- package/lib/lowcode/view/lc-components/PageLayout/FunctionPreview.js +17 -0
- package/lib/lowcode/view/lc-components/PageLayout/index.js +45 -0
- package/lib/lowcode/view/lc-components/PageLayout/meta.json +47 -0
- package/lib/lowcode/view/lc-components/PageModal/index.js +11 -14
- package/lib/lowcode/view/lc-components/Section/FunctionDesign.js +2 -8
- package/lib/lowcode/view/lc-components/Section/FunctionLive.js +2 -1
- package/lib/lowcode/view/lc-components/Section/FunctionPreview.js +2 -1
- 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/FunctionDesign.js +19 -20
- package/lib/lowcode/view/lc-components/Split/FunctionLive.js +2 -1
- package/lib/lowcode/view/lc-components/Split/FunctionPreview.js +2 -1
- package/lib/lowcode/view/lc-components/Split/index.js +5 -6
- package/lib/lowcode/view/lc-components/Split/meta.json +53 -53
- package/lib/lowcode/view/lc-components/Table/FunctionLive.js +2 -1
- package/lib/lowcode/view/lc-components/Table/FunctionPreview.js +2 -1
- package/lib/lowcode/view/lc-components/Table/components/TopFilter.js +75 -55
- package/lib/lowcode/view/lc-components/Table/components/TopImex.js +433 -0
- package/lib/lowcode/view/lc-components/Table/index.js +422 -198
- package/lib/lowcode/view/lc-components/Table/meta.json +451 -399
- package/lib/lowcode/view/lc-components/Tabs/FunctionDesign.js +12 -19
- package/lib/lowcode/view/lc-components/Tabs/index.js +51 -36
- package/lib/lowcode/view/lc-components/Tabs/meta.json +113 -113
- package/lib/lowcode/view/lc-components/Text/FunctionDesign.js +2 -1
- package/lib/lowcode/view/lc-components/Text/FunctionLive.js +2 -1
- package/lib/lowcode/view/lc-components/Text/FunctionPreview.js +2 -1
- 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/FunctionDesign.js +2 -3
- package/lib/lowcode/view/lc-components/Tree/FunctionLive.js +2 -1
- package/lib/lowcode/view/lc-components/Tree/index.js +170 -116
- package/lib/lowcode/view/lc-components/Tree/index.less +4 -4
- package/lib/lowcode/view/lc-components/Tree/meta.json +357 -301
- package/lib/lowcode/view/lc-components/Wrapper.js +12 -12
- 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/services.js +0 -25
- package/lib/upload/FilesWall/file.png +0 -0
- package/lib/upload/FilesWall/index.js +429 -0
- package/lib/upload/FilesWall/index.less +74 -0
- package/lib/upload/Form/gridForm.js +3 -2
- package/lib/upload/Form/index.js +2 -1
- package/lib/upload/Form/index.less +7 -7
- package/lib/upload/FormItem/index.js +20 -21
- package/lib/upload/index.js +8 -1
- package/lib/utils/action.js +2 -2
- package/lib/utils/form.js +37 -24
- package/lib/utils/grid.js +10 -7
- package/lowcode.js +1 -1
- package/package.json +173 -171
- package/upload.js +1 -1
- package/utils.js +1 -1
- package/es/lowcode/engine/meta/local/local.zh-cn.js +0 -97
- package/lib/lowcode/engine/meta/local/local.zh-cn.js +0 -103
|
@@ -17,7 +17,18 @@
|
|
|
17
17
|
"key": "dataset",
|
|
18
18
|
"name": "数据集",
|
|
19
19
|
"desc": "选择系统中的可用树形数据集",
|
|
20
|
-
"type": "_DataSetSelector"
|
|
20
|
+
"type": "_DataSetSelector",
|
|
21
|
+
"component": "tree",
|
|
22
|
+
"next": {
|
|
23
|
+
"name": "字段配置",
|
|
24
|
+
"props": [
|
|
25
|
+
{
|
|
26
|
+
"key": "fields",
|
|
27
|
+
"name": "#字段配置器",
|
|
28
|
+
"type": "_FieldsSetting"
|
|
29
|
+
}
|
|
30
|
+
]
|
|
31
|
+
}
|
|
21
32
|
},
|
|
22
33
|
{
|
|
23
34
|
"key": "title",
|
|
@@ -53,6 +64,63 @@
|
|
|
53
64
|
"type": "string",
|
|
54
65
|
"default": "iparentid"
|
|
55
66
|
},
|
|
67
|
+
{
|
|
68
|
+
"key": "actions",
|
|
69
|
+
"name": "操作项",
|
|
70
|
+
"desc": "树节点操作项",
|
|
71
|
+
"type": "group",
|
|
72
|
+
"default": true,
|
|
73
|
+
"next": {
|
|
74
|
+
"name": "操作项",
|
|
75
|
+
"props": [
|
|
76
|
+
{
|
|
77
|
+
"key": "rootAdd",
|
|
78
|
+
"name": "根节点",
|
|
79
|
+
"desc": "根节点操作项",
|
|
80
|
+
"type": "group",
|
|
81
|
+
"props": [
|
|
82
|
+
{
|
|
83
|
+
"key": "showRootAdd",
|
|
84
|
+
"name": "是否显示",
|
|
85
|
+
"desc": "是否显示",
|
|
86
|
+
"type": "switch",
|
|
87
|
+
"default": true
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"key": "onlyRoot",
|
|
91
|
+
"name": "根节点唯一",
|
|
92
|
+
"desc": "树组件仅一个根节点,如数据根节点数大于0,则不允许根节点新增",
|
|
93
|
+
"type": "switch",
|
|
94
|
+
"default": false
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"key": "rootAddSetting",
|
|
98
|
+
"name": "根节点配置",
|
|
99
|
+
"desc": "根节点配置",
|
|
100
|
+
"type": "_TreeRootEditor",
|
|
101
|
+
"default": {}
|
|
102
|
+
}
|
|
103
|
+
]
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"key": "actions",
|
|
107
|
+
"name": "节点操作项",
|
|
108
|
+
"type": "_ActionsEditor",
|
|
109
|
+
"default": {
|
|
110
|
+
"todoList": []
|
|
111
|
+
},
|
|
112
|
+
"defaultCode": "function onActionClick(data) {\n\n}",
|
|
113
|
+
"suppressDisplay": true,
|
|
114
|
+
"suppressMax": true,
|
|
115
|
+
"suppressMore": true,
|
|
116
|
+
"wrapper": "collapse",
|
|
117
|
+
"wrapperProps": {
|
|
118
|
+
"suppressIcon": true
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
]
|
|
122
|
+
}
|
|
123
|
+
},
|
|
56
124
|
{
|
|
57
125
|
"key": "styleSetting",
|
|
58
126
|
"name": "风格和样式",
|
|
@@ -119,6 +187,32 @@
|
|
|
119
187
|
}
|
|
120
188
|
]
|
|
121
189
|
},
|
|
190
|
+
{
|
|
191
|
+
"key": "selectSetting",
|
|
192
|
+
"name": "选中设置",
|
|
193
|
+
"type": "group",
|
|
194
|
+
"props": [
|
|
195
|
+
{
|
|
196
|
+
"key": "cancelSelect",
|
|
197
|
+
"name": "取消选中",
|
|
198
|
+
"desc": "是否可以取消选中",
|
|
199
|
+
"type": "switch",
|
|
200
|
+
"default": true
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
"key": "defaultSelect",
|
|
204
|
+
"name": "默认选中",
|
|
205
|
+
"desc": "返回默认选中的数据主键",
|
|
206
|
+
"type": "_JSEditor",
|
|
207
|
+
"defaultCode": "function defaultSelect(treeData) { \n return []; \n}",
|
|
208
|
+
"mustConfirm": true,
|
|
209
|
+
"wrapper": "collapse",
|
|
210
|
+
"wrapperProps": {
|
|
211
|
+
"suppressIcon": true
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
]
|
|
215
|
+
},
|
|
122
216
|
{
|
|
123
217
|
"key": "IconSetting",
|
|
124
218
|
"name": "图标设置",
|
|
@@ -148,55 +242,6 @@
|
|
|
148
242
|
]
|
|
149
243
|
}
|
|
150
244
|
},
|
|
151
|
-
{
|
|
152
|
-
"key": "actions",
|
|
153
|
-
"name": "操作项",
|
|
154
|
-
"desc": "树节点操作项",
|
|
155
|
-
"type": "group",
|
|
156
|
-
"default": true,
|
|
157
|
-
"next": {
|
|
158
|
-
"name": "操作项",
|
|
159
|
-
"props": [
|
|
160
|
-
{
|
|
161
|
-
"key": "rootAdd",
|
|
162
|
-
"name": "根节点",
|
|
163
|
-
"desc": "根节点操作项",
|
|
164
|
-
"type": "group",
|
|
165
|
-
"props": [
|
|
166
|
-
{
|
|
167
|
-
"key": "showRootAdd",
|
|
168
|
-
"name": "是否显示",
|
|
169
|
-
"desc": "是否显示",
|
|
170
|
-
"type": "switch",
|
|
171
|
-
"default": true
|
|
172
|
-
},
|
|
173
|
-
{
|
|
174
|
-
"key": "rootAddSetting",
|
|
175
|
-
"name": "根节点配置",
|
|
176
|
-
"desc": "根节点配置",
|
|
177
|
-
"type": "_TreeRootEditor",
|
|
178
|
-
"default": {}
|
|
179
|
-
}
|
|
180
|
-
]
|
|
181
|
-
},
|
|
182
|
-
{
|
|
183
|
-
"key": "actions",
|
|
184
|
-
"name": "节点操作项",
|
|
185
|
-
"type": "_ActionsEditor",
|
|
186
|
-
"default": {
|
|
187
|
-
"todoList": []
|
|
188
|
-
},
|
|
189
|
-
"suppressDisplay": true,
|
|
190
|
-
"suppressMax": true,
|
|
191
|
-
"suppressMore": true,
|
|
192
|
-
"wrapper": "collapse",
|
|
193
|
-
"wrapperProps": {
|
|
194
|
-
"suppressIcon": true
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
]
|
|
198
|
-
}
|
|
199
|
-
},
|
|
200
245
|
{
|
|
201
246
|
"key": "rowSelectionSetting",
|
|
202
247
|
"name": "节点控制器",
|
|
@@ -272,31 +317,43 @@
|
|
|
272
317
|
"key": "onMount",
|
|
273
318
|
"name": "组件首次渲染时",
|
|
274
319
|
"desc": "在组件首次渲染时,执行方法",
|
|
275
|
-
"func": "(params)
|
|
320
|
+
"func": "function onMount(params) {\n\t\n}"
|
|
276
321
|
},
|
|
277
322
|
{
|
|
278
323
|
"key": "onUnmount",
|
|
279
324
|
"name": "组件卸载时",
|
|
280
325
|
"desc": "在组件卸载时,执行方法。",
|
|
281
|
-
"func": "()
|
|
326
|
+
"func": "function onUnmount() {\n\t\n}"
|
|
282
327
|
},
|
|
283
328
|
{
|
|
284
329
|
"key": "processDataSource",
|
|
285
330
|
"name": "数据预处理",
|
|
286
331
|
"desc": "数据渲染前预处理",
|
|
287
|
-
"func": "(data)
|
|
332
|
+
"func": "function processDataSource(data) {\n\t\n}"
|
|
288
333
|
},
|
|
289
334
|
{
|
|
290
335
|
"key": "onDoubleClick",
|
|
291
336
|
"name": "双击事件",
|
|
292
337
|
"desc": "树节点双击事件",
|
|
293
|
-
"func": "(e, rowData)
|
|
338
|
+
"func": "function onDoubleClick(e, rowData) {\n\t\n}"
|
|
294
339
|
},
|
|
295
340
|
{
|
|
296
341
|
"key": "onCheck",
|
|
297
342
|
"name": "复选框选择事件",
|
|
298
343
|
"desc": "点击复选框触发",
|
|
299
|
-
"func": "(checkedKeys, e)
|
|
344
|
+
"func": "function onCheck(checkedKeys, e) {\n\t\n}"
|
|
345
|
+
},
|
|
346
|
+
{
|
|
347
|
+
"key": "onSelect",
|
|
348
|
+
"name": "选中事件",
|
|
349
|
+
"desc": "节点选中事件",
|
|
350
|
+
"func": "function onSelect(checkedKeys, e) {\n\t\n}"
|
|
351
|
+
},
|
|
352
|
+
{
|
|
353
|
+
"key": "onDrop",
|
|
354
|
+
"name": "拖拽事件",
|
|
355
|
+
"desc": "节点拖拽事件",
|
|
356
|
+
"func": "function onDrop(info, dragInfo) {\n\t\n}"
|
|
300
357
|
}
|
|
301
358
|
]
|
|
302
359
|
}
|
|
@@ -2,74 +2,43 @@ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
3
3
|
import React, { createContext, useContext as useReactContext, useRef } from 'react';
|
|
4
4
|
import { history } from 'umi';
|
|
5
|
-
import { useMemoizedFn,
|
|
6
|
-
import
|
|
5
|
+
import { useMemoizedFn, useUpdateEffect } from 'ahooks';
|
|
6
|
+
import diff from "../../tools/diff";
|
|
7
7
|
import { useLDEventBus } from "../EventBusProvider";
|
|
8
8
|
import RemoteSourceProvider, { RemoteSourceContext } from "../RemoteSourceProvider";
|
|
9
|
+
import usePageState from "./usePageState";
|
|
9
10
|
import useTodo from "../../tools/useTodo";
|
|
10
|
-
import { findNodeAndParent } from "../../tools/dataProcess";
|
|
11
11
|
import * as topics from "../../../constants/event-topics";
|
|
12
12
|
export var Context = /*#__PURE__*/createContext(null);
|
|
13
13
|
export var useContext = function useContext() {
|
|
14
14
|
return useReactContext(Context);
|
|
15
15
|
};
|
|
16
|
-
export var usePageData = function usePageData(_) {
|
|
17
|
-
var _useReactContext = useReactContext(RemoteSourceContext),
|
|
18
|
-
pageData = _useReactContext.pageData,
|
|
19
|
-
loading = _useReactContext.loading,
|
|
20
|
-
setPageData = _useReactContext.setPageData,
|
|
21
|
-
back = _useReactContext.back,
|
|
22
|
-
forward = _useReactContext.forward,
|
|
23
|
-
backLength = _useReactContext.backLength,
|
|
24
|
-
forwardLength = _useReactContext.forwardLength;
|
|
25
|
-
var _pageData;
|
|
26
|
-
if (isNil(_)) {
|
|
27
|
-
_pageData = pageData;
|
|
28
|
-
} else if (isFunction(_)) {
|
|
29
|
-
_pageData = _(pageData);
|
|
30
|
-
} else if (isArray(_)) {
|
|
31
|
-
_pageData = reduce(_, function (r, k) {
|
|
32
|
-
r.push(get(pageData, k));
|
|
33
|
-
return r;
|
|
34
|
-
}, []);
|
|
35
|
-
} else if (isObject(_) && _.id) {
|
|
36
|
-
var _findNodeAndParent;
|
|
37
|
-
_pageData = (_findNodeAndParent = findNodeAndParent(_.id, pageData)) === null || _findNodeAndParent === void 0 ? void 0 : _findNodeAndParent.node;
|
|
38
|
-
} else if (isString(_)) {
|
|
39
|
-
_pageData = get(pageData, _);
|
|
40
|
-
}
|
|
41
|
-
return [_pageData, {
|
|
42
|
-
loading: loading,
|
|
43
|
-
setPageData: setPageData,
|
|
44
|
-
back: back,
|
|
45
|
-
forward: forward,
|
|
46
|
-
backLength: backLength,
|
|
47
|
-
forwardLength: forwardLength
|
|
48
|
-
}];
|
|
49
|
-
};
|
|
50
16
|
export var useRemoteSource = function useRemoteSource() {
|
|
51
17
|
return useReactContext(RemoteSourceContext);
|
|
52
18
|
};
|
|
19
|
+
export * from "../../tools/usePageDataStore";
|
|
53
20
|
var PRIVATE_KEYS = ['componentList', 'componentMap'];
|
|
54
21
|
export default (function (_ref) {
|
|
55
22
|
var children = _ref.children,
|
|
56
23
|
code = _ref.code;
|
|
57
24
|
var eventBus = useLDEventBus();
|
|
58
25
|
var _useTodo = useTodo(),
|
|
59
|
-
_useTodo2 = _slicedToArray(_useTodo,
|
|
26
|
+
_useTodo2 = _slicedToArray(_useTodo, 3),
|
|
60
27
|
todo = _useTodo2[0],
|
|
61
|
-
callBehavior = _useTodo2[1]
|
|
28
|
+
callBehavior = _useTodo2[1],
|
|
29
|
+
loading = _useTodo2[2];
|
|
62
30
|
|
|
63
|
-
/**
|
|
64
|
-
* 页面公共资源
|
|
31
|
+
/**
|
|
32
|
+
* 页面公共资源
|
|
65
33
|
*/
|
|
66
|
-
var
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
34
|
+
var _usePageState = usePageState(null),
|
|
35
|
+
state = _usePageState.state,
|
|
36
|
+
prevState = _usePageState.prevState,
|
|
37
|
+
setState = _usePageState.setState,
|
|
38
|
+
getState = _usePageState.getState;
|
|
70
39
|
|
|
71
|
-
/**
|
|
72
|
-
* 组件列表
|
|
40
|
+
/**
|
|
41
|
+
* 组件列表
|
|
73
42
|
*/
|
|
74
43
|
var _componentList = useRef([]);
|
|
75
44
|
var _privateGetter = useRef({
|
|
@@ -81,18 +50,18 @@ export default (function (_ref) {
|
|
|
81
50
|
}
|
|
82
51
|
});
|
|
83
52
|
|
|
84
|
-
/**
|
|
85
|
-
* 注册组件
|
|
86
|
-
* id:string 组件id
|
|
87
|
-
* component:ReactNode 组件
|
|
53
|
+
/**
|
|
54
|
+
* 注册组件
|
|
55
|
+
* id:string 组件id
|
|
56
|
+
* component:ReactNode 组件
|
|
88
57
|
*/
|
|
89
58
|
var _register = useMemoizedFn(function (id, component) {
|
|
90
59
|
_componentList.current.push([id, component]);
|
|
91
60
|
});
|
|
92
61
|
|
|
93
|
-
/**
|
|
94
|
-
* 注销组件
|
|
95
|
-
* id:string 组件id
|
|
62
|
+
/**
|
|
63
|
+
* 注销组件
|
|
64
|
+
* id:string 组件id
|
|
96
65
|
*/
|
|
97
66
|
var _unregister = useMemoizedFn(function (id) {
|
|
98
67
|
_componentList.current = _componentList.current.filter(function (_ref2) {
|
|
@@ -102,54 +71,98 @@ export default (function (_ref) {
|
|
|
102
71
|
});
|
|
103
72
|
});
|
|
104
73
|
|
|
105
|
-
/**
|
|
106
|
-
* 根据组件id获取组件
|
|
107
|
-
* compId:string 组件id
|
|
108
|
-
* return:ReactNode
|
|
109
|
-
*/
|
|
110
|
-
var getElementById = useMemoizedFn(function (compId) {});
|
|
111
|
-
|
|
112
|
-
/**
|
|
113
|
-
* 根据组件id获取父组件
|
|
114
|
-
* compId:string 组件id
|
|
115
|
-
* return:ReactNode
|
|
74
|
+
/**
|
|
75
|
+
* 根据组件id获取组件
|
|
76
|
+
* compId:string 组件id
|
|
77
|
+
* return:ReactNode
|
|
116
78
|
*/
|
|
117
|
-
var
|
|
79
|
+
var getElementById = useMemoizedFn(function (compId) {
|
|
80
|
+
var _componentList$curren;
|
|
81
|
+
return (_componentList$curren = _componentList.current.find(function (_ref4) {
|
|
82
|
+
var _ref5 = _slicedToArray(_ref4, 1),
|
|
83
|
+
_id = _ref5[0];
|
|
84
|
+
return compId === _id;
|
|
85
|
+
})) === null || _componentList$curren === void 0 ? void 0 : _componentList$curren[1];
|
|
86
|
+
});
|
|
118
87
|
|
|
119
|
-
/**
|
|
120
|
-
* 根据组件id
|
|
121
|
-
* compId:string 组件id
|
|
122
|
-
* return:ReactNode
|
|
88
|
+
/**
|
|
89
|
+
* 根据组件id获取父组件
|
|
90
|
+
* compId:string 组件id
|
|
91
|
+
* return:ReactNode
|
|
123
92
|
*/
|
|
124
|
-
var
|
|
93
|
+
var getParentElement = useMemoizedFn(function (compId) {
|
|
94
|
+
var compMap = new Map(_componentList.current);
|
|
95
|
+
var _target = compMap.get(compId);
|
|
96
|
+
var _parentId = _target.api.getSelfData().parentId;
|
|
97
|
+
if (!_parentId) return null;
|
|
98
|
+
return compMap(_parentId);
|
|
99
|
+
});
|
|
125
100
|
|
|
126
|
-
/**
|
|
127
|
-
* 获取url参数
|
|
128
|
-
* return:object
|
|
101
|
+
/**
|
|
102
|
+
* 获取url参数
|
|
103
|
+
* return:object
|
|
129
104
|
*/
|
|
130
|
-
var getUrlParams = useMemoizedFn(function () {
|
|
105
|
+
var getUrlParams = useMemoizedFn(function () {
|
|
106
|
+
return history.location.query;
|
|
107
|
+
});
|
|
108
|
+
useUpdateEffect(function () {
|
|
109
|
+
var _diff = diff(prevState, state);
|
|
110
|
+
eventBus.$publisher(topics.PAGE_STATE_CHANGED, {
|
|
111
|
+
state: state,
|
|
112
|
+
prevState: prevState,
|
|
113
|
+
diff: _diff
|
|
114
|
+
});
|
|
115
|
+
}, [state, prevState]);
|
|
131
116
|
var ctx = new Proxy(_objectSpread({
|
|
132
|
-
_setPagePublicResource: _setPagePublicResource,
|
|
133
117
|
_register: _register,
|
|
134
118
|
_unregister: _unregister,
|
|
135
|
-
|
|
119
|
+
/**
|
|
120
|
+
* @property {boolean} loading - loading状态
|
|
121
|
+
*/
|
|
122
|
+
loading: loading,
|
|
123
|
+
/**
|
|
124
|
+
* @property {object} history - 当前路由信息
|
|
125
|
+
*/
|
|
136
126
|
history: history,
|
|
127
|
+
/**
|
|
128
|
+
* @method - 执行行为接口
|
|
129
|
+
* @param {object} evns - moduleCode: 模块编码,datasetCode:数据集编码,behaviorKey:行为key
|
|
130
|
+
* @param {object} params - 链接参数
|
|
131
|
+
* @param {object} data - body参数
|
|
132
|
+
*/
|
|
137
133
|
callBehavior: callBehavior,
|
|
134
|
+
/**
|
|
135
|
+
* @property {object} topics - 内置的事件话题
|
|
136
|
+
*/
|
|
138
137
|
topics: topics,
|
|
138
|
+
/**
|
|
139
|
+
* @property {string} PRIMARY_KEY - 主键key
|
|
140
|
+
*/
|
|
141
|
+
PRIMARY_KEY: window.appConfig.constraintKeys.PRIMARY,
|
|
142
|
+
PARENT_KEY: window.appConfig.constraintKeys.PARENT,
|
|
143
|
+
/**
|
|
144
|
+
* @method - 根据组件ID获取实例
|
|
145
|
+
* @param {string} compId - 组件ID
|
|
146
|
+
* @return {object} target - 组件实例
|
|
147
|
+
*/
|
|
139
148
|
getElementById: getElementById,
|
|
140
|
-
/**
|
|
141
|
-
* @method
|
|
142
|
-
* @param {string}
|
|
143
|
-
* @return {object}
|
|
149
|
+
/**
|
|
150
|
+
* @method - 根据组件ID获取父组件实例
|
|
151
|
+
* @param {string} compId - 组件ID
|
|
152
|
+
* @return {object} target - 父组件实例
|
|
144
153
|
*/
|
|
145
154
|
getParentElement: getParentElement,
|
|
146
|
-
|
|
155
|
+
/**
|
|
156
|
+
* @method - 执行行为池
|
|
157
|
+
* @param {object} actionPool - 行为池
|
|
158
|
+
* @param {object} args - 参数
|
|
159
|
+
*/
|
|
147
160
|
doAction: function doAction(actionPool, args) {
|
|
148
161
|
return todo(this, actionPool, args);
|
|
149
162
|
},
|
|
150
|
-
/**
|
|
151
|
-
* @method
|
|
152
|
-
* @return {object}
|
|
163
|
+
/**
|
|
164
|
+
* @method - 获取URL参数
|
|
165
|
+
* @return {object} params - url参数
|
|
153
166
|
*/
|
|
154
167
|
getUrlParams: getUrlParams
|
|
155
168
|
}, eventBus), {
|
|
@@ -157,12 +170,17 @@ export default (function (_ref) {
|
|
|
157
170
|
if (PRIVATE_KEYS.includes(property)) {
|
|
158
171
|
var _privateGetter$curren;
|
|
159
172
|
return (_privateGetter$curren = _privateGetter.current) === null || _privateGetter$curren === void 0 ? void 0 : _privateGetter$curren[property]();
|
|
173
|
+
} else if (property === 'state') {
|
|
174
|
+
return getState();
|
|
160
175
|
}
|
|
161
176
|
return Reflect.get(target, property, receiver);
|
|
162
177
|
},
|
|
163
178
|
set: function set(target, property, receiver) {
|
|
164
179
|
if (PRIVATE_KEYS.includes(property)) {
|
|
165
180
|
throw new Error("\u5C5E\u6027 \"".concat(property, "\" \u662F\u53EA\u8BFB\u7684"));
|
|
181
|
+
} else if (property === 'state') {
|
|
182
|
+
setState(receiver);
|
|
183
|
+
return true;
|
|
166
184
|
} else {
|
|
167
185
|
return Reflect.set(target, property, receiver);
|
|
168
186
|
}
|
|
@@ -172,6 +190,6 @@ export default (function (_ref) {
|
|
|
172
190
|
value: ctx
|
|
173
191
|
}, /*#__PURE__*/React.createElement(RemoteSourceProvider, {
|
|
174
192
|
code: code,
|
|
175
|
-
|
|
193
|
+
eventBus: eventBus
|
|
176
194
|
}, children));
|
|
177
195
|
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
3
|
+
import { usePrevious, useGetState, useMemoizedFn } from 'ahooks';
|
|
4
|
+
var usePageState = function usePageState(defaultValue) {
|
|
5
|
+
var _useGetState = useGetState(defaultValue),
|
|
6
|
+
_useGetState2 = _slicedToArray(_useGetState, 3),
|
|
7
|
+
state = _useGetState2[0],
|
|
8
|
+
setState = _useGetState2[1],
|
|
9
|
+
getState = _useGetState2[2];
|
|
10
|
+
var prevState = usePrevious(state);
|
|
11
|
+
var setPageState = useMemoizedFn(function (newState) {
|
|
12
|
+
setState(_objectSpread(_objectSpread({}, prevState), newState));
|
|
13
|
+
});
|
|
14
|
+
return {
|
|
15
|
+
state: state,
|
|
16
|
+
prevState: prevState,
|
|
17
|
+
setState: setPageState,
|
|
18
|
+
getState: getState
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
export default usePageState;
|