@luck-design-biz/luckda 1.0.0-alpha → 1.0.1-10
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/Builder/index.js +15 -3
- package/es/components/ComplexItem/index.js +65 -49
- package/es/components/LDActions/index.less +68 -68
- package/es/components/LdAutoForm/index.js +6 -4
- package/es/components/LdFormList/index.js +11 -10
- package/es/components/LdGrid/index.js +4 -4
- package/es/components/LdGridForm/index.js +40 -23
- package/es/components/LdGridForm/index.less +7 -7
- package/es/components/LdTree/index.less +40 -40
- package/es/helper/action.js +6 -6
- package/es/helper/form.js +15 -14
- package/es/helper/index.less +7 -7
- package/es/helper/ldBuilder.js +8 -3
- package/es/locales/zh-CN.js +41 -4
- package/es/lowcode/constants/api-url.js +87 -87
- package/es/lowcode/constants/event-topics.js +0 -2
- package/es/lowcode/engine/launcher.js +3 -1
- package/es/lowcode/engine/meta/box.props.json +3 -3
- package/es/lowcode/engine/meta/button.props.default.json +1 -1
- package/es/lowcode/engine/meta/button.props.json +2 -2
- package/es/lowcode/engine/meta/cardlist.props.default.json +1 -0
- package/es/lowcode/engine/meta/cardlist.props.json +2 -1
- package/es/lowcode/engine/meta/components-list.json +6 -126
- package/es/lowcode/engine/meta/dialog.props.default.json +4 -2
- package/es/lowcode/engine/meta/dialog.props.json +76 -20
- package/es/lowcode/engine/meta/drawer.props.default.json +15 -4
- package/es/lowcode/engine/meta/drawer.props.json +144 -24
- package/es/lowcode/engine/meta/fieldcomplex.props.default.json +1 -0
- package/es/lowcode/engine/meta/fieldcomplex.props.json +7 -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 +2 -0
- package/es/lowcode/engine/meta/fielddate.props.json +4 -2
- package/es/lowcode/engine/meta/fieldnumber.props.default.json +1 -0
- package/es/lowcode/engine/meta/fieldnumber.props.json +3 -2
- package/es/lowcode/engine/meta/fielduser.props.default.json +1 -1
- package/es/lowcode/engine/meta/fielduser.props.json +1 -1
- package/es/lowcode/engine/meta/form.props.default.json +14 -4
- package/es/lowcode/engine/meta/form.props.json +53 -14
- package/es/lowcode/engine/meta/grouptree.props.default.json +16 -0
- package/es/lowcode/engine/meta/grouptree.props.json +89 -0
- package/es/lowcode/engine/meta/iframe.props.default.json +2 -1
- package/es/lowcode/engine/meta/iframe.props.json +3 -2
- package/es/lowcode/engine/meta/image.props.default.json +2 -1
- package/es/lowcode/engine/meta/image.props.json +3 -2
- package/es/lowcode/engine/meta/imex.props.default.json +2 -1
- package/es/lowcode/engine/meta/imex.props.json +27 -6
- package/es/lowcode/engine/meta/js-editor/auto-complete.json +65 -42
- package/es/lowcode/engine/meta/jsx.props.default.json +1 -1
- package/es/lowcode/engine/meta/jsx.props.json +1 -1
- package/es/lowcode/engine/meta/layout.props.default.json +1 -1
- package/es/lowcode/engine/meta/layout.props.json +5 -5
- package/es/lowcode/engine/meta/link.props.default.json +2 -1
- package/es/lowcode/engine/meta/link.props.json +3 -2
- package/es/lowcode/engine/meta/page.props.json +6 -0
- package/es/lowcode/engine/meta/pagelayout.props.default.json +1 -1
- package/es/lowcode/engine/meta/pagelayout.props.json +1 -1
- package/es/lowcode/engine/meta/section.props.json +2 -1
- package/es/lowcode/engine/meta/split.props.default.json +1 -1
- package/es/lowcode/engine/meta/split.props.json +1 -1
- package/es/lowcode/engine/meta/table.props.json +3 -3
- package/es/lowcode/engine/meta/text.props.default.json +4 -2
- package/es/lowcode/engine/meta/text.props.json +8 -6
- package/es/lowcode/engine/meta/tree.props.json +2 -2
- package/es/lowcode/engine/provider/ContextProvider/index.js +83 -66
- package/es/lowcode/engine/provider/ContextProvider/router.js +43 -0
- package/es/lowcode/engine/{tools → provider/ContextProvider}/usePageDataStore.js +9 -7
- package/es/lowcode/engine/provider/ContextProvider/usePageVar.js +38 -15
- package/es/lowcode/engine/{tools → provider/ContextProvider}/useTodo.js +5 -7
- package/es/lowcode/engine/provider/ContextProvider/utils.js +157 -0
- package/es/lowcode/engine/provider/RemoteSourceProvider.js +1 -2
- package/es/lowcode/engine/tools/dataProcess.js +76 -76
- package/es/lowcode/engine/tools/helper.js +28 -2
- package/es/lowcode/engine/tools/initDS.js +263 -0
- package/es/lowcode/engine/tools/useCanvasRender.js +13 -1
- package/es/lowcode/engine/tools/useCombinedRefs.js +3 -2
- package/es/lowcode/painter/Components.js +2 -2
- package/es/lowcode/painter/Design.js +1 -0
- package/es/lowcode/painter/DesignOperator.js +25 -11
- package/es/lowcode/painter/Panel.js +2 -2
- package/es/lowcode/painter/components/AdvancePanel.js +3 -3
- package/es/lowcode/painter/components/Collapse.js +31 -28
- 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 +29 -29
- package/es/lowcode/painter/components/PanelItem.js +24 -24
- package/es/lowcode/painter/components/PopConfirm.js +8 -8
- package/es/lowcode/painter/components/PopForm.js +27 -27
- package/es/lowcode/painter/components/RuleInput.js +30 -30
- package/es/lowcode/painter/components/SortBox.js +22 -22
- package/es/lowcode/painter/components/TipIcon.js +16 -0
- package/es/lowcode/painter/components/VarEditor.js +456 -0
- 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 +25 -25
- package/es/lowcode/painter/components/code-editor/JSEditor.js +23 -21
- package/es/lowcode/painter/components/code-editor/JsonEditor.js +25 -25
- package/es/lowcode/painter/components/code-editor/VisionEditor.js +81 -0
- package/es/lowcode/painter/components/field-setting/SettingUI.js +47 -5
- package/es/lowcode/painter/components/field-setting/index.js +27 -13
- package/es/lowcode/painter/components/field-setting/meta/frontRules.js +2 -1
- package/es/lowcode/painter/index.js +1 -0
- package/es/lowcode/painter/panel-section/BlockEditor/index.js +20 -6
- package/es/lowcode/painter/panel-section/BlocksEditor/index.js +2 -2
- package/es/lowcode/painter/panel-section/ComplexPop.js +242 -0
- package/es/lowcode/painter/panel-section/DataSetSelector.js +8 -0
- package/es/lowcode/painter/panel-section/FieldsSetting.js +30 -4
- package/es/lowcode/painter/panel-section/GroupClassSelector.js +55 -0
- package/es/lowcode/painter/panel-section/I18nInput.js +4 -2
- package/es/lowcode/painter/panel-section/Icon.js +32 -27
- package/es/lowcode/painter/panel-section/IconConditionSelector.js +7 -7
- package/es/lowcode/painter/panel-section/IconSelector.js +17 -17
- package/es/lowcode/painter/panel-section/ImpExp.js +1 -27
- package/es/lowcode/painter/panel-section/ImpExpAlone.js +1 -2
- package/es/lowcode/painter/panel-section/LayoutRatio.js +22 -21
- package/es/lowcode/painter/panel-section/PageVars.js +300 -0
- 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 +6 -5
- package/es/lowcode/painter/panel-section/StylePanel/StyleRow.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/WidthHeight.js +2 -2
- package/es/lowcode/painter/panel-section/StylePanel/index.js +15 -15
- package/es/lowcode/painter/panel-section/TabItems.js +6 -42
- package/es/lowcode/painter/panel-section/TextContent.js +79 -0
- package/es/lowcode/painter/services/complexPop.js +21 -0
- 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 +166 -160
- 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/page-vars.less +25 -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 -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/preview/index.js +1 -0
- package/es/lowcode/view/Canvas.js +24 -22
- package/es/lowcode/view/Loading.js +5 -7
- package/es/lowcode/view/Page.js +37 -15
- package/es/lowcode/view/index.js +1 -0
- package/es/lowcode/view/lc-components/Box/index.js +22 -7
- 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 +40 -40
- 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 +154 -153
- package/es/lowcode/view/lc-components/Dialog/FunctionDesign.js +14 -6
- package/es/lowcode/view/lc-components/Dialog/index.js +34 -25
- package/es/lowcode/view/lc-components/Dialog/index.less +12 -8
- package/es/lowcode/view/lc-components/Dialog/meta.json +204 -150
- package/es/lowcode/view/lc-components/Drawer/FunctionDesign.js +51 -8
- package/es/lowcode/view/lc-components/Drawer/index.js +149 -34
- package/es/lowcode/view/lc-components/Drawer/index.less +13 -10
- package/es/lowcode/view/lc-components/Drawer/meta.json +242 -131
- package/es/lowcode/view/lc-components/FieldColor/meta.json +157 -157
- package/es/lowcode/view/lc-components/FieldComplex/meta.json +140 -133
- package/es/lowcode/view/lc-components/FieldDate/meta.json +141 -139
- package/es/lowcode/view/lc-components/FieldDict/meta.json +138 -138
- package/es/lowcode/view/lc-components/FieldEditor/meta.json +138 -138
- package/es/lowcode/view/lc-components/FieldGroup/meta.json +167 -167
- package/es/lowcode/view/lc-components/FieldNumber/meta.json +143 -142
- package/es/lowcode/view/lc-components/FieldRadio/meta.json +115 -115
- package/es/lowcode/view/lc-components/FieldRegion/meta.json +121 -121
- package/es/lowcode/view/lc-components/FieldSelect/meta.json +152 -152
- package/es/lowcode/view/lc-components/FieldString/meta.json +152 -152
- package/es/lowcode/view/lc-components/FieldSwitch/meta.json +125 -125
- package/es/lowcode/view/lc-components/FieldTextarea/meta.json +143 -143
- package/es/lowcode/view/lc-components/FieldUpload/meta.json +165 -165
- package/es/lowcode/view/lc-components/FieldUser/meta.json +176 -176
- package/es/lowcode/view/lc-components/FieldYear/meta.json +129 -129
- package/es/lowcode/view/lc-components/Form/FunctionDesign.js +2 -1
- package/es/lowcode/view/lc-components/Form/index.js +76 -51
- package/es/lowcode/view/lc-components/Form/meta.json +645 -610
- package/es/lowcode/view/lc-components/GroupTree/FunctionDesign.js +10 -0
- package/es/lowcode/view/lc-components/GroupTree/FunctionLive.js +10 -0
- package/es/lowcode/view/lc-components/GroupTree/FunctionPreview.js +10 -0
- package/es/lowcode/view/lc-components/GroupTree/index.js +201 -0
- package/es/lowcode/view/lc-components/GroupTree/meta.json +89 -0
- package/es/lowcode/view/lc-components/Iframe/meta.json +33 -32
- package/es/lowcode/view/lc-components/ImEx/index.js +199 -128
- package/es/lowcode/view/lc-components/ImEx/index.less +7 -7
- package/es/lowcode/view/lc-components/ImEx/meta.json +134 -113
- package/es/lowcode/view/lc-components/Image/meta.json +115 -114
- package/es/lowcode/view/lc-components/JSX/RuntimeComp.js +4 -4
- package/es/lowcode/view/lc-components/JSX/meta.json +28 -28
- package/es/lowcode/view/lc-components/Layout/index.js +38 -21
- 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/meta.json +113 -112
- package/es/lowcode/view/lc-components/Page/meta.json +61 -55
- package/es/lowcode/view/lc-components/PageContent/meta.json +9 -9
- package/es/lowcode/view/lc-components/PageFooter/meta.json +9 -9
- package/es/lowcode/view/lc-components/PageHeader/meta.json +9 -9
- package/es/lowcode/view/lc-components/PageLayout/FunctionDesign.js +5 -1
- package/es/lowcode/view/lc-components/PageLayout/meta.json +59 -59
- package/es/lowcode/view/lc-components/Section/index.js +2 -6
- package/es/lowcode/view/lc-components/Section/index.less +7 -7
- package/es/lowcode/view/lc-components/Section/meta.json +108 -107
- package/es/lowcode/view/lc-components/Split/index.js +19 -4
- package/es/lowcode/view/lc-components/Split/meta.json +53 -53
- package/es/lowcode/view/lc-components/Table/index.js +175 -148
- package/es/lowcode/view/lc-components/Table/meta.json +450 -450
- package/es/lowcode/view/lc-components/Tabs/index.js +42 -39
- package/es/lowcode/view/lc-components/Tabs/meta.json +113 -113
- package/es/lowcode/view/lc-components/Text/index.js +9 -2
- package/es/lowcode/view/lc-components/Text/meta.json +56 -56
- package/es/lowcode/view/lc-components/Tree/index.js +102 -107
- package/es/lowcode/view/lc-components/Tree/index.less +4 -4
- package/es/lowcode/view/lc-components/Tree/meta.json +357 -357
- package/es/lowcode/view/lc-components/Wrapper.js +17 -2
- package/es/lowcode/view/style/canvas.less +5 -5
- package/es/lowcode/view/style/loading.less +98 -84
- package/es/lowcode/view/style/page.less +7 -7
- package/es/services.js +19 -0
- package/es/upload/FilesWall/index.js +13 -13
- package/es/upload/FilesWall/index.less +74 -74
- package/es/upload/Form/gridForm.js +17 -7
- package/es/upload/Form/index.less +7 -7
- package/es/upload/FormItem/index.js +18 -18
- package/es/utils/form.js +25 -25
- package/es/utils/grid.js +5 -4
- package/lib/components/Builder/index.js +13 -1
- package/lib/components/ComplexItem/index.js +62 -47
- package/lib/components/LDActions/index.less +68 -68
- package/lib/components/LdAutoForm/index.js +5 -3
- package/lib/components/LdFormList/index.js +12 -11
- package/lib/components/LdGrid/index.js +4 -4
- package/lib/components/LdGridForm/index.js +40 -23
- package/lib/components/LdGridForm/index.less +7 -7
- package/lib/components/LdTree/index.less +40 -40
- package/lib/helper/action.js +6 -6
- package/lib/helper/form.js +15 -14
- package/lib/helper/index.less +7 -7
- package/lib/helper/ldBuilder.js +8 -3
- package/lib/locales/zh-CN.js +41 -4
- package/lib/lowcode/constants/api-url.js +87 -87
- package/lib/lowcode/constants/event-topics.js +1 -3
- package/lib/lowcode/engine/launcher.js +3 -1
- package/lib/lowcode/engine/meta/box.props.json +3 -3
- package/lib/lowcode/engine/meta/button.props.default.json +1 -1
- package/lib/lowcode/engine/meta/button.props.json +2 -2
- package/lib/lowcode/engine/meta/cardlist.props.default.json +1 -0
- package/lib/lowcode/engine/meta/cardlist.props.json +2 -1
- package/lib/lowcode/engine/meta/components-list.json +6 -126
- package/lib/lowcode/engine/meta/dialog.props.default.json +4 -2
- package/lib/lowcode/engine/meta/dialog.props.json +76 -20
- package/lib/lowcode/engine/meta/drawer.props.default.json +15 -4
- package/lib/lowcode/engine/meta/drawer.props.json +144 -24
- package/lib/lowcode/engine/meta/fieldcomplex.props.default.json +1 -0
- package/lib/lowcode/engine/meta/fieldcomplex.props.json +7 -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 +2 -0
- package/lib/lowcode/engine/meta/fielddate.props.json +4 -2
- package/lib/lowcode/engine/meta/fieldnumber.props.default.json +1 -0
- package/lib/lowcode/engine/meta/fieldnumber.props.json +3 -2
- package/lib/lowcode/engine/meta/fielduser.props.default.json +1 -1
- package/lib/lowcode/engine/meta/fielduser.props.json +1 -1
- package/lib/lowcode/engine/meta/form.props.default.json +14 -4
- package/lib/lowcode/engine/meta/form.props.json +53 -14
- package/lib/lowcode/engine/meta/grouptree.props.default.json +16 -0
- package/lib/lowcode/engine/meta/grouptree.props.json +89 -0
- package/lib/lowcode/engine/meta/iframe.props.default.json +2 -1
- package/lib/lowcode/engine/meta/iframe.props.json +3 -2
- package/lib/lowcode/engine/meta/image.props.default.json +2 -1
- package/lib/lowcode/engine/meta/image.props.json +3 -2
- package/lib/lowcode/engine/meta/imex.props.default.json +2 -1
- package/lib/lowcode/engine/meta/imex.props.json +27 -6
- package/lib/lowcode/engine/meta/js-editor/auto-complete.json +65 -42
- package/lib/lowcode/engine/meta/jsx.props.default.json +1 -1
- package/lib/lowcode/engine/meta/jsx.props.json +1 -1
- package/lib/lowcode/engine/meta/layout.props.default.json +1 -1
- package/lib/lowcode/engine/meta/layout.props.json +5 -5
- package/lib/lowcode/engine/meta/link.props.default.json +2 -1
- package/lib/lowcode/engine/meta/link.props.json +3 -2
- package/lib/lowcode/engine/meta/page.props.json +6 -0
- package/lib/lowcode/engine/meta/pagelayout.props.default.json +1 -1
- package/lib/lowcode/engine/meta/pagelayout.props.json +1 -1
- package/lib/lowcode/engine/meta/section.props.json +2 -1
- package/lib/lowcode/engine/meta/split.props.default.json +1 -1
- package/lib/lowcode/engine/meta/split.props.json +1 -1
- package/lib/lowcode/engine/meta/table.props.json +3 -3
- package/lib/lowcode/engine/meta/text.props.default.json +4 -2
- package/lib/lowcode/engine/meta/text.props.json +8 -6
- package/lib/lowcode/engine/meta/tree.props.json +2 -2
- package/lib/lowcode/engine/provider/ContextProvider/index.js +81 -64
- package/lib/lowcode/engine/provider/ContextProvider/router.js +57 -0
- package/lib/lowcode/engine/{tools → provider/ContextProvider}/usePageDataStore.js +9 -7
- package/lib/lowcode/engine/provider/ContextProvider/usePageVar.js +38 -16
- package/lib/lowcode/engine/{tools → provider/ContextProvider}/useTodo.js +5 -7
- package/lib/lowcode/engine/provider/ContextProvider/utils.js +170 -0
- package/lib/lowcode/engine/provider/RemoteSourceProvider.js +2 -3
- package/lib/lowcode/engine/tools/dataProcess.js +76 -76
- package/lib/lowcode/engine/tools/helper.js +29 -2
- package/lib/lowcode/engine/tools/initDS.js +270 -0
- package/lib/lowcode/engine/tools/useCanvasRender.js +13 -1
- package/lib/lowcode/engine/tools/useCombinedRefs.js +2 -1
- package/lib/lowcode/painter/Components.js +2 -2
- package/lib/lowcode/painter/Design.js +1 -0
- package/lib/lowcode/painter/DesignOperator.js +24 -10
- package/lib/lowcode/painter/Panel.js +2 -2
- package/lib/lowcode/painter/components/AdvancePanel.js +3 -3
- package/lib/lowcode/painter/components/Collapse.js +31 -28
- 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 +29 -29
- package/lib/lowcode/painter/components/PanelItem.js +24 -24
- package/lib/lowcode/painter/components/PopConfirm.js +8 -8
- package/lib/lowcode/painter/components/PopForm.js +27 -27
- package/lib/lowcode/painter/components/RuleInput.js +30 -30
- package/lib/lowcode/painter/components/SortBox.js +22 -22
- package/lib/lowcode/painter/components/TipIcon.js +23 -0
- package/lib/lowcode/painter/components/VarEditor.js +463 -0
- 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 +25 -25
- package/lib/lowcode/painter/components/code-editor/JSEditor.js +23 -21
- package/lib/lowcode/painter/components/code-editor/JsonEditor.js +25 -25
- package/lib/lowcode/painter/components/code-editor/VisionEditor.js +88 -0
- package/lib/lowcode/painter/components/field-setting/SettingUI.js +46 -4
- package/lib/lowcode/painter/components/field-setting/index.js +27 -13
- package/lib/lowcode/painter/components/field-setting/meta/frontRules.js +2 -1
- package/lib/lowcode/painter/index.js +1 -0
- package/lib/lowcode/painter/panel-section/BlockEditor/index.js +19 -5
- package/lib/lowcode/painter/panel-section/BlocksEditor/index.js +2 -2
- package/lib/lowcode/painter/panel-section/ComplexPop.js +250 -0
- package/lib/lowcode/painter/panel-section/DataSetSelector.js +8 -0
- package/lib/lowcode/painter/panel-section/FieldsSetting.js +30 -4
- package/lib/lowcode/painter/panel-section/GroupClassSelector.js +63 -0
- package/lib/lowcode/painter/panel-section/I18nInput.js +4 -2
- package/lib/lowcode/painter/panel-section/Icon.js +31 -26
- package/lib/lowcode/painter/panel-section/IconConditionSelector.js +6 -6
- package/lib/lowcode/painter/panel-section/IconSelector.js +17 -17
- package/lib/lowcode/painter/panel-section/ImpExp.js +0 -26
- package/lib/lowcode/painter/panel-section/ImpExpAlone.js +0 -1
- package/lib/lowcode/painter/panel-section/LayoutRatio.js +22 -21
- package/lib/lowcode/painter/panel-section/PageVars.js +308 -0
- 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 +6 -5
- package/lib/lowcode/painter/panel-section/StylePanel/StyleRow.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/WidthHeight.js +2 -2
- package/lib/lowcode/painter/panel-section/StylePanel/index.js +15 -15
- package/lib/lowcode/painter/panel-section/TabItems.js +6 -42
- package/lib/lowcode/painter/panel-section/TextContent.js +87 -0
- package/lib/lowcode/painter/services/complexPop.js +28 -0
- 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 +166 -160
- 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/page-vars.less +25 -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 -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/preview/index.js +1 -0
- package/lib/lowcode/view/Canvas.js +24 -22
- package/lib/lowcode/view/Loading.js +5 -7
- package/lib/lowcode/view/Page.js +35 -13
- package/lib/lowcode/view/index.js +1 -0
- package/lib/lowcode/view/lc-components/Box/index.js +21 -6
- 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 +38 -38
- 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 +154 -153
- package/lib/lowcode/view/lc-components/Dialog/FunctionDesign.js +13 -5
- package/lib/lowcode/view/lc-components/Dialog/index.js +34 -25
- package/lib/lowcode/view/lc-components/Dialog/index.less +12 -8
- package/lib/lowcode/view/lc-components/Dialog/meta.json +204 -150
- package/lib/lowcode/view/lc-components/Drawer/FunctionDesign.js +52 -8
- package/lib/lowcode/view/lc-components/Drawer/index.js +148 -33
- package/lib/lowcode/view/lc-components/Drawer/index.less +13 -10
- package/lib/lowcode/view/lc-components/Drawer/meta.json +242 -131
- package/lib/lowcode/view/lc-components/FieldColor/meta.json +157 -157
- package/lib/lowcode/view/lc-components/FieldComplex/meta.json +140 -133
- package/lib/lowcode/view/lc-components/FieldDate/meta.json +141 -139
- package/lib/lowcode/view/lc-components/FieldDict/meta.json +138 -138
- package/lib/lowcode/view/lc-components/FieldEditor/meta.json +138 -138
- package/lib/lowcode/view/lc-components/FieldGroup/meta.json +167 -167
- package/lib/lowcode/view/lc-components/FieldNumber/meta.json +143 -142
- package/lib/lowcode/view/lc-components/FieldRadio/meta.json +115 -115
- package/lib/lowcode/view/lc-components/FieldRegion/meta.json +121 -121
- package/lib/lowcode/view/lc-components/FieldSelect/meta.json +152 -152
- package/lib/lowcode/view/lc-components/FieldString/meta.json +152 -152
- package/lib/lowcode/view/lc-components/FieldSwitch/meta.json +125 -125
- package/lib/lowcode/view/lc-components/FieldTextarea/meta.json +143 -143
- package/lib/lowcode/view/lc-components/FieldUpload/meta.json +165 -165
- package/lib/lowcode/view/lc-components/FieldUser/meta.json +176 -176
- package/lib/lowcode/view/lc-components/FieldYear/meta.json +129 -129
- package/lib/lowcode/view/lc-components/Form/FunctionDesign.js +2 -1
- package/lib/lowcode/view/lc-components/Form/index.js +75 -50
- package/lib/lowcode/view/lc-components/Form/meta.json +645 -610
- package/lib/lowcode/view/lc-components/GroupTree/FunctionDesign.js +17 -0
- package/lib/lowcode/view/lc-components/GroupTree/FunctionLive.js +17 -0
- package/lib/lowcode/view/lc-components/GroupTree/FunctionPreview.js +17 -0
- package/lib/lowcode/view/lc-components/GroupTree/index.js +209 -0
- package/lib/lowcode/view/lc-components/GroupTree/meta.json +89 -0
- package/lib/lowcode/view/lc-components/Iframe/meta.json +33 -32
- package/lib/lowcode/view/lc-components/ImEx/index.js +197 -126
- package/lib/lowcode/view/lc-components/ImEx/index.less +7 -7
- package/lib/lowcode/view/lc-components/ImEx/meta.json +134 -113
- package/lib/lowcode/view/lc-components/Image/meta.json +115 -114
- package/lib/lowcode/view/lc-components/JSX/RuntimeComp.js +4 -4
- package/lib/lowcode/view/lc-components/JSX/meta.json +28 -28
- package/lib/lowcode/view/lc-components/Layout/index.js +37 -20
- 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/meta.json +113 -112
- package/lib/lowcode/view/lc-components/Page/meta.json +61 -55
- package/lib/lowcode/view/lc-components/PageContent/meta.json +9 -9
- package/lib/lowcode/view/lc-components/PageFooter/meta.json +9 -9
- package/lib/lowcode/view/lc-components/PageHeader/meta.json +9 -9
- package/lib/lowcode/view/lc-components/PageLayout/FunctionDesign.js +5 -1
- package/lib/lowcode/view/lc-components/PageLayout/meta.json +59 -59
- package/lib/lowcode/view/lc-components/Section/index.js +2 -6
- package/lib/lowcode/view/lc-components/Section/index.less +7 -7
- package/lib/lowcode/view/lc-components/Section/meta.json +108 -107
- package/lib/lowcode/view/lc-components/Split/index.js +18 -3
- package/lib/lowcode/view/lc-components/Split/meta.json +53 -53
- package/lib/lowcode/view/lc-components/Table/index.js +176 -149
- package/lib/lowcode/view/lc-components/Table/meta.json +450 -450
- package/lib/lowcode/view/lc-components/Tabs/index.js +40 -37
- package/lib/lowcode/view/lc-components/Tabs/meta.json +113 -113
- package/lib/lowcode/view/lc-components/Text/index.js +8 -1
- package/lib/lowcode/view/lc-components/Text/meta.json +56 -56
- package/lib/lowcode/view/lc-components/Tree/index.js +102 -107
- package/lib/lowcode/view/lc-components/Tree/index.less +4 -4
- package/lib/lowcode/view/lc-components/Tree/meta.json +357 -357
- package/lib/lowcode/view/lc-components/Wrapper.js +16 -1
- package/lib/lowcode/view/style/canvas.less +5 -5
- package/lib/lowcode/view/style/loading.less +98 -84
- package/lib/lowcode/view/style/page.less +7 -7
- package/lib/services.js +20 -0
- package/lib/upload/FilesWall/index.js +13 -13
- package/lib/upload/FilesWall/index.less +74 -74
- package/lib/upload/Form/gridForm.js +17 -7
- package/lib/upload/Form/index.less +7 -7
- package/lib/upload/FormItem/index.js +18 -18
- package/lib/utils/form.js +24 -24
- package/lib/utils/grid.js +4 -3
- package/lowcode.js +1 -1
- package/package.json +175 -175
- package/upload.js +1 -1
- package/utils.js +1 -1
- package/es/lowcode/view/lc-components/Form/index.less +0 -5
- package/lib/lowcode/view/lc-components/Form/index.less +0 -5
package/es/utils/form.js
CHANGED
|
@@ -12,17 +12,17 @@ var _excluded = ["comName", "property"],
|
|
|
12
12
|
_excluded9 = ["type", "name"];
|
|
13
13
|
import React from 'react';
|
|
14
14
|
import moment from 'moment';
|
|
15
|
-
import { capitalize, merge, transform, isArray, omit, isNil, clone } from 'lodash';
|
|
15
|
+
import { capitalize, merge, transform, isArray, omit, isNil, clone, cloneDeep } from 'lodash';
|
|
16
16
|
import api from "@/services/ApiConfig";
|
|
17
17
|
import { defaultComName, translator, splitStrToObj, formatCustomProps } from "../helper/form";
|
|
18
18
|
import { getColumnRender } from "./grid";
|
|
19
19
|
import * as formItemUtils from "../helper/FromItems";
|
|
20
20
|
|
|
21
|
-
/**
|
|
22
|
-
* 根据动态表单配置项生成formItem
|
|
23
|
-
* @param {动态表单配置项} props
|
|
24
|
-
* @param {自定义动态表单配置项} customProps
|
|
25
|
-
* @returns <BasicForm name='' ... />
|
|
21
|
+
/**
|
|
22
|
+
* 根据动态表单配置项生成formItem
|
|
23
|
+
* @param {动态表单配置项} props
|
|
24
|
+
* @param {自定义动态表单配置项} customProps
|
|
25
|
+
* @returns <BasicForm name='' ... />
|
|
26
26
|
*/
|
|
27
27
|
export function getFormItem() {
|
|
28
28
|
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
@@ -31,7 +31,7 @@ export function getFormItem() {
|
|
|
31
31
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
32
32
|
var customProps = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
33
33
|
if (!property) return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
34
|
-
if (property === 'sint' || property === 'number') props.opt_decimal = 0;
|
|
34
|
+
if (property === 'sint' || property === 'number' || property === 'long') props.opt_decimal = 0;
|
|
35
35
|
var comType = comName || defaultComName[property];
|
|
36
36
|
var _translator = translator(props),
|
|
37
37
|
name = _translator.name,
|
|
@@ -56,16 +56,16 @@ export function getFormItem() {
|
|
|
56
56
|
}));
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
-
/**
|
|
60
|
-
* 根据后端返回数据组装表单数据
|
|
61
|
-
* @param {数组---动态表单配置参数列表} propsList
|
|
62
|
-
* @param {对象---后端返回的未处理数据} values
|
|
63
|
-
* @returns
|
|
59
|
+
/**
|
|
60
|
+
* 根据后端返回数据组装表单数据
|
|
61
|
+
* @param {数组---动态表单配置参数列表} propsList
|
|
62
|
+
* @param {对象---后端返回的未处理数据} values
|
|
63
|
+
* @returns
|
|
64
64
|
*/
|
|
65
65
|
export var formItemDataFormat = function formItemDataFormat() {
|
|
66
66
|
var propsList = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
67
67
|
var values = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
68
|
-
var omitValues =
|
|
68
|
+
var omitValues = cloneDeep(values);
|
|
69
69
|
var data = transform(propsList, function (result, n) {
|
|
70
70
|
var _ref2 = n || {},
|
|
71
71
|
comName = _ref2.comName,
|
|
@@ -125,16 +125,16 @@ export var formItemDataFormat = function formItemDataFormat() {
|
|
|
125
125
|
default:
|
|
126
126
|
if (!isNil(values["".concat(name, "_virtual")] || values[name])) result[name] = values["".concat(name, "_virtual")] || values[name];
|
|
127
127
|
}
|
|
128
|
-
omitValues = omit(
|
|
128
|
+
omitValues = omit(omitValues, [name, "".concat(name, "_virtual")]);
|
|
129
129
|
}, {});
|
|
130
130
|
return _objectSpread(_objectSpread({}, omitValues), data);
|
|
131
131
|
};
|
|
132
132
|
|
|
133
|
-
/**
|
|
134
|
-
* 数据格式化
|
|
135
|
-
* @param {数组---动态表单配置参数列表} propsList
|
|
136
|
-
* @param {对象---表单获取到的未处理数据} values
|
|
137
|
-
* @returns
|
|
133
|
+
/**
|
|
134
|
+
* 数据格式化
|
|
135
|
+
* @param {数组---动态表单配置参数列表} propsList
|
|
136
|
+
* @param {对象---表单获取到的未处理数据} values
|
|
137
|
+
* @returns
|
|
138
138
|
*/
|
|
139
139
|
export var dataFormat = function dataFormat() {
|
|
140
140
|
var propsList = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
@@ -199,12 +199,12 @@ export var dataFormat = function dataFormat() {
|
|
|
199
199
|
return _objectSpread(_objectSpread({}, values), data);
|
|
200
200
|
};
|
|
201
201
|
|
|
202
|
-
/**
|
|
203
|
-
*
|
|
204
|
-
* @param formType
|
|
205
|
-
* @param props
|
|
206
|
-
* @param customProps
|
|
207
|
-
* @returns {*&{field: *, editable: (false|{required: *}), renderBasicFormItem: ((function(): (*))|*), title, render: *}}
|
|
202
|
+
/**
|
|
203
|
+
*
|
|
204
|
+
* @param formType
|
|
205
|
+
* @param props
|
|
206
|
+
* @param customProps
|
|
207
|
+
* @returns {*&{field: *, editable: (false|{required: *}), renderBasicFormItem: ((function(): (*))|*), title, render: *}}
|
|
208
208
|
*/
|
|
209
209
|
export var getFormColumn = function getFormColumn() {
|
|
210
210
|
var _props$config;
|
package/es/utils/grid.js
CHANGED
|
@@ -6,7 +6,7 @@ var _excluded = ["comName", "property"],
|
|
|
6
6
|
_excluded3 = ["filter", "filterParams"];
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import { getDvaApp } from 'umi';
|
|
9
|
-
import { merge, isNil, isArray, includes, capitalize, isString } from 'lodash';
|
|
9
|
+
import { merge, isNil, isArray, includes, capitalize, isString, isObject } from 'lodash';
|
|
10
10
|
import { Switch, Tag } from 'luck-design/antd';
|
|
11
11
|
import moment from 'moment';
|
|
12
12
|
import UploadGridCell from "../upload/GridCell";
|
|
@@ -38,19 +38,20 @@ export function getColumnRender(name, type) {
|
|
|
38
38
|
break;
|
|
39
39
|
case 'year':
|
|
40
40
|
render = function render(text) {
|
|
41
|
-
return text;
|
|
41
|
+
return moment.isMoment(text) ? text.format('YYYY') : text;
|
|
42
42
|
};
|
|
43
43
|
break;
|
|
44
44
|
case 'user':
|
|
45
45
|
case 'select':
|
|
46
46
|
case 'group':
|
|
47
47
|
case 'complex':
|
|
48
|
+
case 'dict':
|
|
48
49
|
render = function render(text, record) {
|
|
49
|
-
if (record["".concat(name, "_virtual")]) return record["".concat(name, "_virtual")];
|
|
50
50
|
if (isArray(text)) return text.map(function (i) {
|
|
51
51
|
return i.label;
|
|
52
52
|
}).join(',');
|
|
53
|
-
if (
|
|
53
|
+
if (isObject(text)) return text.label;
|
|
54
|
+
if (record["".concat(name, "_virtual")]) return record["".concat(name, "_virtual")];
|
|
54
55
|
};
|
|
55
56
|
break;
|
|
56
57
|
case 'switch':
|
|
@@ -13,10 +13,12 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/sli
|
|
|
13
13
|
var _react = _interopRequireWildcard(require("react"));
|
|
14
14
|
var _ahooks = require("ahooks");
|
|
15
15
|
var _luckDesign = require("luck-design");
|
|
16
|
+
var _utils = require("@luck-design-biz/base/utils");
|
|
17
|
+
var _constants = require("../../lowcode/constants");
|
|
18
|
+
var _helper = require("../../lowcode/engine/tools/helper");
|
|
16
19
|
var _LdPop = _interopRequireDefault(require("../LdPop"));
|
|
17
20
|
var _services = require("../../services");
|
|
18
21
|
var _action2 = require("../../helper/action");
|
|
19
|
-
var _utils = require("@luck-design-biz/base/utils");
|
|
20
22
|
var LuckDaContext = exports.LuckDaContext = /*#__PURE__*/(0, _react.createContext)();
|
|
21
23
|
var useLDCtx = exports.useLDCtx = function useLDCtx() {
|
|
22
24
|
return (0, _react.useContext)(LuckDaContext);
|
|
@@ -36,6 +38,16 @@ var builder = function builder(WrappedComponent, moduleCode) {
|
|
|
36
38
|
pops = _useSetState2[0],
|
|
37
39
|
setPops = _useSetState2[1];
|
|
38
40
|
var fieldProps = (0, _react.useRef)({});
|
|
41
|
+
(0, _react.useEffect)(function () {
|
|
42
|
+
(0, _helper.setMetaAttrs)(_constants.LC_RUNTIME_KEY, 'live');
|
|
43
|
+
(0, _services.noAuthTransformCode)({
|
|
44
|
+
code: moduleCode
|
|
45
|
+
}).then(function (res) {
|
|
46
|
+
var code = res.code,
|
|
47
|
+
data = res.data;
|
|
48
|
+
if (code === 1) (0, _helper.setMetaAttrs)(_constants.META_TAG_NAME, data);
|
|
49
|
+
});
|
|
50
|
+
}, []);
|
|
39
51
|
var _useRequest = (0, _ahooks.useRequest)(_services.readModlue, {
|
|
40
52
|
defaultParams: [{
|
|
41
53
|
moduleCode: moduleCode
|
|
@@ -7,24 +7,25 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
});
|
|
8
8
|
exports.default = void 0;
|
|
9
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
|
-
var
|
|
11
|
-
var
|
|
12
|
-
var
|
|
10
|
+
var _regeneratorRuntime2 = _interopRequireDefault(require("@babel/runtime/helpers/regeneratorRuntime"));
|
|
11
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
12
|
+
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
13
13
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
14
14
|
var _react = _interopRequireWildcard(require("react"));
|
|
15
|
-
var
|
|
15
|
+
var _ahooks = require("ahooks");
|
|
16
16
|
var _antd = require("luck-design/antd");
|
|
17
17
|
var _lodash = require("lodash");
|
|
18
18
|
var _base = require("@luck-design-biz/base");
|
|
19
19
|
var _utils = require("@luck-design-biz/base/utils");
|
|
20
|
-
var _luckDesign = require("luck-design");
|
|
21
|
-
var _ApiConfig = _interopRequireDefault(require("@/services/ApiConfig"));
|
|
22
20
|
var _service = require("./service");
|
|
23
|
-
var _excluded = ["
|
|
21
|
+
var _excluded = ["showPop"],
|
|
22
|
+
_excluded2 = ["wrapperRef", "config", "renderInfoMode", "complexConfig"];
|
|
24
23
|
var Index = function Index(_ref) {
|
|
25
24
|
var wrapperRef = _ref.wrapperRef,
|
|
26
25
|
_ref$config = _ref.config,
|
|
27
|
-
|
|
26
|
+
_ref$config2 = _ref$config === void 0 ? {} : _ref$config,
|
|
27
|
+
showPop = _ref$config2.showPop,
|
|
28
|
+
config = (0, _objectWithoutProperties2.default)(_ref$config2, _excluded),
|
|
28
29
|
renderInfoMode = _ref.renderInfoMode,
|
|
29
30
|
_ref$complexConfig = _ref.complexConfig,
|
|
30
31
|
_ref$complexConfig$is = _ref$complexConfig.isTree,
|
|
@@ -34,49 +35,58 @@ var Index = function Index(_ref) {
|
|
|
34
35
|
dataSetCode = _ref$complexConfig.dataSetCode,
|
|
35
36
|
keyField = _ref$complexConfig.keyField,
|
|
36
37
|
valueField = _ref$complexConfig.valueField,
|
|
37
|
-
props = (0, _objectWithoutProperties2.default)(_ref,
|
|
38
|
-
var
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
setDataSource = _useState2[1];
|
|
42
|
-
var handleFocus = function handleFocus() {
|
|
43
|
-
if (!dataSource || dataSource.length === 0) {
|
|
44
|
-
(0, _service.fetchContent)(dataModel, {
|
|
45
|
-
datasetCode: dataSetCode,
|
|
46
|
-
moduleCode: moduleCode
|
|
47
|
-
}).then(function (res) {
|
|
48
|
-
var code = res.code,
|
|
49
|
-
data = res.data;
|
|
50
|
-
if (code === 1) {
|
|
51
|
-
var formatData = data.map(function (i) {
|
|
52
|
-
return (0, _objectSpread3.default)((0, _objectSpread3.default)({}, i), {}, {
|
|
53
|
-
key: i[keyField],
|
|
54
|
-
value: i[keyField],
|
|
55
|
-
label: valueField.length > 0 ? valueField.split(',').map(function (val) {
|
|
56
|
-
return i[val];
|
|
57
|
-
}).join('-') : '',
|
|
58
|
-
title: valueField.length > 0 ? valueField.split(',').map(function (val) {
|
|
59
|
-
return i[val];
|
|
60
|
-
}).join('-') : ''
|
|
61
|
-
});
|
|
62
|
-
});
|
|
63
|
-
if (isTree) {
|
|
64
|
-
setDataSource((0, _utils.dataToTree)(formatData, null, 'uid', 'parent_uid'));
|
|
65
|
-
} else setDataSource(formatData);
|
|
66
|
-
}
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
};
|
|
38
|
+
props = (0, _objectWithoutProperties2.default)(_ref, _excluded2);
|
|
39
|
+
var Selector = (0, _ahooks.useCreation)(function () {
|
|
40
|
+
return isTree ? _base.TreeSelector : _base.GridSelector;
|
|
41
|
+
}, [isTree]);
|
|
70
42
|
return renderInfoMode ? renderInfoMode(function (value) {
|
|
71
43
|
return (config.multiple || config.mode === 'multiple') && (0, _lodash.isArray)(value) ? value.map(function (item) {
|
|
72
44
|
return /*#__PURE__*/_react.default.createElement(_antd.Tag, {
|
|
73
45
|
key: item.key
|
|
74
46
|
}, item.label || item.value || item.key);
|
|
75
47
|
}) : /*#__PURE__*/_react.default.createElement("span", null, value.label || value.value || value.key);
|
|
76
|
-
}) : /*#__PURE__*/_react.default.createElement(
|
|
77
|
-
|
|
48
|
+
}) : /*#__PURE__*/_react.default.createElement(Selector, (0, _extends2.default)({}, props, {
|
|
49
|
+
keyName: keyField,
|
|
50
|
+
titleKey: "title",
|
|
51
|
+
api: ( /*#__PURE__*/function () {
|
|
52
|
+
var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee(get) {
|
|
53
|
+
var res, formatData, detail;
|
|
54
|
+
return (0, _regeneratorRuntime2.default)().wrap(function _callee$(_context) {
|
|
55
|
+
while (1) switch (_context.prev = _context.next) {
|
|
56
|
+
case 0:
|
|
57
|
+
_context.next = 2;
|
|
58
|
+
return (0, _service.fetchContent)(dataModel, (0, _objectSpread2.default)({
|
|
59
|
+
datasetCode: dataSetCode,
|
|
60
|
+
moduleCode: moduleCode
|
|
61
|
+
}, get));
|
|
62
|
+
case 2:
|
|
63
|
+
res = _context.sent;
|
|
64
|
+
formatData = (res === null || res === void 0 ? void 0 : res.data.map(function (i) {
|
|
65
|
+
return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, i), {}, {
|
|
66
|
+
title: valueField.length > 0 ? valueField.split(',').map(function (val) {
|
|
67
|
+
return i[val];
|
|
68
|
+
}).join('-') : ''
|
|
69
|
+
});
|
|
70
|
+
})) || [];
|
|
71
|
+
detail = (0, _lodash.keyBy)(formatData, window.appConfig.constraintKeys.PRIMARY);
|
|
72
|
+
return _context.abrupt("return", (0, _objectSpread2.default)((0, _objectSpread2.default)({}, res), {}, {
|
|
73
|
+
list: Object.keys(detail),
|
|
74
|
+
detail: detail
|
|
75
|
+
}));
|
|
76
|
+
case 6:
|
|
77
|
+
case "end":
|
|
78
|
+
return _context.stop();
|
|
79
|
+
}
|
|
80
|
+
}, _callee);
|
|
81
|
+
}));
|
|
82
|
+
return function (_x) {
|
|
83
|
+
return _ref2.apply(this, arguments);
|
|
84
|
+
};
|
|
85
|
+
}()),
|
|
78
86
|
ref: wrapperRef,
|
|
79
|
-
|
|
87
|
+
max: config.multiple || config.mode === 'multiple' ? 0 : 1,
|
|
88
|
+
noAddon: !(showPop !== null && showPop !== void 0 && showPop.show),
|
|
89
|
+
config: (0, _objectSpread2.default)((0, _objectSpread2.default)({
|
|
80
90
|
required: false,
|
|
81
91
|
placeholder: (0, _utils.formatMessage)({
|
|
82
92
|
id: 'app.base.tip.select'
|
|
@@ -84,11 +94,16 @@ var Index = function Index(_ref) {
|
|
|
84
94
|
message: (0, _utils.formatMessage)({
|
|
85
95
|
id: 'app.base.tip.select'
|
|
86
96
|
})
|
|
87
|
-
}, config), {},
|
|
88
|
-
showSearch: true,
|
|
97
|
+
}, config), {}, {
|
|
89
98
|
optionFilterProp: 'title',
|
|
90
99
|
treeNodeFilterProp: 'label'
|
|
91
|
-
}
|
|
100
|
+
}),
|
|
101
|
+
selectorProps: {
|
|
102
|
+
columns: (showPop === null || showPop === void 0 ? void 0 : showPop.fields) || [],
|
|
103
|
+
resultColumns: ((showPop === null || showPop === void 0 ? void 0 : showPop.fields) || []).filter(function (i) {
|
|
104
|
+
return (0, _lodash.includes)(valueField.split(','), i.field);
|
|
105
|
+
})
|
|
106
|
+
}
|
|
92
107
|
}));
|
|
93
108
|
};
|
|
94
109
|
var RefCom = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
@@ -1,68 +1,68 @@
|
|
|
1
|
-
@spanDefault: #262626;
|
|
2
|
-
@spanPrimary: var(--ant-primary-color);
|
|
3
|
-
@spanDanger: #ff4d4f;
|
|
4
|
-
@spanDestroy: #820014;
|
|
5
|
-
|
|
6
|
-
.ldActions {
|
|
7
|
-
|
|
8
|
-
button:not(:last-child) {
|
|
9
|
-
margin-right: 4px;
|
|
10
|
-
}
|
|
11
|
-
button:not(:first-child) {
|
|
12
|
-
margin-left: 4px;
|
|
13
|
-
}
|
|
14
|
-
span {
|
|
15
|
-
cursor: pointer;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
button.default {
|
|
19
|
-
background-color: white;
|
|
20
|
-
}
|
|
21
|
-
span.default {
|
|
22
|
-
color: @spanDefault;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
button.primary {
|
|
26
|
-
background-color: var(--ant-primary-color);
|
|
27
|
-
border-color: var(--ant-primary-color);
|
|
28
|
-
color: white;
|
|
29
|
-
}
|
|
30
|
-
span.primary {
|
|
31
|
-
color: @spanPrimary;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
button.danger {
|
|
35
|
-
background-color: #ff4d4f;
|
|
36
|
-
border-color: #ff4d4f;
|
|
37
|
-
color: white;
|
|
38
|
-
}
|
|
39
|
-
span.danger {
|
|
40
|
-
color: @spanDanger;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
button.destroy {
|
|
44
|
-
background-color: #820014;
|
|
45
|
-
border-color: #820014;
|
|
46
|
-
color: white;
|
|
47
|
-
}
|
|
48
|
-
span.destroy {
|
|
49
|
-
color: @spanDestroy;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
span.disabled {
|
|
53
|
-
color: #bfbfbf;
|
|
54
|
-
cursor: not-allowed;
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
span.default.menuItem {
|
|
58
|
-
color: @spanDefault;
|
|
59
|
-
}
|
|
60
|
-
span.primary.menuItem {
|
|
61
|
-
color: @spanPrimary;
|
|
62
|
-
}
|
|
63
|
-
span.danger.menuItem {
|
|
64
|
-
color: @spanDanger;
|
|
65
|
-
}
|
|
66
|
-
span.destroy.menuItem {
|
|
67
|
-
color: @spanDestroy;
|
|
68
|
-
}
|
|
1
|
+
@spanDefault: #262626;
|
|
2
|
+
@spanPrimary: var(--ant-primary-color);
|
|
3
|
+
@spanDanger: #ff4d4f;
|
|
4
|
+
@spanDestroy: #820014;
|
|
5
|
+
|
|
6
|
+
.ldActions {
|
|
7
|
+
|
|
8
|
+
button:not(:last-child) {
|
|
9
|
+
margin-right: 4px;
|
|
10
|
+
}
|
|
11
|
+
button:not(:first-child) {
|
|
12
|
+
margin-left: 4px;
|
|
13
|
+
}
|
|
14
|
+
span {
|
|
15
|
+
cursor: pointer;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
button.default {
|
|
19
|
+
background-color: white;
|
|
20
|
+
}
|
|
21
|
+
span.default {
|
|
22
|
+
color: @spanDefault;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
button.primary {
|
|
26
|
+
background-color: var(--ant-primary-color);
|
|
27
|
+
border-color: var(--ant-primary-color);
|
|
28
|
+
color: white;
|
|
29
|
+
}
|
|
30
|
+
span.primary {
|
|
31
|
+
color: @spanPrimary;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
button.danger {
|
|
35
|
+
background-color: #ff4d4f;
|
|
36
|
+
border-color: #ff4d4f;
|
|
37
|
+
color: white;
|
|
38
|
+
}
|
|
39
|
+
span.danger {
|
|
40
|
+
color: @spanDanger;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
button.destroy {
|
|
44
|
+
background-color: #820014;
|
|
45
|
+
border-color: #820014;
|
|
46
|
+
color: white;
|
|
47
|
+
}
|
|
48
|
+
span.destroy {
|
|
49
|
+
color: @spanDestroy;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
span.disabled {
|
|
53
|
+
color: #bfbfbf;
|
|
54
|
+
cursor: not-allowed;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
span.default.menuItem {
|
|
58
|
+
color: @spanDefault;
|
|
59
|
+
}
|
|
60
|
+
span.primary.menuItem {
|
|
61
|
+
color: @spanPrimary;
|
|
62
|
+
}
|
|
63
|
+
span.danger.menuItem {
|
|
64
|
+
color: @spanDanger;
|
|
65
|
+
}
|
|
66
|
+
span.destroy.menuItem {
|
|
67
|
+
color: @spanDestroy;
|
|
68
|
+
}
|
|
@@ -62,7 +62,8 @@ var buildLdAutoForm = function buildLdAutoForm(_ref) {
|
|
|
62
62
|
ticketData = _ref$ticketData === void 0 ? {} : _ref$ticketData,
|
|
63
63
|
_ref$relationKey = _ref.relationKey,
|
|
64
64
|
relationKey = _ref$relationKey === void 0 ? window.appConfig.constraintKeys.PRIMARY : _ref$relationKey,
|
|
65
|
-
fields = _ref.fields,
|
|
65
|
+
_ref$fields = _ref.fields,
|
|
66
|
+
fields = _ref$fields === void 0 ? [] : _ref$fields,
|
|
66
67
|
setVerifyRules = _ref.setVerifyRules,
|
|
67
68
|
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
68
69
|
var _ref2 = (0, _react.useContext)(_Builder.LuckDaContext) || {},
|
|
@@ -79,9 +80,10 @@ var buildLdAutoForm = function buildLdAutoForm(_ref) {
|
|
|
79
80
|
var col = columnsObj[key];
|
|
80
81
|
if ((setting === null || setting === void 0 ? void 0 : setting._type) === 'divider') {
|
|
81
82
|
result.push( /*#__PURE__*/_react.default.createElement(_luckDesign.BasicDivider, {
|
|
82
|
-
title: setting === null || setting === void 0 ? void 0 : setting.fieldAliasName
|
|
83
|
+
title: setting === null || setting === void 0 ? void 0 : setting.fieldAliasName,
|
|
84
|
+
key: key
|
|
83
85
|
}));
|
|
84
|
-
} else if (col !== null && col !== void 0 && col.isShowInForm && setting !== null && setting !== void 0 && setting.isShow) {
|
|
86
|
+
} else if (col !== null && col !== void 0 && col.isShowInForm && ((0, _lodash.isNil)(setting) || setting !== null && setting !== void 0 && setting.isShow)) {
|
|
85
87
|
var customFiled = filedsRewrite.find(function (_field) {
|
|
86
88
|
return _field.name === col.aliaName;
|
|
87
89
|
}) || {};
|
|
@@ -30,8 +30,8 @@ var _Builder = require("../Builder");
|
|
|
30
30
|
var _LdPop = require("../LdPop");
|
|
31
31
|
var _model = _interopRequireDefault(require("./model"));
|
|
32
32
|
var _action = require("../../helper/action");
|
|
33
|
-
var
|
|
34
|
-
var _excluded = ["namespace", "formState", "formMode", "formOperates", "loading", "apiRef", "wrapperRef", "readOnly", "mainFormLdId", "renderFormList", "renderAffixLeft", "renderAffixRight", "beforeSubmit", "showSaveBtn", "saveBtnTitle", "affixLayout", "getContainer", "onValueChange", "afterSubmit", "renderFormExtra", "bpmButtonProps", "setVerifyRules", "afterSubmitLoading"],
|
|
33
|
+
var _utils2 = require("../../lowcode/engine/provider/ContextProvider/utils");
|
|
34
|
+
var _excluded = ["namespace", "formState", "formMode", "formOperates", "loading", "apiRef", "wrapperRef", "readOnly", "mainFormLdId", "renderFormList", "renderAffixLeft", "renderAffixRight", "beforeSubmit", "showSaveBtn", "saveBtnTitle", "affixLayout", "getContainer", "onValueChange", "afterSubmit", "renderFormExtra", "bpmButtonProps", "setVerifyRules", "afterSubmitLoading", "showConfigBtn", "affixBarZIndex"],
|
|
35
35
|
_excluded2 = ["dataSets", "doAction", "resources"],
|
|
36
36
|
_excluded3 = ["id", "header", "title", "readOnly", "extraConfig", "renderTopLeft", "serial"],
|
|
37
37
|
_excluded4 = ["ldId", "initData", "overModel"];
|
|
@@ -66,6 +66,9 @@ var LdFormList = function LdFormList(_ref) {
|
|
|
66
66
|
bpmButtonProps = _ref$bpmButtonProps === void 0 ? {} : _ref$bpmButtonProps,
|
|
67
67
|
setVerifyRules = _ref.setVerifyRules,
|
|
68
68
|
afterSubmitLoading = _ref.afterSubmitLoading,
|
|
69
|
+
_ref$showConfigBtn = _ref.showConfigBtn,
|
|
70
|
+
showConfigBtn = _ref$showConfigBtn === void 0 ? true : _ref$showConfigBtn,
|
|
71
|
+
affixBarZIndex = _ref.affixBarZIndex,
|
|
69
72
|
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
70
73
|
var PRIMARY = window.appConfig.constraintKeys.PRIMARY;
|
|
71
74
|
var currentValueRef = (0, _react.useRef)(null);
|
|
@@ -81,10 +84,6 @@ var LdFormList = function LdFormList(_ref) {
|
|
|
81
84
|
_useState6 = (0, _slicedToArray2.default)(_useState5, 2),
|
|
82
85
|
bizData = _useState6[0],
|
|
83
86
|
setBizData = _useState6[1];
|
|
84
|
-
var _useTodo = (0, _useTodo3.default)(),
|
|
85
|
-
_useTodo2 = (0, _slicedToArray2.default)(_useTodo, 2),
|
|
86
|
-
_ = _useTodo2[0],
|
|
87
|
-
callBehavior = _useTodo2[1];
|
|
88
87
|
var luckTheme = (0, _ahooks.useCreation)(function () {
|
|
89
88
|
return document.body.getAttribute('luck-theme');
|
|
90
89
|
}, []);
|
|
@@ -131,7 +130,8 @@ var LdFormList = function LdFormList(_ref) {
|
|
|
131
130
|
var renderExtra = (0, _ahooks.useMemoizedFn)(function (formId, extraConfig, type) {
|
|
132
131
|
return /*#__PURE__*/_react.default.createElement(_FormList.FormBtn, (0, _extends2.default)({
|
|
133
132
|
type: type,
|
|
134
|
-
formId: formId
|
|
133
|
+
formId: formId,
|
|
134
|
+
showConfigBtn: showConfigBtn
|
|
135
135
|
}, extraConfig));
|
|
136
136
|
});
|
|
137
137
|
|
|
@@ -158,7 +158,7 @@ var LdFormList = function LdFormList(_ref) {
|
|
|
158
158
|
mainDataSetKey: mainDataSetKey
|
|
159
159
|
}; // 请求是否有工作流服务
|
|
160
160
|
_context.next = 4;
|
|
161
|
-
return callBehavior({
|
|
161
|
+
return (0, _utils2.callBehavior)({
|
|
162
162
|
moduleCode: rest.moduleCode,
|
|
163
163
|
datasetCode: mainDataSetKey,
|
|
164
164
|
behaviorKey: 'readBpmDeploy'
|
|
@@ -170,7 +170,7 @@ var LdFormList = function LdFormList(_ref) {
|
|
|
170
170
|
break;
|
|
171
171
|
}
|
|
172
172
|
_context.next = 8;
|
|
173
|
-
return callBehavior({
|
|
173
|
+
return (0, _utils2.callBehavior)({
|
|
174
174
|
moduleCode: rest.moduleCode,
|
|
175
175
|
datasetCode: mainDataSetKey,
|
|
176
176
|
behaviorKey: 'readBpm'
|
|
@@ -225,9 +225,9 @@ var LdFormList = function LdFormList(_ref) {
|
|
|
225
225
|
if (afterSubmit) {
|
|
226
226
|
afterSubmit(success, mainKey, res);
|
|
227
227
|
} else {
|
|
228
|
-
var _formListRef$current;
|
|
228
|
+
var _formListRef$current, _formListRef$current2;
|
|
229
229
|
props.parentModelName && ((_formListRef$current = formListRef.current) === null || _formListRef$current === void 0 ? void 0 : _formListRef$current.doParentsQuery());
|
|
230
|
-
formListRef.current.onQuery(null, (0, _defineProperty2.default)({}, mainFormLdId, mainFormData), function () {
|
|
230
|
+
(_formListRef$current2 = formListRef.current) === null || _formListRef$current2 === void 0 || _formListRef$current2.onQuery(null, (0, _defineProperty2.default)({}, mainFormLdId, mainFormData), function () {
|
|
231
231
|
formListRef.current.setFormMode('info');
|
|
232
232
|
});
|
|
233
233
|
}
|
|
@@ -283,6 +283,7 @@ var LdFormList = function LdFormList(_ref) {
|
|
|
283
283
|
renderRight: isCustomRenderAffixRight ? renderAffixRightCustom : renderAffixRight,
|
|
284
284
|
title: saveBtnTitle,
|
|
285
285
|
layout: affixLayout || defaultLayout,
|
|
286
|
+
zIndex: affixBarZIndex,
|
|
286
287
|
getContainer: getContainer
|
|
287
288
|
}), (0, _lodash.sortBy)([].concat((0, _toConsumableArray2.default)(formList), (0, _toConsumableArray2.default)(formExtra)), function (o) {
|
|
288
289
|
var _o$props;
|
|
@@ -101,10 +101,10 @@ var LdGrid = function LdGrid(_ref) {
|
|
|
101
101
|
});
|
|
102
102
|
}, [batchOperations]);
|
|
103
103
|
|
|
104
|
-
/**
|
|
105
|
-
* 优先级
|
|
106
|
-
* columnsReset 重置columns,不受模块管理限制,写什么展示什么
|
|
107
|
-
* columnsRewrite 覆盖模块管理配置,是否展示以模块管理配置为主,自己可以用hide来隐藏某字段
|
|
104
|
+
/**
|
|
105
|
+
* 优先级
|
|
106
|
+
* columnsReset 重置columns,不受模块管理限制,写什么展示什么
|
|
107
|
+
* columnsRewrite 覆盖模块管理配置,是否展示以模块管理配置为主,自己可以用hide来隐藏某字段
|
|
108
108
|
*/
|
|
109
109
|
var _columns = (0, _ahooks.useCreation)(function () {
|
|
110
110
|
if (columnsReset) {
|
|
@@ -78,32 +78,49 @@ var buildLdGridForm = function buildLdGridForm(_ref) {
|
|
|
78
78
|
var keys = (0, _lodash.isEmpty)(fields) ? Object.keys(columnsObj) : Object.keys(fieldsObj);
|
|
79
79
|
var _defaultValues = {};
|
|
80
80
|
var _nodes = (0, _lodash.reduce)(keys, function (result, key) {
|
|
81
|
+
var _customColumn;
|
|
81
82
|
var setting = fieldsObj[key];
|
|
82
83
|
var col = columnsObj[key];
|
|
83
|
-
if (col !== null && col !== void 0 && col.isShowInForm) {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
formItemRewrite: (0, _objectSpread4.default)((0, _objectSpread4.default)({}, (_customColumn = customColumn) === null || _customColumn === void 0 ? void 0 : _customColumn.formItemRewrite), {}, {
|
|
100
|
-
moduleCode: moduleCode,
|
|
101
|
-
formRef: formRef,
|
|
102
|
-
formMode: formMode,
|
|
103
|
-
setting: (0, _lodash.omit)(setting, [].concat(defaultSet, ['uid', 'field']))
|
|
104
|
-
})
|
|
105
|
-
})));
|
|
84
|
+
if (!(col !== null && col !== void 0 && col.isShowInForm) && !(col !== null && col !== void 0 && col.isShowInGrid)) {
|
|
85
|
+
return result;
|
|
86
|
+
}
|
|
87
|
+
var customColumn = columnsRewrite.find(function (column) {
|
|
88
|
+
return column.field === col.aliaName;
|
|
89
|
+
}) || {};
|
|
90
|
+
if (col !== null && col !== void 0 && col.isShowInForm && !(col !== null && col !== void 0 && col.isShowInGrid)) {
|
|
91
|
+
customColumn.mode = 'form';
|
|
92
|
+
} else if (!(col !== null && col !== void 0 && col.isShowInForm) && col !== null && col !== void 0 && col.isShowInGrid) {
|
|
93
|
+
customColumn.mode = 'grid';
|
|
94
|
+
customColumn.editable = false;
|
|
95
|
+
customColumn.formItemProps = function () {
|
|
96
|
+
return {
|
|
97
|
+
readOnly: true
|
|
98
|
+
};
|
|
99
|
+
};
|
|
106
100
|
}
|
|
101
|
+
if (col.isReadOnly) customColumn = (0, _objectSpread4.default)((0, _objectSpread4.default)({}, customColumn), {}, {
|
|
102
|
+
editable: false,
|
|
103
|
+
formItemProps: function formItemProps() {
|
|
104
|
+
return {
|
|
105
|
+
readOnly: true
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
_defaultValues = (0, _objectSpread4.default)((0, _objectSpread4.default)({}, _defaultValues), {}, (0, _defineProperty2.default)((0, _defineProperty2.default)({}, col.aliaName, col['optDefaultValue']), "".concat(col.aliaName, "_virtual"), col['optDefaultValueCvt']));
|
|
110
|
+
var newCol = (0, _objectSpread4.default)((0, _objectSpread4.default)({}, col), {}, {
|
|
111
|
+
setVerifyRules: setVerifyRules,
|
|
112
|
+
fieldName: (setting === null || setting === void 0 ? void 0 : setting.fieldAliasName) || col.fieldName
|
|
113
|
+
});
|
|
114
|
+
var defaultSet = ['width', 'align', 'headerAlign', 'pinned', 'tip', 'formMode'];
|
|
115
|
+
result.push((0, _utils.getFormColumn)(type, newCol, (0, _objectSpread4.default)((0, _objectSpread4.default)((0, _objectSpread4.default)({}, (0, _lodash.pick)(setting, defaultSet)), customColumn), {}, {
|
|
116
|
+
formItemRewrite: (0, _objectSpread4.default)((0, _objectSpread4.default)({}, (_customColumn = customColumn) === null || _customColumn === void 0 ? void 0 : _customColumn.formItemRewrite), {}, {
|
|
117
|
+
moduleCode: moduleCode,
|
|
118
|
+
formRef: formRef,
|
|
119
|
+
formMode: formMode,
|
|
120
|
+
render: setting === null || setting === void 0 ? void 0 : setting.render,
|
|
121
|
+
setting: (0, _lodash.omit)(setting, [].concat(defaultSet, ['uid', 'field', 'render']))
|
|
122
|
+
})
|
|
123
|
+
})));
|
|
107
124
|
return result;
|
|
108
125
|
}, []);
|
|
109
126
|
defaultValues.current = _defaultValues;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
.ldGridForm {
|
|
2
|
-
:global {
|
|
3
|
-
.ag-layout-auto-height {
|
|
4
|
-
height: 100% !important;
|
|
5
|
-
}
|
|
6
|
-
}
|
|
7
|
-
}
|
|
1
|
+
.ldGridForm {
|
|
2
|
+
:global {
|
|
3
|
+
.ag-layout-auto-height {
|
|
4
|
+
height: 100% !important;
|
|
5
|
+
}
|
|
6
|
+
}
|
|
7
|
+
}
|