fan-standard-comp 3.2.1 → 4.0.1
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 -0
- package/README.md +15 -0
- package/dist/fan-standard-comp.min.css +1 -0
- package/dist/fan-standard-comp.min.js +1 -0
- package/es/ButtonGroup/PopConfirmTitle.d.ts +1 -1
- package/es/ButtonGroup/PopConfirmTitle.js +2 -2
- package/es/ButtonGroup/index.d.ts +5 -3
- package/es/ButtonGroup/index.js +259 -189
- package/es/ButtonGroup/styles/index.d.ts +8 -0
- package/es/ButtonGroup/styles/index.js +61 -0
- package/es/ButtonGroup/testStyles/index(antd-style).d.ts +11 -0
- package/es/ButtonGroup/testStyles/index(antd-style).js +28 -0
- package/es/ButtonGroup/testStyles/index(cssinjs).js +133 -0
- package/es/ButtonGroup/testStyles/index.d.ts +11 -0
- package/es/ButtonGroup/testStyles/index.js +23 -0
- package/es/CalendarCoordPicker/CalendarMonthPicker.d.ts +5 -0
- package/es/CalendarCoordPicker/CalendarMonthPicker.js +32 -0
- package/es/CalendarCoordPicker/index.d.ts +7 -0
- package/es/CalendarCoordPicker/index.js +314 -0
- package/es/CalendarCoordPicker/styles/index.d.ts +6 -0
- package/es/CalendarCoordPicker/styles/index.js +28 -0
- package/es/CalendarCoordPicker/styles/index.less +37 -0
- package/es/ConfigContext/index.d.ts +7 -0
- package/es/ConfigContext/index.js +20 -0
- package/es/DragContent/DragBar.d.ts +3 -0
- package/es/DragContent/DragBar.js +0 -1
- package/es/DragContent/index.d.ts +1 -1
- package/es/DragContent/index.js +20 -6
- package/es/DragContent/styles/index.d.ts +6 -0
- package/es/DragContent/styles/index.js +52 -0
- package/es/FormComp/ChunkUploader/api.js +11 -11
- package/es/FormComp/ChunkUploader/index.js +125 -132
- package/es/FormComp/ChunkUploader/lib.js +19 -19
- package/es/FormComp/ChunkUploader/upload-queue.class.js +51 -51
- package/es/FormComp/EditButton/index.d.ts +1 -1
- package/es/FormComp/EditButton/index.js +18 -17
- package/es/FormComp/FieldComponent/ReUpload.d.ts +1 -1
- package/es/FormComp/FieldComponent/ReUpload.js +45 -37
- package/es/FormComp/FieldComponent/RefactorTreeSelect.js +28 -19
- package/es/FormComp/FieldComponent/TitleNode.d.ts +2 -1
- package/es/FormComp/FieldComponent/UploaderViewer.d.ts +2 -0
- package/es/FormComp/FieldComponent/UploaderViewer.js +92 -0
- package/es/FormComp/FieldComponent/index.d.ts +1 -1
- package/es/FormComp/FieldComponent/index.js +88 -109
- package/es/FormComp/FieldComponent/setReadonlyValues.js +21 -15
- package/es/FormComp/FieldComponent/style/TreeSelect.d.ts +6 -0
- package/es/FormComp/FieldComponent/style/TreeSelect.js +42 -0
- package/es/FormComp/FieldComponent/style/UploaderStyle.d.ts +6 -0
- package/es/FormComp/FieldComponent/style/UploaderStyle.js +25 -0
- package/es/FormComp/FieldComponent/style/index.less +26 -21
- package/es/FormComp/RenderItemGroup/index.d.ts +4 -0
- package/es/FormComp/RenderItemGroup/index.js +183 -66
- package/es/FormComp/RenderItemGroup/style/index.d.ts +6 -0
- package/es/FormComp/RenderItemGroup/style/index.js +40 -0
- package/es/FormComp/Uploader/index.js +94 -75
- package/es/FormComp/Uploader/style/index.less +14 -14
- package/es/FormComp/Uploader/util.d.ts +2 -2
- package/es/FormComp/VarTemplate/index.js +32 -40
- package/es/FormComp/index.js +1 -1
- package/es/NavLeafScroll/Main.js +443 -0
- package/es/NavLeafScroll/index.d.ts +2 -0
- package/es/NavLeafScroll/index.js +21 -395
- package/es/NavLeafScroll/style/index.d.ts +6 -0
- package/es/NavLeafScroll/style/index.js +56 -0
- package/es/NavLeafScroll/style/index.less +22 -22
- package/es/RefactorTree/index.d.ts +1 -1
- package/es/RefactorTree/index.js +21 -19
- package/es/RefactorTree/style/index.js +1 -1
- package/es/RefactorTree/style/index.less +22 -22
- package/es/RefactorTree/util.d.ts +2 -2
- package/es/RefactorTree/util.js +30 -15
- package/es/SpecIcon/fonts/demo_index.html +559 -5
- package/es/SpecIcon/fonts/iconfont.css +101 -3
- package/es/SpecIcon/fonts/iconfont.js +34 -27
- package/es/SpecIcon/fonts/iconfont.json +168 -0
- package/es/SpecIcon/fonts/iconfont.svg +163 -171
- package/es/SpecIcon/fonts/iconfont.ttf +0 -0
- package/es/SpecIcon/fonts/iconfont.woff +0 -0
- package/es/SpecIcon/fonts/iconfont.woff2 +0 -0
- package/es/SpecIcon/index.d.ts +0 -1
- package/es/SpecIcon/index.js +33 -12
- package/es/SpecIcon/styles/index(antd-style).d.ts +6 -0
- package/es/SpecIcon/styles/index(antd-style).js +13 -0
- package/es/SpecIcon/styles/index.d.ts +6 -0
- package/es/SpecIcon/styles/index.js +93 -0
- package/es/StandardContent/SplitterLayout/Pane.js +3 -3
- package/es/StandardContent/SplitterLayout/index.js +7 -6
- package/es/StandardContent/SplitterLayout/index.less +0 -1
- package/es/StandardContent/SubfieldContent.d.ts +3 -2
- package/es/StandardContent/SubfieldContent.js +24 -12
- package/es/StandardContent/WrapperContent.d.ts +2 -2
- package/es/StandardContent/WrapperContent.js +22 -11
- package/es/StandardContent/styles/Subfield.d.ts +6 -0
- package/es/StandardContent/styles/Subfield.js +30 -0
- package/es/StandardContent/styles/Wrapper.d.ts +6 -0
- package/es/StandardContent/styles/Wrapper.js +28 -0
- package/es/StandardContent/styles/index.less +67 -0
- package/es/StandardDragModal/ChangeStandardModal.d.ts +2 -2
- package/es/StandardDragModal/ChangeStandardModal.js +84 -71
- package/es/StandardDragModal/DraggableModal.js +7 -4
- package/es/StandardDragModal/DraggableModalContext.d.ts +1 -1
- package/es/StandardDragModal/DraggableModalInner.d.ts +2 -2
- package/es/StandardDragModal/DraggableModalInner.js +31 -21
- package/es/StandardDragModal/DraggableModalProvider.js +5 -5
- package/es/StandardDragModal/Modal.d.ts +1 -1
- package/es/StandardDragModal/Modal.js +8 -5
- package/es/StandardDragModal/ResizeHandle.js +2 -1
- package/es/StandardDragModal/draggableModalReducer.d.ts +4 -4
- package/es/StandardDragModal/draggableModalReducer.js +31 -22
- package/es/StandardDragModal/index.js +3 -3
- package/es/StandardDragModal/useDrag.js +2 -2
- package/es/StandardDragModal/useResize.js +2 -2
- package/es/StandardFilter/index.d.ts +8 -17
- package/es/StandardFilter/index.js +279 -206
- package/es/StandardFilter/style/FilterStyle.d.ts +6 -0
- package/es/StandardFilter/style/FilterStyle.js +50 -0
- package/es/StandardFilter/style/index.less +85 -36
- package/es/StandardForm/ActionList.d.ts +9 -0
- package/es/StandardForm/ActionList.js +5 -5
- package/es/StandardForm/StepForm.d.ts +1 -1
- package/es/StandardForm/StepForm.js +47 -40
- package/es/StandardForm/TabForm.d.ts +2 -1
- package/es/StandardForm/TabForm.js +50 -41
- package/es/StandardForm/index.d.ts +2 -1
- package/es/StandardForm/index.js +40 -22
- package/es/StandardForm/style/index.d.ts +6 -0
- package/es/StandardForm/style/index.js +49 -0
- package/es/StandardForm/style/index.less +23 -12
- package/es/StandardModal/UpdateFormRef.js +0 -1
- package/es/StandardModal/index.d.ts +4 -3
- package/es/StandardModal/index.js +153 -133
- package/es/StandardModal/style/index.d.ts +6 -0
- package/es/StandardModal/style/index.js +46 -0
- package/es/StandardModal/style/index.less +29 -29
- package/es/StandardPanel/index.d.ts +1 -1
- package/es/StandardPanel/index.js +28 -17
- package/es/StandardPanel/style/index.d.ts +6 -0
- package/es/StandardPanel/style/index.js +87 -0
- package/es/StandardPanel/style/index.less +30 -32
- package/es/StandardTable/index.d.ts +6 -1
- package/es/StandardTable/index.js +92 -40
- package/es/StandardTable/style/index.d.ts +6 -1
- package/es/StandardTable/style/index.js +113 -1
- package/es/StandardTable/style/index.less +89 -80
- package/es/components/IconNode/index.d.ts +1 -1
- package/es/components/IconNode/index.js +12 -1
- package/es/components/index.js +1 -1
- package/es/data/func.code.d.ts +16 -0
- package/es/data/general.config.d.ts +191 -0
- package/es/data/general.config.js +32 -1
- package/es/data/index.d.ts +3 -0
- package/es/data/index.js +2 -2
- package/es/index.d.ts +7 -6
- package/es/index.js +32 -26
- package/es/theme/index.d.ts +27 -0
- package/es/theme/index.js +29 -0
- package/es/theme/utils/genStyleHook.d.ts +1 -0
- package/es/theme/utils/genStyleHook.js +32 -0
- package/es/utils/ValueFormat.d.ts +3 -0
- package/es/utils/ValueFormat.js +17 -4
- package/es/utils/dictSelectUtil.d.ts +36 -0
- package/es/utils/dictSelectUtil.js +3 -3
- package/es/utils/filterPermission.d.ts +5 -0
- package/es/utils/filterPermission.js +4 -6
- package/es/utils/getParentNodes.d.ts +79 -0
- package/es/utils/getParentNodes.js +89 -13
- package/es/utils/index.d.ts +5 -0
- package/es/utils/index.js +5 -4
- package/es/utils/transferFile.d.ts +4 -0
- package/es/utils/transferFile.js +56 -0
- package/es/utils/urlUtils.d.ts +14 -0
- package/es/utils/urlUtils.js +77 -0
- package/lib/ButtonGroup/PopConfirmTitle.d.ts +1 -1
- package/lib/ButtonGroup/PopConfirmTitle.js +3 -4
- package/lib/ButtonGroup/index.d.ts +5 -3
- package/lib/ButtonGroup/index.js +261 -194
- package/lib/ButtonGroup/styles/index.d.ts +8 -0
- package/lib/ButtonGroup/styles/index.js +68 -0
- package/lib/ButtonGroup/testStyles/index(antd-style).d.ts +11 -0
- package/lib/ButtonGroup/testStyles/index(antd-style).js +34 -0
- package/lib/ButtonGroup/testStyles/index(cssinjs).js +134 -0
- package/lib/ButtonGroup/testStyles/index.d.ts +11 -0
- package/lib/ButtonGroup/testStyles/index.js +29 -0
- package/lib/CalendarCoordPicker/CalendarMonthPicker.d.ts +5 -0
- package/lib/CalendarCoordPicker/CalendarMonthPicker.js +41 -0
- package/lib/CalendarCoordPicker/index.d.ts +7 -0
- package/lib/CalendarCoordPicker/index.js +323 -0
- package/lib/CalendarCoordPicker/styles/index.d.ts +6 -0
- package/lib/CalendarCoordPicker/styles/index.js +34 -0
- package/lib/CalendarCoordPicker/styles/index.less +37 -0
- package/lib/ConfigContext/index.d.ts +7 -0
- package/lib/ConfigContext/index.js +25 -0
- package/lib/DragContent/DragBar.d.ts +3 -0
- package/lib/DragContent/DragBar.js +1 -3
- package/lib/DragContent/index.d.ts +1 -1
- package/lib/DragContent/index.js +22 -9
- package/lib/DragContent/styles/index.d.ts +6 -0
- package/lib/DragContent/styles/index.js +58 -0
- package/lib/FormComp/ChunkUploader/api.js +11 -11
- package/lib/FormComp/ChunkUploader/index.js +123 -130
- package/lib/FormComp/ChunkUploader/lib.js +19 -19
- package/lib/FormComp/ChunkUploader/upload-queue.class.js +52 -53
- package/lib/FormComp/EditButton/index.d.ts +1 -1
- package/lib/FormComp/EditButton/index.js +22 -22
- package/lib/FormComp/FieldComponent/ReUpload.d.ts +1 -1
- package/lib/FormComp/FieldComponent/ReUpload.js +47 -41
- package/lib/FormComp/FieldComponent/RefactorTreeSelect.js +29 -21
- package/lib/FormComp/FieldComponent/TitleNode.d.ts +2 -1
- package/lib/FormComp/FieldComponent/TitleNode.js +1 -2
- package/lib/FormComp/FieldComponent/UploaderViewer.d.ts +2 -0
- package/lib/FormComp/FieldComponent/UploaderViewer.js +102 -0
- package/lib/FormComp/FieldComponent/index.d.ts +1 -1
- package/lib/FormComp/FieldComponent/index.js +83 -107
- package/lib/FormComp/FieldComponent/setReadonlyValues.js +29 -28
- package/lib/FormComp/FieldComponent/style/TreeSelect.d.ts +6 -0
- package/lib/FormComp/FieldComponent/style/TreeSelect.js +48 -0
- package/lib/FormComp/FieldComponent/style/UploaderStyle.d.ts +6 -0
- package/lib/FormComp/FieldComponent/style/UploaderStyle.js +31 -0
- package/lib/FormComp/FieldComponent/style/index.less +26 -21
- package/lib/FormComp/RenderItemGroup/index.d.ts +4 -0
- package/lib/FormComp/RenderItemGroup/index.js +182 -65
- package/lib/FormComp/RenderItemGroup/style/index.d.ts +6 -0
- package/lib/FormComp/RenderItemGroup/style/index.js +46 -0
- package/lib/FormComp/Uploader/index.js +95 -80
- package/lib/FormComp/Uploader/style/index.less +14 -14
- package/lib/FormComp/Uploader/util.d.ts +2 -2
- package/lib/FormComp/VarTemplate/index.js +38 -48
- package/lib/NavLeafScroll/Main.js +451 -0
- package/lib/NavLeafScroll/index.d.ts +2 -0
- package/lib/NavLeafScroll/index.js +21 -398
- package/lib/NavLeafScroll/style/index.d.ts +6 -0
- package/lib/NavLeafScroll/style/index.js +62 -0
- package/lib/NavLeafScroll/style/index.less +22 -22
- package/lib/RefactorTree/index.d.ts +1 -1
- package/lib/RefactorTree/index.js +21 -21
- package/lib/RefactorTree/style/index.less +22 -22
- package/lib/RefactorTree/util.d.ts +2 -2
- package/lib/RefactorTree/util.js +30 -15
- package/lib/SpecIcon/fonts/demo_index.html +559 -5
- package/lib/SpecIcon/fonts/iconfont.css +101 -3
- package/lib/SpecIcon/fonts/iconfont.js +34 -27
- package/lib/SpecIcon/fonts/iconfont.json +168 -0
- package/lib/SpecIcon/fonts/iconfont.svg +163 -171
- package/lib/SpecIcon/fonts/iconfont.ttf +0 -0
- package/lib/SpecIcon/fonts/iconfont.woff +0 -0
- package/lib/SpecIcon/fonts/iconfont.woff2 +0 -0
- package/lib/SpecIcon/index.d.ts +0 -1
- package/lib/SpecIcon/index.js +34 -14
- package/lib/SpecIcon/styles/index(antd-style).d.ts +6 -0
- package/lib/SpecIcon/styles/index(antd-style).js +19 -0
- package/lib/SpecIcon/styles/index.d.ts +6 -0
- package/lib/SpecIcon/styles/index.js +100 -0
- package/lib/StandardContent/SplitterLayout/Pane.js +3 -4
- package/lib/StandardContent/SplitterLayout/index.js +6 -6
- package/lib/StandardContent/SplitterLayout/index.less +0 -1
- package/lib/StandardContent/SubfieldContent.d.ts +3 -2
- package/lib/StandardContent/SubfieldContent.js +24 -13
- package/lib/StandardContent/WrapperContent.d.ts +2 -2
- package/lib/StandardContent/WrapperContent.js +23 -13
- package/lib/StandardContent/styles/Subfield.d.ts +6 -0
- package/lib/StandardContent/styles/Subfield.js +36 -0
- package/lib/StandardContent/styles/Wrapper.d.ts +6 -0
- package/lib/StandardContent/styles/Wrapper.js +34 -0
- package/lib/StandardContent/styles/index.less +67 -0
- package/lib/StandardDragModal/ChangeStandardModal.d.ts +2 -2
- package/lib/StandardDragModal/ChangeStandardModal.js +85 -72
- package/lib/StandardDragModal/DraggableModal.js +11 -8
- package/lib/StandardDragModal/DraggableModalContext.d.ts +1 -1
- package/lib/StandardDragModal/DraggableModalContext.js +3 -4
- package/lib/StandardDragModal/DraggableModalInner.d.ts +2 -2
- package/lib/StandardDragModal/DraggableModalInner.js +38 -30
- package/lib/StandardDragModal/DraggableModalProvider.js +10 -10
- package/lib/StandardDragModal/Modal.d.ts +1 -1
- package/lib/StandardDragModal/Modal.js +7 -5
- package/lib/StandardDragModal/ResizeHandle.js +6 -6
- package/lib/StandardDragModal/clamp.js +2 -3
- package/lib/StandardDragModal/draggableModalReducer.d.ts +4 -4
- package/lib/StandardDragModal/draggableModalReducer.js +34 -29
- package/lib/StandardDragModal/getWindowSize.js +2 -3
- package/lib/StandardDragModal/useDrag.js +4 -5
- package/lib/StandardDragModal/usePrevious.js +2 -3
- package/lib/StandardDragModal/useResize.js +4 -5
- package/lib/StandardFilter/index.d.ts +8 -17
- package/lib/StandardFilter/index.js +281 -207
- package/lib/StandardFilter/style/FilterStyle.d.ts +6 -0
- package/lib/StandardFilter/style/FilterStyle.js +56 -0
- package/lib/StandardFilter/style/index.less +85 -36
- package/lib/StandardForm/ActionList.d.ts +9 -0
- package/lib/StandardForm/ActionList.js +6 -7
- package/lib/StandardForm/StepForm.d.ts +1 -1
- package/lib/StandardForm/StepForm.js +46 -41
- package/lib/StandardForm/TabForm.d.ts +2 -1
- package/lib/StandardForm/TabForm.js +48 -41
- package/lib/StandardForm/index.d.ts +2 -1
- package/lib/StandardForm/index.js +39 -23
- package/lib/StandardForm/style/index.d.ts +6 -0
- package/lib/StandardForm/style/index.js +55 -0
- package/lib/StandardForm/style/index.less +23 -12
- package/lib/StandardModal/UpdateFormRef.js +3 -4
- package/lib/StandardModal/index.d.ts +4 -3
- package/lib/StandardModal/index.js +152 -133
- package/lib/StandardModal/style/index.d.ts +6 -0
- package/lib/StandardModal/style/index.js +52 -0
- package/lib/StandardModal/style/index.less +29 -29
- package/lib/StandardPanel/index.d.ts +1 -1
- package/lib/StandardPanel/index.js +29 -20
- package/lib/StandardPanel/style/index.d.ts +6 -0
- package/lib/StandardPanel/style/index.js +93 -0
- package/lib/StandardPanel/style/index.less +30 -32
- package/lib/StandardTable/index.d.ts +6 -1
- package/lib/StandardTable/index.js +93 -40
- package/lib/StandardTable/style/index.d.ts +6 -1
- package/lib/StandardTable/style/index.js +117 -1
- package/lib/StandardTable/style/index.less +89 -80
- package/lib/components/IconNode/index.d.ts +1 -1
- package/lib/components/IconNode/index.js +13 -3
- package/lib/data/func.code.d.ts +16 -0
- package/lib/data/func.code.js +2 -3
- package/lib/data/general.config.d.ts +191 -0
- package/lib/data/general.config.js +34 -4
- package/lib/data/index.d.ts +3 -0
- package/lib/index.d.ts +7 -6
- package/lib/index.js +24 -12
- package/lib/theme/index.d.ts +27 -0
- package/lib/theme/index.js +35 -0
- package/lib/theme/utils/genStyleHook.d.ts +1 -0
- package/lib/theme/utils/genStyleHook.js +38 -0
- package/lib/utils/ValueFormat.d.ts +3 -0
- package/lib/utils/ValueFormat.js +20 -6
- package/lib/utils/dictSelectUtil.d.ts +36 -0
- package/lib/utils/dictSelectUtil.js +3 -3
- package/lib/utils/filterPermission.d.ts +5 -0
- package/lib/utils/filterPermission.js +9 -16
- package/lib/utils/getParentNodes.d.ts +79 -0
- package/lib/utils/getParentNodes.js +91 -16
- package/lib/utils/index.d.ts +5 -0
- package/lib/utils/index.js +42 -32
- package/lib/utils/transferFile.d.ts +4 -0
- package/lib/utils/transferFile.js +63 -0
- package/lib/utils/urlUtils.d.ts +14 -0
- package/lib/utils/urlUtils.js +84 -0
- package/package.json +80 -33
- package/Readme.md +0 -49
- package/dist/f26952c118ab6cdcd23dc0028ee98c11.svg +0 -173
- package/dist/fan-standard-comp.umd.js +0 -602
- package/dist/fonts/iconfont.eot +0 -0
- package/dist/fonts/iconfont.ttf +0 -0
- package/dist/fonts/iconfont.woff +0 -0
- package/es/ButtonGroup/ButtonList.d.ts +0 -2
- package/es/ButtonGroup/ButtonList.js +0 -34
- package/es/ButtonGroup/ButtonMenu.d.ts +0 -2
- package/es/ButtonGroup/ButtonMenu.js +0 -35
- package/es/ButtonGroup/style/index.less +0 -36
- package/es/RefactorTree/indexTreeNode.d.ts +0 -39
- package/es/RefactorTree/indexTreeNode.js +0 -204
- package/es/SpecIcon/style/iconfont.less +0 -213
- package/es/SpecIcon/style/index.less +0 -98
- package/es/SplitterLayout/Pane.d.ts +0 -13
- package/es/SplitterLayout/Pane.js +0 -33
- package/es/SplitterLayout/index.js +0 -325
- package/es/SplitterLayout/index.less +0 -58
- package/es/StandardContent/style/index.less +0 -80
- package/es/theme/spec-variable.less +0 -48
- package/lib/ButtonGroup/ButtonList.d.ts +0 -2
- package/lib/ButtonGroup/ButtonList.js +0 -43
- package/lib/ButtonGroup/ButtonMenu.d.ts +0 -2
- package/lib/ButtonGroup/ButtonMenu.js +0 -44
- package/lib/ButtonGroup/style/index.less +0 -36
- package/lib/RefactorTree/indexTreeNode.d.ts +0 -39
- package/lib/RefactorTree/indexTreeNode.js +0 -214
- package/lib/SpecIcon/style/iconfont.less +0 -213
- package/lib/SpecIcon/style/index.less +0 -98
- package/lib/SplitterLayout/Pane.d.ts +0 -13
- package/lib/SplitterLayout/Pane.js +0 -41
- package/lib/SplitterLayout/index.js +0 -332
- package/lib/SplitterLayout/index.less +0 -58
- package/lib/StandardContent/style/index.less +0 -80
- package/lib/theme/spec-variable.less +0 -48
- /package/es/{styles/index.less → ButtonGroup/testStyles/index(cssinjs).d.ts} +0 -0
- /package/lib/{styles/index.less → ButtonGroup/testStyles/index(cssinjs).d.ts} +0 -0
|
@@ -4,21 +4,33 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
require("
|
|
8
|
-
var
|
|
9
|
-
require("antd/es/tooltip/style");
|
|
10
|
-
var _tooltip = _interopRequireDefault(require("antd/es/tooltip"));
|
|
11
|
-
require("antd/es/col/style");
|
|
12
|
-
var _col = _interopRequireDefault(require("antd/es/col"));
|
|
13
|
-
require("antd/es/form/style");
|
|
14
|
-
var _form = _interopRequireDefault(require("antd/es/form"));
|
|
15
|
-
var _react = _interopRequireDefault(require("react"));
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _antd = require("antd");
|
|
16
9
|
var _data = require("../../data");
|
|
17
10
|
var _FieldComponent = _interopRequireDefault(require("../FieldComponent"));
|
|
18
11
|
var _SpecIcon = _interopRequireDefault(require("../../SpecIcon"));
|
|
12
|
+
var _style = _interopRequireDefault(require("./style"));
|
|
13
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
19
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
16
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
17
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
18
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
19
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
20
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
21
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
22
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
20
23
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
21
|
-
|
|
24
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
25
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
26
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
27
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
28
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
29
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } /* eslint-disable */
|
|
30
|
+
var FormItem = _antd.Form.Item;
|
|
31
|
+
|
|
32
|
+
// 单个控件配置参数
|
|
33
|
+
|
|
22
34
|
var RenderItemGroup = function RenderItemGroup(props) {
|
|
23
35
|
var itemGroup = props.itemGroup,
|
|
24
36
|
_props$size = props.size,
|
|
@@ -31,23 +43,51 @@ var RenderItemGroup = function RenderItemGroup(props) {
|
|
|
31
43
|
form = props.form,
|
|
32
44
|
doUpdateFormFields = props.doUpdateFormFields,
|
|
33
45
|
_props$layout = props.layout,
|
|
34
|
-
layout = _props$layout === void 0 ? "horizontal" : _props$layout
|
|
35
|
-
|
|
36
|
-
|
|
46
|
+
layout = _props$layout === void 0 ? "horizontal" : _props$layout,
|
|
47
|
+
gutter = props.gutter,
|
|
48
|
+
columnCount = props.columnCount;
|
|
49
|
+
var componentName = 'spec-item-group';
|
|
50
|
+
var _useStyle = (0, _style.default)(componentName),
|
|
51
|
+
_useStyle2 = _slicedToArray(_useStyle, 2),
|
|
52
|
+
wrapSSR = _useStyle2[0],
|
|
53
|
+
hashId = _useStyle2[1];
|
|
54
|
+
// 栅格数量
|
|
55
|
+
// const columnNumber: number = useMemo(() => {
|
|
56
|
+
// // @ts-ignore
|
|
57
|
+
// return general.modalSize[size].columnNumber || 1
|
|
58
|
+
// }, [size, columnCount])
|
|
59
|
+
|
|
60
|
+
var setColSpan = function setColSpan(display, modalSize, columnCount) {
|
|
61
|
+
if (_typeof(display) === 'object' || display === 'block') {
|
|
62
|
+
// 栅格数量为:1
|
|
37
63
|
return 24;
|
|
38
64
|
}
|
|
39
|
-
if (
|
|
40
|
-
return 8
|
|
65
|
+
if (columnCount) {
|
|
66
|
+
return 24 / columnCount; // 2, 3, 4, 6, 8, 12
|
|
67
|
+
}
|
|
68
|
+
if (modalSize === 'xs' || modalSize === 'sm' || modalSize === 'md' || modalSize === 'lg' || modalSize === 'xlg' || modalSize === 'xxlg') {
|
|
69
|
+
return 24 / _data.general.modalSize[modalSize].columnNumber;
|
|
41
70
|
}
|
|
71
|
+
// if (modalSize === 'xs' || modalSize === 'sm') {
|
|
72
|
+
// // 栅格数量为:1
|
|
73
|
+
// return 24
|
|
74
|
+
// }
|
|
75
|
+
// if (modalSize === 'lg' || modalSize === 'xlg' || modalSize === 'xxlg') {
|
|
76
|
+
// // 栅格数量为:3
|
|
77
|
+
// return 8
|
|
78
|
+
// }
|
|
79
|
+
// 栅格数量为:2
|
|
42
80
|
return 12;
|
|
43
81
|
};
|
|
44
82
|
var updateFormFields = function updateFormFields() {
|
|
45
83
|
// if (newVal) form && form.setFieldsValue({ ...newVal })
|
|
46
84
|
if (doUpdateFormFields) doUpdateFormFields(); // 用于触发更新表单实例赋值
|
|
47
85
|
};
|
|
86
|
+
|
|
48
87
|
// useEffect(() => {
|
|
49
88
|
// // updateFormFields()
|
|
50
89
|
// }, [form])
|
|
90
|
+
|
|
51
91
|
// 渲染隐藏指定控件
|
|
52
92
|
var itemIsHide = function itemIsHide(isHide, getFieldsValue, FormInstance) {
|
|
53
93
|
if (typeof isHide === 'function') {
|
|
@@ -55,6 +95,73 @@ var RenderItemGroup = function RenderItemGroup(props) {
|
|
|
55
95
|
}
|
|
56
96
|
return isHide || false;
|
|
57
97
|
};
|
|
98
|
+
|
|
99
|
+
// 计算表单栅格数排版
|
|
100
|
+
// 优先级 displayLayout.side > displayLayout > general
|
|
101
|
+
// 优先级:若有displayLayout.block 则直接使用 general > displayLayout
|
|
102
|
+
// 还需要判断 layout为vertical还是horizontal
|
|
103
|
+
var calculateFormLayout = (0, _react.useCallback)(function (itemData) {
|
|
104
|
+
var formLayout = {};
|
|
105
|
+
// 当布局为 'inline' 时,不配置栅格结构
|
|
106
|
+
if (layout === 'inline') {
|
|
107
|
+
formLayout = {};
|
|
108
|
+
} else if (layout === 'vertical') {
|
|
109
|
+
formLayout = {
|
|
110
|
+
labelCol: {
|
|
111
|
+
span: 24
|
|
112
|
+
},
|
|
113
|
+
wrapperCol: {
|
|
114
|
+
span: 24
|
|
115
|
+
}
|
|
116
|
+
};
|
|
117
|
+
} else {
|
|
118
|
+
var _general$modalSize;
|
|
119
|
+
// @ts-ignore
|
|
120
|
+
var sizeFormLayout = (_general$modalSize = _data.general.modalSize) === null || _general$modalSize === void 0 ? void 0 : _general$modalSize[size].formLayout;
|
|
121
|
+
// @ts-ignore
|
|
122
|
+
var sizeFormBlockLayout = _data.general.modalSize[size].formBlockLayout;
|
|
123
|
+
// 优先级 displayLayout.side > displayLayout > general
|
|
124
|
+
// 优先级:若有displayLayout.block 则直接使用 general > displayLayout
|
|
125
|
+
// 还需要判断 layout为vertical还是horizontal
|
|
126
|
+
if (columnCount) {
|
|
127
|
+
// 有配置栅格数 1,2,3,4
|
|
128
|
+
switch (columnCount) {
|
|
129
|
+
case 1:
|
|
130
|
+
sizeFormLayout = _data.general.modalSize.sm.formLayout;
|
|
131
|
+
sizeFormBlockLayout = _data.general.modalSize.sm.formBlockLayout;
|
|
132
|
+
break;
|
|
133
|
+
case 2:
|
|
134
|
+
sizeFormLayout = _data.general.modalSize.md.formLayout;
|
|
135
|
+
sizeFormBlockLayout = _data.general.modalSize.md.formBlockLayout;
|
|
136
|
+
break;
|
|
137
|
+
case 3:
|
|
138
|
+
sizeFormLayout = _data.general.modalSize.lg.formLayout;
|
|
139
|
+
sizeFormBlockLayout = _data.general.modalSize.lg.formBlockLayout;
|
|
140
|
+
break;
|
|
141
|
+
case 4:
|
|
142
|
+
sizeFormLayout = _data.general.modalSize.xxlg.formLayout;
|
|
143
|
+
sizeFormBlockLayout = _data.general.modalSize.xxlg.formBlockLayout;
|
|
144
|
+
break;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
formLayout = (displayLayout === null || displayLayout === void 0 ? void 0 : displayLayout.side) || (displayLayout !== null && displayLayout !== void 0 && displayLayout.block ? sizeFormLayout : !displayLayout || JSON.stringify(displayLayout) === '{}' ? sizeFormLayout : displayLayout);
|
|
148
|
+
if (itemData.hasOwnProperty('display')) {
|
|
149
|
+
if ((itemData === null || itemData === void 0 ? void 0 : itemData.display) === 'block') {
|
|
150
|
+
// @ts-ignore
|
|
151
|
+
formLayout = (displayLayout === null || displayLayout === void 0 ? void 0 : displayLayout.block) || sizeFormBlockLayout;
|
|
152
|
+
} else if ((itemData === null || itemData === void 0 ? void 0 : itemData.display) === 'side') {
|
|
153
|
+
// 使用默认
|
|
154
|
+
// formLayout = displayLayout?.side || (displayLayout?.block ? general.modalSize[size].formLayout : displayLayout) || general.modalSize[size].formLayout
|
|
155
|
+
// formLayout = displayLayout?.side || (displayLayout?.block ? general.modalSize[size].formLayout : ((!displayLayout || JSON.stringify(displayLayout) === '{}') ? general.modalSize[size].formLayout : displayLayout))
|
|
156
|
+
} else {
|
|
157
|
+
// 对象格式
|
|
158
|
+
formLayout = itemData === null || itemData === void 0 ? void 0 : itemData.display; // 对象类型传值如: {labelCol: {span: 3},wrapperCol: {span: 8}} 优先级最高
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
return formLayout;
|
|
163
|
+
}, [size, layout, columnCount]);
|
|
164
|
+
|
|
58
165
|
// 渲染表单控件
|
|
59
166
|
var renderFormField = function renderFormField(field) {
|
|
60
167
|
var componentStyle = field.componentStyle,
|
|
@@ -62,11 +169,11 @@ var RenderItemGroup = function RenderItemGroup(props) {
|
|
|
62
169
|
preExtra = field.preExtra; // 当前可传参的配置值
|
|
63
170
|
// 带前缀或后缀控件渲染
|
|
64
171
|
if (preExtra || extra) {
|
|
65
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
172
|
+
return /*#__PURE__*/_react.default.createElement(_antd.Space, null, preExtra ? preExtra(field, form) : '', /*#__PURE__*/_react.default.createElement(FormItem, {
|
|
66
173
|
noStyle: true,
|
|
67
174
|
rules: field.rules || (field.fieldOptions ? field.fieldOptions.rules : []),
|
|
68
175
|
name: field.filedName
|
|
69
|
-
}, /*#__PURE__*/_react.default.createElement(_FieldComponent.default,
|
|
176
|
+
}, /*#__PURE__*/_react.default.createElement(_FieldComponent.default, _extends({}, field, {
|
|
70
177
|
onChange: function onChange(eOrValue) {
|
|
71
178
|
updateFormFields();
|
|
72
179
|
for (var _len = arguments.length, otherParams = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
@@ -76,10 +183,10 @@ var RenderItemGroup = function RenderItemGroup(props) {
|
|
|
76
183
|
},
|
|
77
184
|
fieldStatus: field.fieldStatus || fieldStatus,
|
|
78
185
|
size: field.protoConfig && field.protoConfig.size || field.size || fieldSize,
|
|
79
|
-
style: componentStyle ||
|
|
186
|
+
style: componentStyle || _objectSpread({}, _data.general.formItemStyle.wide)
|
|
80
187
|
}))), extra ? extra(field, form) : '');
|
|
81
188
|
} else {
|
|
82
|
-
return /*#__PURE__*/_react.default.createElement(_FieldComponent.default,
|
|
189
|
+
return /*#__PURE__*/_react.default.createElement(_FieldComponent.default, _extends({}, field, {
|
|
83
190
|
onChange: function onChange(eOrValue) {
|
|
84
191
|
// let updateValue = val
|
|
85
192
|
// if (field.type === 'input' || field.type === 'textarea' || field.type === 'radio' || field.type === 'password') {
|
|
@@ -95,7 +202,7 @@ var RenderItemGroup = function RenderItemGroup(props) {
|
|
|
95
202
|
},
|
|
96
203
|
fieldStatus: field.fieldStatus || fieldStatus,
|
|
97
204
|
size: field.protoConfig && field.protoConfig.size || field.size || fieldSize,
|
|
98
|
-
style: componentStyle ||
|
|
205
|
+
style: componentStyle || _objectSpread({}, _data.general.formItemStyle.wide)
|
|
99
206
|
}));
|
|
100
207
|
}
|
|
101
208
|
};
|
|
@@ -105,14 +212,14 @@ var RenderItemGroup = function RenderItemGroup(props) {
|
|
|
105
212
|
type = item.type,
|
|
106
213
|
customRender = item.customRender,
|
|
107
214
|
filedName = item.filedName; // 当前可传参的配置值
|
|
108
|
-
if (layout === "horizontal") {
|
|
109
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
215
|
+
if (layout === "horizontal" || layout === "vertical") {
|
|
216
|
+
return /*#__PURE__*/_react.default.createElement(_antd.Col, {
|
|
110
217
|
key: index,
|
|
111
|
-
span: item.colSpan || setColSpan(item.display, size)
|
|
112
|
-
}, /*#__PURE__*/_react.default.createElement(FormItem,
|
|
218
|
+
span: item.colSpan || setColSpan(item.display, size, columnCount)
|
|
219
|
+
}, /*#__PURE__*/_react.default.createElement(FormItem, _extends({
|
|
113
220
|
name: type !== 'custom' && filedName,
|
|
114
|
-
className: fieldStatus === 'viewOnly' ? 'form-item-view-only' : '',
|
|
115
|
-
label: description ? /*#__PURE__*/_react.default.createElement("span", null, label, /*#__PURE__*/_react.default.createElement(
|
|
221
|
+
className: (0, _classnames.default)(fieldStatus === 'viewOnly' ? 'form-item-view-only' : '', 'spec-item-group-form-item'),
|
|
222
|
+
label: description ? /*#__PURE__*/_react.default.createElement("span", null, label, /*#__PURE__*/_react.default.createElement(_antd.Tooltip, {
|
|
116
223
|
title: description
|
|
117
224
|
}, /*#__PURE__*/_react.default.createElement(_SpecIcon.default, {
|
|
118
225
|
name: "info"
|
|
@@ -121,21 +228,22 @@ var RenderItemGroup = function RenderItemGroup(props) {
|
|
|
121
228
|
required: item.rules && item.rules.filter(function (rItem) {
|
|
122
229
|
return rItem.required;
|
|
123
230
|
}).length > 0
|
|
124
|
-
}, formLayout, item.protoFormItem), type === 'custom' && customRender ? customRender(form,
|
|
231
|
+
}, formLayout, item.protoFormItem), type === 'custom' && customRender ? customRender(form, _objectSpread({}, item), fieldStatus) : renderFormField(_objectSpread({}, item))));
|
|
125
232
|
} else {
|
|
126
|
-
return /*#__PURE__*/_react.default.createElement(FormItem,
|
|
233
|
+
return /*#__PURE__*/_react.default.createElement(FormItem, _extends({
|
|
127
234
|
key: index,
|
|
128
235
|
name: type !== 'custom' && filedName,
|
|
129
|
-
className: fieldStatus === 'viewOnly' ? 'form-item-view-only' : '',
|
|
130
|
-
label: description ? /*#__PURE__*/_react.default.createElement("span", null, label, /*#__PURE__*/_react.default.createElement(
|
|
236
|
+
className: (0, _classnames.default)(fieldStatus === 'viewOnly' ? 'form-item-view-only' : '', 'spec-item-group-form-item'),
|
|
237
|
+
label: description ? /*#__PURE__*/_react.default.createElement("span", null, label, /*#__PURE__*/_react.default.createElement(_antd.Tooltip, {
|
|
131
238
|
title: description
|
|
132
239
|
}, /*#__PURE__*/_react.default.createElement(_SpecIcon.default, {
|
|
133
240
|
name: "info"
|
|
134
241
|
}))) : label,
|
|
135
242
|
rules: item.rules || (item.fieldOptions ? item.fieldOptions.rules : [])
|
|
136
|
-
}, formLayout, item.protoFormItem), type === 'custom' && customRender ? customRender(form,
|
|
243
|
+
}, formLayout, item.protoFormItem), type === 'custom' && customRender ? customRender(form, _objectSpread({}, item), fieldStatus) : renderFormField(_objectSpread({}, item)));
|
|
137
244
|
}
|
|
138
245
|
};
|
|
246
|
+
|
|
139
247
|
// 渲染表单控件列表
|
|
140
248
|
var renderItemGroupNode = function renderItemGroupNode() {
|
|
141
249
|
return itemGroup.map(function (item, index) {
|
|
@@ -144,30 +252,34 @@ var RenderItemGroup = function RenderItemGroup(props) {
|
|
|
144
252
|
type = item.type,
|
|
145
253
|
_item$display = item.display,
|
|
146
254
|
display = _item$display === void 0 ? 'side' : _item$display; // 当前可传参的配置值
|
|
147
|
-
|
|
255
|
+
|
|
256
|
+
var formLayout = calculateFormLayout(item);
|
|
148
257
|
// if (displayLayout) {
|
|
149
258
|
// // 如果未配置,则使用以下配置值
|
|
150
259
|
// formLayout = { ...displayLayout }
|
|
151
260
|
// }
|
|
152
261
|
// 优先级 displayLayout.side > displayLayout > general
|
|
153
262
|
// 优先级:若有displayLayout.block 则直接使用 general > displayLayout
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
}
|
|
167
|
-
//
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
263
|
+
// 还需要判断 layout为vertical还是horizontal
|
|
264
|
+
// @ts-ignore
|
|
265
|
+
// formLayout = displayLayout?.side || (displayLayout?.block ? general.modalSize[size].formLayout : ((!displayLayout || JSON.stringify(displayLayout) === '{}') ? general.modalSize[size].formLayout : displayLayout))
|
|
266
|
+
// if (item.hasOwnProperty('display')) {
|
|
267
|
+
// if (typeof display === 'string') {
|
|
268
|
+
// if (display === 'block') {
|
|
269
|
+
// // @ts-ignore
|
|
270
|
+
// formLayout = displayLayout?.block || general.modalSize[size].formBlockLayout
|
|
271
|
+
// } else {
|
|
272
|
+
// // 使用默认
|
|
273
|
+
// // formLayout = displayLayout?.side || (displayLayout?.block ? general.modalSize[size].formLayout : displayLayout) || general.modalSize[size].formLayout
|
|
274
|
+
// }
|
|
275
|
+
// } else {
|
|
276
|
+
// formLayout = item.display // 对象类型传值如: {labelCol: {span: 3},wrapperCol: {span: 8}} 优先级最高
|
|
277
|
+
// }
|
|
278
|
+
// }
|
|
279
|
+
// // 当布局为 'inline' 时,不配置栅格结构
|
|
280
|
+
// if (layout === 'inline') {
|
|
281
|
+
// formLayout = {}
|
|
282
|
+
// }
|
|
171
283
|
// title标题或html渲染
|
|
172
284
|
if (type === 'title' || type === 'html') {
|
|
173
285
|
return /*#__PURE__*/_react.default.createElement(FormItem, {
|
|
@@ -175,12 +287,12 @@ var RenderItemGroup = function RenderItemGroup(props) {
|
|
|
175
287
|
noStyle: true,
|
|
176
288
|
shouldUpdate: true
|
|
177
289
|
}, function (FormInstance) {
|
|
178
|
-
var
|
|
290
|
+
var _item$protoConfig;
|
|
179
291
|
// isHide 返回为true则隐藏当前控件
|
|
180
|
-
return !itemIsHide(isHide, FormInstance.getFieldValue(), FormInstance) ? /*#__PURE__*/_react.default.createElement(
|
|
292
|
+
return !itemIsHide(isHide, FormInstance.getFieldValue(), FormInstance) ? /*#__PURE__*/_react.default.createElement(_antd.Col, {
|
|
181
293
|
span: item.colSpan || 24
|
|
182
|
-
}, type === 'title' ? /*#__PURE__*/_react.default.createElement("h3",
|
|
183
|
-
className: "modalPanelTitle ".concat((
|
|
294
|
+
}, type === 'title' ? /*#__PURE__*/_react.default.createElement("h3", _extends({}, item.protoConfig, {
|
|
295
|
+
className: "modalPanelTitle ".concat((item === null || item === void 0 || (_item$protoConfig = item.protoConfig) === null || _item$protoConfig === void 0 ? void 0 : _item$protoConfig.className) || '')
|
|
184
296
|
}), label) : label) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, null);
|
|
185
297
|
});
|
|
186
298
|
}
|
|
@@ -198,17 +310,22 @@ var RenderItemGroup = function RenderItemGroup(props) {
|
|
|
198
310
|
return renderColFormItem(item, index, formLayout);
|
|
199
311
|
});
|
|
200
312
|
};
|
|
313
|
+
var itemGroupCls = (0, _classnames.default)(componentName, componentName + '-' + layout, props === null || props === void 0 ? void 0 : props.className, hashId);
|
|
314
|
+
return wrapSSR( /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null,
|
|
201
315
|
// itemGroup = Array 则按以下结构渲染
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
316
|
+
itemGroup && Array.isArray(itemGroup) ? layout === 'inline' ?
|
|
317
|
+
/*#__PURE__*/
|
|
318
|
+
// renderItemGroupNode() // 不带标签
|
|
319
|
+
_react.default.createElement("div", {
|
|
320
|
+
className: itemGroupCls
|
|
321
|
+
}, renderItemGroupNode())
|
|
322
|
+
// 布局配置为horizontal或vertical
|
|
323
|
+
: /*#__PURE__*/_react.default.createElement(_antd.Row, {
|
|
324
|
+
className: itemGroupCls,
|
|
325
|
+
gutter: layout === 'vertical' ? gutter || [20, 20] : gutter
|
|
326
|
+
}, renderItemGroupNode())
|
|
327
|
+
/* itemGroup = ReactNode则直接返回 */ : /*#__PURE__*/_react.default.createElement("div", {
|
|
328
|
+
className: itemGroupCls
|
|
329
|
+
}, itemGroup)));
|
|
212
330
|
};
|
|
213
|
-
var _default = RenderItemGroup;
|
|
214
|
-
exports.default = _default;
|
|
331
|
+
var _default = exports.default = RenderItemGroup;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _genStyleHook = require("../../../theme/utils/genStyleHook");
|
|
8
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
9
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
10
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
11
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
12
|
+
var ItemGroupStyleFunc = function ItemGroupStyleFunc(prefix) {
|
|
13
|
+
var prepareComponentToken = function prepareComponentToken(token) {
|
|
14
|
+
return {
|
|
15
|
+
// fontWeight: 400,
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
return (0, _genStyleHook.createStyleHook)(prefix, function (token) {
|
|
19
|
+
var prefixCls = ".".concat(prefix);
|
|
20
|
+
return [_defineProperty({}, prefixCls, {
|
|
21
|
+
'&.spec-item-group-inline': {
|
|
22
|
+
display: 'flex',
|
|
23
|
+
flexWrap: 'wrap',
|
|
24
|
+
'.spec-item-group-form-item': {
|
|
25
|
+
marginBottom: token.marginMD
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
'&.spec-item-group-vertical': {
|
|
29
|
+
'.spec-item-group-form-item': {
|
|
30
|
+
marginBottom: 0
|
|
31
|
+
},
|
|
32
|
+
'.modalPanelTitle, .modal-grid-title': {
|
|
33
|
+
marginBottom: 0
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
'.modalPanelTitle, .modal-grid-title': {
|
|
37
|
+
margin: "0 0 ".concat(token.marginMD, "px 0"),
|
|
38
|
+
// paddingBottom: token.paddingXS,
|
|
39
|
+
borderBottom: "1px solid ".concat(token.colorBorder),
|
|
40
|
+
fontSize: token.fontSize
|
|
41
|
+
}
|
|
42
|
+
}), {}];
|
|
43
|
+
}, prepareComponentToken // 当前组件扩展的变量
|
|
44
|
+
);
|
|
45
|
+
};
|
|
46
|
+
var _default = exports.default = ItemGroupStyleFunc;
|