@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
|
@@ -15,47 +15,49 @@
|
|
|
15
15
|
{
|
|
16
16
|
"key": "addonBefore",
|
|
17
17
|
"name": "前置内容",
|
|
18
|
-
"type": "string"
|
|
19
|
-
"default": ""
|
|
18
|
+
"type": "string"
|
|
20
19
|
},
|
|
21
20
|
{
|
|
22
21
|
"key": "addonAfter",
|
|
23
22
|
"name": "后置内容",
|
|
24
|
-
"type": "string"
|
|
25
|
-
"default": ""
|
|
23
|
+
"type": "string"
|
|
26
24
|
},
|
|
27
25
|
{
|
|
28
26
|
"key": "prefix",
|
|
29
27
|
"name": "前缀内容",
|
|
30
|
-
"type": "string"
|
|
31
|
-
"default": ""
|
|
28
|
+
"type": "string"
|
|
32
29
|
},
|
|
33
30
|
{
|
|
34
31
|
"key": "suffix",
|
|
35
32
|
"name": "后缀内容",
|
|
36
|
-
"type": "string"
|
|
37
|
-
"default": ""
|
|
33
|
+
"type": "string"
|
|
38
34
|
}
|
|
39
35
|
],
|
|
40
36
|
"advance": {
|
|
41
37
|
"events": [
|
|
42
38
|
{
|
|
43
|
-
"key": "
|
|
39
|
+
"key": "onValueChange",
|
|
44
40
|
"name": "数据变化事件",
|
|
45
41
|
"desc": "在数据变化事件时,执行方法",
|
|
46
|
-
"func": "function
|
|
42
|
+
"func": "function onValueChange(value, field, data, formProps) {\n\t\n}"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"key": "onChange",
|
|
46
|
+
"name": "值变化事件(onChange)",
|
|
47
|
+
"desc": "原生onChange事件,在值发生变化时,执行方法",
|
|
48
|
+
"func": "function onChange(e) {\n\t\n}"
|
|
47
49
|
},
|
|
48
50
|
{
|
|
49
51
|
"key": "onBlur",
|
|
50
52
|
"name": "失去焦点事件",
|
|
51
53
|
"desc": "在失去焦点时,执行方法",
|
|
52
|
-
"func": "function onBlur(
|
|
54
|
+
"func": "function onBlur(e) {\n\t\n}"
|
|
53
55
|
},
|
|
54
56
|
{
|
|
55
57
|
"key": "onFocus",
|
|
56
58
|
"name": "获取焦点事件",
|
|
57
59
|
"desc": "获取焦点时,执行方法",
|
|
58
|
-
"func": "function onFocus(
|
|
60
|
+
"func": "function onFocus(e) {\n\t\n}"
|
|
59
61
|
}
|
|
60
62
|
]
|
|
61
63
|
}
|
|
@@ -20,10 +20,16 @@
|
|
|
20
20
|
],
|
|
21
21
|
"advance": {
|
|
22
22
|
"events": [
|
|
23
|
+
{
|
|
24
|
+
"key": "onValueChange",
|
|
25
|
+
"name": "数据变化事件",
|
|
26
|
+
"desc": "在数据变化事件时,执行方法",
|
|
27
|
+
"func": "function onValueChange(value, field, data, formProps) {\n\t\n}"
|
|
28
|
+
},
|
|
23
29
|
{
|
|
24
30
|
"key": "onChange",
|
|
25
|
-
"name": "
|
|
26
|
-
"desc": "
|
|
31
|
+
"name": "值变化事件(onChange)",
|
|
32
|
+
"desc": "原生onChange事件,在值发生变化时,执行方法",
|
|
27
33
|
"func": "function onChange(checked) {\n\t\n}"
|
|
28
34
|
}
|
|
29
35
|
]
|
|
@@ -27,22 +27,28 @@
|
|
|
27
27
|
"advance": {
|
|
28
28
|
"events": [
|
|
29
29
|
{
|
|
30
|
-
"key": "
|
|
30
|
+
"key": "onValueChange",
|
|
31
31
|
"name": "数据变化事件",
|
|
32
|
-
"desc": "
|
|
33
|
-
"func": "function
|
|
32
|
+
"desc": "在数据变化事件时,执行方法",
|
|
33
|
+
"func": "function onValueChange(value, field, data, formProps) {\n\t\n}"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"key": "onChange",
|
|
37
|
+
"name": "值变化事件(onChange)",
|
|
38
|
+
"desc": "原生onChange事件,在值发生变化时,执行方法",
|
|
39
|
+
"func": "function onChange(e) {\n\t\n}"
|
|
34
40
|
},
|
|
35
41
|
{
|
|
36
42
|
"key": "onBlur",
|
|
37
43
|
"name": "失去焦点事件",
|
|
38
44
|
"desc": "在失去焦点时,执行方法",
|
|
39
|
-
"func": "function onBlur(
|
|
45
|
+
"func": "function onBlur(e) {\n\t\n}"
|
|
40
46
|
},
|
|
41
47
|
{
|
|
42
48
|
"key": "onFocus",
|
|
43
49
|
"name": "获取焦点事件",
|
|
44
50
|
"desc": "获取焦点时,执行方法",
|
|
45
|
-
"func": "function onFocus(
|
|
51
|
+
"func": "function onFocus(e) {\n\t\n}"
|
|
46
52
|
}
|
|
47
53
|
]
|
|
48
54
|
}
|
|
@@ -54,10 +54,16 @@
|
|
|
54
54
|
],
|
|
55
55
|
"advance": {
|
|
56
56
|
"events": [
|
|
57
|
+
{
|
|
58
|
+
"key": "onValueChange",
|
|
59
|
+
"name": "数据变化事件",
|
|
60
|
+
"desc": "在数据变化事件时,执行方法",
|
|
61
|
+
"func": "function onValueChange(value, field, data, formProps) {\n\t\n}"
|
|
62
|
+
},
|
|
57
63
|
{
|
|
58
64
|
"key": "onChange",
|
|
59
|
-
"name": "
|
|
60
|
-
"desc": "
|
|
65
|
+
"name": "值变化事件(onChange)",
|
|
66
|
+
"desc": "原生onChange事件,在值发生变化时,执行方法",
|
|
61
67
|
"func": "function onChange(e) {\n\t\n}"
|
|
62
68
|
},
|
|
63
69
|
{
|
|
@@ -60,9 +60,15 @@
|
|
|
60
60
|
"advance": {
|
|
61
61
|
"events": [
|
|
62
62
|
{
|
|
63
|
-
"key": "
|
|
63
|
+
"key": "onValueChange",
|
|
64
64
|
"name": "数据变化事件",
|
|
65
65
|
"desc": "在数据变化事件时,执行方法",
|
|
66
|
+
"func": "function onValueChange(value, field, data, formProps) {\n\t\n}"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"key": "onChange",
|
|
70
|
+
"name": "值变化事件(onChange)",
|
|
71
|
+
"desc": "原生onChange事件,在值发生变化时,执行方法",
|
|
66
72
|
"func": "function onChange(value, extra) {\n\t\n}"
|
|
67
73
|
},
|
|
68
74
|
{
|
|
@@ -6,13 +6,36 @@
|
|
|
6
6
|
"icon": "icon-fieldstring",
|
|
7
7
|
"groupName": "表单项",
|
|
8
8
|
"order": 1,
|
|
9
|
-
"props": [
|
|
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": {
|
|
23
|
+
"suppressIcon": true
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
],
|
|
10
27
|
"advance": {
|
|
11
28
|
"events": [
|
|
12
29
|
{
|
|
13
|
-
"key": "
|
|
30
|
+
"key": "onValueChange",
|
|
14
31
|
"name": "数据变化事件",
|
|
15
|
-
"desc": "
|
|
32
|
+
"desc": "在数据变化事件时,执行方法",
|
|
33
|
+
"func": "function onValueChange(value, field, data, formProps) {\n\t\n}"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"key": "onChange",
|
|
37
|
+
"name": "值变化事件(onChange)",
|
|
38
|
+
"desc": "原生onChange事件,在值发生变化时,执行方法",
|
|
16
39
|
"func": "function onChange(date, dateString) {\n\t\n}"
|
|
17
40
|
}
|
|
18
41
|
]
|
|
@@ -57,6 +57,26 @@
|
|
|
57
57
|
],
|
|
58
58
|
"default": "bottom"
|
|
59
59
|
},
|
|
60
|
+
{
|
|
61
|
+
"key": "getContainer",
|
|
62
|
+
"name": "挂载节点",
|
|
63
|
+
"desc": "指定功能区挂载的页面节点",
|
|
64
|
+
"type": "_ComponentSelector",
|
|
65
|
+
"filter": [
|
|
66
|
+
[
|
|
67
|
+
"id",
|
|
68
|
+
"page_root"
|
|
69
|
+
],
|
|
70
|
+
[
|
|
71
|
+
"meta.group",
|
|
72
|
+
"container"
|
|
73
|
+
],
|
|
74
|
+
[
|
|
75
|
+
"meta.group",
|
|
76
|
+
"build-in"
|
|
77
|
+
]
|
|
78
|
+
]
|
|
79
|
+
},
|
|
60
80
|
{
|
|
61
81
|
"key": "renderFormLeft",
|
|
62
82
|
"name": "按钮区域左侧渲染",
|
|
@@ -356,7 +376,7 @@
|
|
|
356
376
|
"name": "格式化数据",
|
|
357
377
|
"desc": "格式化单表提交数据",
|
|
358
378
|
"type": "_JSEditor",
|
|
359
|
-
"defaultCode": "function dataSourceFormat(values, submitData) { \n return submitData; \n}",
|
|
379
|
+
"defaultCode": "function dataSourceFormat(dataSetKey, values, submitData, behaviorKey) { \n return { [dataSetKey]: { [`${behaviorKey}List`]: submitData } }; \n}",
|
|
360
380
|
"mustConfirm": true,
|
|
361
381
|
"wrapper": "collapse",
|
|
362
382
|
"wrapperProps": {
|
|
@@ -482,7 +502,7 @@
|
|
|
482
502
|
"name": "格式化数据",
|
|
483
503
|
"desc": "格式化单表提交数据",
|
|
484
504
|
"type": "_JSEditor",
|
|
485
|
-
"defaultCode": "function dataSourceFormat(values, submitData) { \n return submitData; \n}",
|
|
505
|
+
"defaultCode": "function dataSourceFormat(dataSetKey, values, submitData, behaviorKey) { \n return { [dataSetKey]: { [`${behaviorKey}List`]: submitData } }; \n}",
|
|
486
506
|
"mustConfirm": true,
|
|
487
507
|
"wrapper": "collapse",
|
|
488
508
|
"wrapperProps": {
|
|
@@ -22,25 +22,25 @@
|
|
|
22
22
|
"label": "open",
|
|
23
23
|
"kind": "property",
|
|
24
24
|
"insertText": "open",
|
|
25
|
-
"documentation": " /**\
|
|
25
|
+
"documentation": " /**\n * 弹窗打开状态\n * @property\n */"
|
|
26
26
|
},
|
|
27
27
|
{
|
|
28
28
|
"label": "doOpen",
|
|
29
29
|
"kind": "method",
|
|
30
30
|
"insertText": "doOpen",
|
|
31
|
-
"documentation": " /**\
|
|
31
|
+
"documentation": " /**\n * 打开弹窗\n * @method\n */"
|
|
32
32
|
},
|
|
33
33
|
{
|
|
34
34
|
"label": "doClose",
|
|
35
35
|
"kind": "method",
|
|
36
36
|
"insertText": "doClose",
|
|
37
|
-
"documentation": " /**\
|
|
37
|
+
"documentation": " /**\n * 关闭弹窗\n * @method\n */"
|
|
38
38
|
},
|
|
39
39
|
{
|
|
40
40
|
"label": "setTitle",
|
|
41
41
|
"kind": "method",
|
|
42
42
|
"insertText": "setTitle(title)",
|
|
43
|
-
"documentation": " /**\
|
|
43
|
+
"documentation": " /**\n * 设置弹窗标题\n * @method\n * @param {stirng} title -标题\n */"
|
|
44
44
|
}
|
|
45
45
|
]
|
|
46
46
|
},
|
|
@@ -52,25 +52,25 @@
|
|
|
52
52
|
"label": "open",
|
|
53
53
|
"kind": "property",
|
|
54
54
|
"insertText": "open",
|
|
55
|
-
"documentation": " /**\
|
|
55
|
+
"documentation": " /**\n * 是否打开\n * @property\n */"
|
|
56
56
|
},
|
|
57
57
|
{
|
|
58
58
|
"label": "doOpen",
|
|
59
59
|
"kind": "method",
|
|
60
60
|
"insertText": "doOpen",
|
|
61
|
-
"documentation": " /**\
|
|
61
|
+
"documentation": " /**\n * 打开弹窗\n * @method\n */"
|
|
62
62
|
},
|
|
63
63
|
{
|
|
64
64
|
"label": "doClose",
|
|
65
65
|
"kind": "method",
|
|
66
66
|
"insertText": "doClose",
|
|
67
|
-
"documentation": " /**\
|
|
67
|
+
"documentation": " /**\n * 关闭弹窗\n * @method\n */"
|
|
68
68
|
},
|
|
69
69
|
{
|
|
70
70
|
"label": "toggle",
|
|
71
71
|
"kind": "method",
|
|
72
72
|
"insertText": "toggle",
|
|
73
|
-
"documentation": " /**\
|
|
73
|
+
"documentation": " /**\n * @method\n * 切换弹窗\n */"
|
|
74
74
|
}
|
|
75
75
|
]
|
|
76
76
|
},
|
|
@@ -82,13 +82,13 @@
|
|
|
82
82
|
"label": "getInstance",
|
|
83
83
|
"kind": "method",
|
|
84
84
|
"insertText": "getInstance",
|
|
85
|
-
"documentation": " /**\
|
|
85
|
+
"documentation": " /**\n * 获取表格实例\n * @method\n */"
|
|
86
86
|
},
|
|
87
87
|
{
|
|
88
88
|
"label": "submit",
|
|
89
89
|
"kind": "method",
|
|
90
90
|
"insertText": "submit",
|
|
91
|
-
"documentation": " /**\
|
|
91
|
+
"documentation": " /**\n * 提交表格数据\n * @method\n */"
|
|
92
92
|
}
|
|
93
93
|
]
|
|
94
94
|
},
|
|
@@ -98,13 +98,13 @@
|
|
|
98
98
|
"completions": []
|
|
99
99
|
},
|
|
100
100
|
{
|
|
101
|
-
"name": "
|
|
102
|
-
"triggerWord": "
|
|
101
|
+
"name": "ImEx",
|
|
102
|
+
"triggerWord": "imex",
|
|
103
103
|
"completions": []
|
|
104
104
|
},
|
|
105
105
|
{
|
|
106
|
-
"name": "
|
|
107
|
-
"triggerWord": "
|
|
106
|
+
"name": "Image",
|
|
107
|
+
"triggerWord": "image",
|
|
108
108
|
"completions": []
|
|
109
109
|
},
|
|
110
110
|
{
|
|
@@ -165,7 +165,7 @@
|
|
|
165
165
|
"label": "getInstance",
|
|
166
166
|
"kind": "method",
|
|
167
167
|
"insertText": "getInstance",
|
|
168
|
-
"documentation": " /**\
|
|
168
|
+
"documentation": " /**\n * 获取表格实例\n * @method\n */"
|
|
169
169
|
}
|
|
170
170
|
]
|
|
171
171
|
},
|
|
@@ -192,13 +192,13 @@
|
|
|
192
192
|
"label": "getParentElement",
|
|
193
193
|
"kind": "method",
|
|
194
194
|
"insertText": "getParentElement(id)",
|
|
195
|
-
"documentation": " /**\
|
|
195
|
+
"documentation": " /**\n * @method\n * @param {string} id - 组件id\n * @return {object}\n */"
|
|
196
196
|
},
|
|
197
197
|
{
|
|
198
198
|
"label": "getUrlParams",
|
|
199
199
|
"kind": "method",
|
|
200
200
|
"insertText": "getUrlParams",
|
|
201
|
-
"documentation": " /**\
|
|
201
|
+
"documentation": " /**\n * @method\n * @return {object}\n */"
|
|
202
202
|
}
|
|
203
203
|
]
|
|
204
204
|
}
|
|
@@ -34,15 +34,15 @@
|
|
|
34
34
|
"events": [
|
|
35
35
|
{
|
|
36
36
|
"key": "onPageMount",
|
|
37
|
-
"name": "
|
|
38
|
-
"desc": "
|
|
39
|
-
"func": "function onPageMount()
|
|
37
|
+
"name": "页面首次渲染完成",
|
|
38
|
+
"desc": "在页面首次渲染完成时,执行方法",
|
|
39
|
+
"func": "function onPageMount(){\n\t\n}"
|
|
40
40
|
},
|
|
41
41
|
{
|
|
42
42
|
"key": "onPageUnmount",
|
|
43
|
-
"name": "
|
|
44
|
-
"desc": "
|
|
45
|
-
"func": "function onPageUnmount()
|
|
43
|
+
"name": "页面卸载时",
|
|
44
|
+
"desc": "在页面卸载时,执行方法。",
|
|
45
|
+
"func": "function onPageUnmount(){\n\t\n}"
|
|
46
46
|
}
|
|
47
47
|
]
|
|
48
48
|
}
|
|
@@ -27,8 +27,8 @@ export default (function (_ref) {
|
|
|
27
27
|
callBehavior = _useTodo2[1],
|
|
28
28
|
loading = _useTodo2[2];
|
|
29
29
|
|
|
30
|
-
/**
|
|
31
|
-
* 页面公共资源
|
|
30
|
+
/**
|
|
31
|
+
* 页面公共资源
|
|
32
32
|
*/
|
|
33
33
|
var _useSetState = useSetState(null),
|
|
34
34
|
_useSetState2 = _slicedToArray(_useSetState, 2),
|
|
@@ -36,8 +36,8 @@ export default (function (_ref) {
|
|
|
36
36
|
setPagePublicResource = _useSetState2[1];
|
|
37
37
|
var prevPagePublicResource = usePrevious(pagePublicResource);
|
|
38
38
|
|
|
39
|
-
/**
|
|
40
|
-
* 组件列表
|
|
39
|
+
/**
|
|
40
|
+
* 组件列表
|
|
41
41
|
*/
|
|
42
42
|
var _componentList = useRef([]);
|
|
43
43
|
var _privateGetter = useRef({
|
|
@@ -49,18 +49,18 @@ export default (function (_ref) {
|
|
|
49
49
|
}
|
|
50
50
|
});
|
|
51
51
|
|
|
52
|
-
/**
|
|
53
|
-
* 注册组件
|
|
54
|
-
* id:string 组件id
|
|
55
|
-
* component:ReactNode 组件
|
|
52
|
+
/**
|
|
53
|
+
* 注册组件
|
|
54
|
+
* id:string 组件id
|
|
55
|
+
* component:ReactNode 组件
|
|
56
56
|
*/
|
|
57
57
|
var _register = useMemoizedFn(function (id, component) {
|
|
58
58
|
_componentList.current.push([id, component]);
|
|
59
59
|
});
|
|
60
60
|
|
|
61
|
-
/**
|
|
62
|
-
* 注销组件
|
|
63
|
-
* id:string 组件id
|
|
61
|
+
/**
|
|
62
|
+
* 注销组件
|
|
63
|
+
* id:string 组件id
|
|
64
64
|
*/
|
|
65
65
|
var _unregister = useMemoizedFn(function (id) {
|
|
66
66
|
_componentList.current = _componentList.current.filter(function (_ref2) {
|
|
@@ -70,30 +70,30 @@ export default (function (_ref) {
|
|
|
70
70
|
});
|
|
71
71
|
});
|
|
72
72
|
|
|
73
|
-
/**
|
|
74
|
-
* 根据组件id获取组件
|
|
75
|
-
* compId:string 组件id
|
|
76
|
-
* return:ReactNode
|
|
73
|
+
/**
|
|
74
|
+
* 根据组件id获取组件
|
|
75
|
+
* compId:string 组件id
|
|
76
|
+
* return:ReactNode
|
|
77
77
|
*/
|
|
78
78
|
var getElementById = useMemoizedFn(function (compId) {});
|
|
79
79
|
|
|
80
|
-
/**
|
|
81
|
-
* 根据组件id获取父组件
|
|
82
|
-
* compId:string 组件id
|
|
83
|
-
* return:ReactNode
|
|
80
|
+
/**
|
|
81
|
+
* 根据组件id获取父组件
|
|
82
|
+
* compId:string 组件id
|
|
83
|
+
* return:ReactNode
|
|
84
84
|
*/
|
|
85
85
|
var getParentElement = useMemoizedFn(function (compId) {});
|
|
86
86
|
|
|
87
|
-
/**
|
|
88
|
-
* 根据组件id获取组件路径
|
|
89
|
-
* compId:string 组件id
|
|
90
|
-
* return:ReactNode
|
|
87
|
+
/**
|
|
88
|
+
* 根据组件id获取组件路径
|
|
89
|
+
* compId:string 组件id
|
|
90
|
+
* return:ReactNode
|
|
91
91
|
*/
|
|
92
92
|
var getElementPathById = useMemoizedFn(function (compId) {});
|
|
93
93
|
|
|
94
|
-
/**
|
|
95
|
-
* 获取url参数
|
|
96
|
-
* return:object
|
|
94
|
+
/**
|
|
95
|
+
* 获取url参数
|
|
96
|
+
* return:object
|
|
97
97
|
*/
|
|
98
98
|
var getUrlParams = useMemoizedFn(function () {});
|
|
99
99
|
useUpdateEffect(function () {
|
|
@@ -114,19 +114,19 @@ export default (function (_ref) {
|
|
|
114
114
|
PRIMARY_KEY: window.appConfig.constraintKeys.PRIMARY,
|
|
115
115
|
PARENT_KEY: window.appConfig.constraintKeys.PARENT,
|
|
116
116
|
getElementById: getElementById,
|
|
117
|
-
/**
|
|
118
|
-
* @method
|
|
119
|
-
* @param {string} id - 组件id
|
|
120
|
-
* @return {object}
|
|
117
|
+
/**
|
|
118
|
+
* @method
|
|
119
|
+
* @param {string} id - 组件id
|
|
120
|
+
* @return {object}
|
|
121
121
|
*/
|
|
122
122
|
getParentElement: getParentElement,
|
|
123
123
|
getElementPathById: getElementPathById,
|
|
124
124
|
doAction: function doAction(actionPool, args) {
|
|
125
125
|
return todo(this, actionPool, args);
|
|
126
126
|
},
|
|
127
|
-
/**
|
|
128
|
-
* @method
|
|
129
|
-
* @return {object}
|
|
127
|
+
/**
|
|
128
|
+
* @method
|
|
129
|
+
* @return {object}
|
|
130
130
|
*/
|
|
131
131
|
getUrlParams: getUrlParams
|
|
132
132
|
}, eventBus), {
|
|
@@ -149,7 +149,7 @@ export default (function (_ref) {
|
|
|
149
149
|
value: ctx
|
|
150
150
|
}, /*#__PURE__*/React.createElement(RemoteSourceProvider, {
|
|
151
151
|
code: code,
|
|
152
|
-
|
|
152
|
+
eventBus: eventBus,
|
|
153
153
|
debug: debug
|
|
154
154
|
}, children));
|
|
155
155
|
});
|
|
@@ -5,18 +5,21 @@ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
|
5
5
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
6
6
|
import React, { createContext, useRef } from 'react';
|
|
7
7
|
import { useRequest, useSetState, useAsyncEffect, useMemoizedFn, useCookieState, useCreation, useUnmount } from 'ahooks';
|
|
8
|
+
import launcher from "../launcher";
|
|
8
9
|
import { LuckDaContext } from "../../../components/Builder";
|
|
9
10
|
import { doAction as doActionUtils } from "../../../helper/action";
|
|
10
11
|
import usePageDataStore from "../tools/usePageDataStore";
|
|
12
|
+
import { useTemporalStore } from "../provider/ContextProvider";
|
|
11
13
|
import { decompress } from "../tools/dataProcess";
|
|
12
14
|
import { fetchPageData, fetchDesignModlueData, fetchPreviewModlueData, fetchModlueData, fetchAllDataset, fetchAllSerials, fetchAllBehaviorEx } from "../../constants/api-url";
|
|
13
15
|
import { RUNTIME, COOKIE_RUNTIME_KEY } from "../../constants";
|
|
16
|
+
import { PAGE_LOAD_MOUNT } from "../../constants/event-topics";
|
|
14
17
|
import { setLDMetaAttrs } from "../tools/helper";
|
|
15
18
|
export var RemoteSourceContext = /*#__PURE__*/createContext(null);
|
|
16
19
|
export default (function (_ref) {
|
|
17
20
|
var children = _ref.children,
|
|
18
21
|
code = _ref.code,
|
|
19
|
-
|
|
22
|
+
eventBus = _ref.eventBus,
|
|
20
23
|
debug = _ref.debug;
|
|
21
24
|
var _usePageDataStore = usePageDataStore(function (state) {
|
|
22
25
|
return {
|
|
@@ -28,6 +31,16 @@ export default (function (_ref) {
|
|
|
28
31
|
initialize = _usePageDataStore.initialize,
|
|
29
32
|
initializeModule = _usePageDataStore.initializeModule,
|
|
30
33
|
reset = _usePageDataStore.reset;
|
|
34
|
+
var _useTemporalStore = useTemporalStore(function (state) {
|
|
35
|
+
return {
|
|
36
|
+
pause: state.pause,
|
|
37
|
+
resume: state.resume,
|
|
38
|
+
clear: state.clear
|
|
39
|
+
};
|
|
40
|
+
}),
|
|
41
|
+
pause = _useTemporalStore.pause,
|
|
42
|
+
resume = _useTemporalStore.resume,
|
|
43
|
+
clear = _useTemporalStore.clear;
|
|
31
44
|
var _useSetState = useSetState({}),
|
|
32
45
|
_useSetState2 = _slicedToArray(_useSetState, 2),
|
|
33
46
|
remoteSource = _useSetState2[0],
|
|
@@ -38,13 +51,18 @@ export default (function (_ref) {
|
|
|
38
51
|
setRuntime = _useCookieState2[1];
|
|
39
52
|
var prevRuntime = useRef(cookieRuntime);
|
|
40
53
|
useCreation(function () {
|
|
41
|
-
|
|
54
|
+
!debug && launcher();
|
|
55
|
+
pause();
|
|
56
|
+
if (eventBus.runtime !== cookieRuntime) {
|
|
42
57
|
prevRuntime.current = cookieRuntime;
|
|
43
|
-
setRuntime(runtime);
|
|
58
|
+
setRuntime(eventBus.runtime);
|
|
44
59
|
}
|
|
45
60
|
}, []);
|
|
46
61
|
useUnmount(function () {
|
|
47
|
-
!debug
|
|
62
|
+
if (!debug) {
|
|
63
|
+
reset();
|
|
64
|
+
clear();
|
|
65
|
+
}
|
|
48
66
|
setRuntime(prevRuntime.current);
|
|
49
67
|
});
|
|
50
68
|
|
|
@@ -55,7 +73,7 @@ export default (function (_ref) {
|
|
|
55
73
|
fetchPageDataLoading = _useRequest.loading,
|
|
56
74
|
runFetchPageData = _useRequest.runAsync;
|
|
57
75
|
// 获取模块数据
|
|
58
|
-
var _useRequest2 = useRequest(_defineProperty(_defineProperty(_defineProperty({}, RUNTIME.DESIGN, fetchDesignModlueData), RUNTIME.PREVIEW, fetchPreviewModlueData), RUNTIME.LIVE, fetchModlueData)[runtime], {
|
|
76
|
+
var _useRequest2 = useRequest(_defineProperty(_defineProperty(_defineProperty({}, RUNTIME.DESIGN, fetchDesignModlueData), RUNTIME.PREVIEW, fetchPreviewModlueData), RUNTIME.LIVE, fetchModlueData)[eventBus.runtime], {
|
|
59
77
|
manual: true,
|
|
60
78
|
onSuccess: function onSuccess(_ref2) {
|
|
61
79
|
var code = _ref2.code,
|
|
@@ -158,7 +176,7 @@ export default (function (_ref) {
|
|
|
158
176
|
case 2:
|
|
159
177
|
fetchPageDataRes = _context.sent;
|
|
160
178
|
if (!(fetchPageDataRes.code === 1)) {
|
|
161
|
-
_context.next =
|
|
179
|
+
_context.next = 15;
|
|
162
180
|
break;
|
|
163
181
|
}
|
|
164
182
|
data = fetchPageDataRes.data, list = fetchPageDataRes.list, detail = fetchPageDataRes.detail;
|
|
@@ -183,8 +201,12 @@ export default (function (_ref) {
|
|
|
183
201
|
runFetchAllSerials({
|
|
184
202
|
uid: data.moduleId
|
|
185
203
|
});
|
|
186
|
-
!debug
|
|
187
|
-
|
|
204
|
+
if (!debug) {
|
|
205
|
+
initialize(decompress(source));
|
|
206
|
+
resume();
|
|
207
|
+
}
|
|
208
|
+
eventBus.$publisher(PAGE_LOAD_MOUNT);
|
|
209
|
+
case 15:
|
|
188
210
|
case "end":
|
|
189
211
|
return _context.stop();
|
|
190
212
|
}
|