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
|
@@ -11,5 +11,4 @@ var TitleNode = function TitleNode(props) {
|
|
|
11
11
|
data = props.data;
|
|
12
12
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, render ? render(data) : data.title || data.label);
|
|
13
13
|
};
|
|
14
|
-
var _default = TitleNode;
|
|
15
|
-
exports.default = _default;
|
|
14
|
+
var _default = exports.default = TitleNode;
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
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); }
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
10
|
+
var _antd = require("antd");
|
|
11
|
+
var _util = require("../Uploader/util");
|
|
12
|
+
var _UploaderStyle = _interopRequireDefault(require("./style/UploaderStyle"));
|
|
13
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
|
+
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); }
|
|
15
|
+
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; }
|
|
16
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
17
|
+
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."); }
|
|
18
|
+
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); }
|
|
19
|
+
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; }
|
|
20
|
+
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; } }
|
|
21
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
22
|
+
var UploaderViewer = function UploaderViewer(props) {
|
|
23
|
+
var value = props.value;
|
|
24
|
+
var componentName = 'spec-uploader-viewonly';
|
|
25
|
+
var _useUploaderStyle = (0, _UploaderStyle.default)(componentName),
|
|
26
|
+
_useUploaderStyle2 = _slicedToArray(_useUploaderStyle, 2),
|
|
27
|
+
wrapSSR = _useUploaderStyle2[0],
|
|
28
|
+
hashId = _useUploaderStyle2[1];
|
|
29
|
+
if (!value && value !== 0) return '-'; // 无值情况 下
|
|
30
|
+
if (Array.isArray(value)) {
|
|
31
|
+
var _ref;
|
|
32
|
+
var _useState = (0, _react.useState)(),
|
|
33
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
34
|
+
previews = _useState2[0],
|
|
35
|
+
setPreviews = _useState2[1];
|
|
36
|
+
(0, _react.useEffect)(function () {
|
|
37
|
+
var previewsUlr = [];
|
|
38
|
+
value.forEach(function (vItem) {
|
|
39
|
+
if (vItem !== null && vItem !== void 0 && vItem.downloadUrl) {
|
|
40
|
+
previewsUlr.push({
|
|
41
|
+
url: vItem.downloadUrl
|
|
42
|
+
});
|
|
43
|
+
// @ts-ignore
|
|
44
|
+
setPreviews(previewsUlr.filter(function (pItem) {
|
|
45
|
+
return pItem;
|
|
46
|
+
}));
|
|
47
|
+
} else {
|
|
48
|
+
if (vItem !== null && vItem !== void 0 && vItem.originFileObj) (0, _util.getBase64)(vItem.originFileObj).then(function (result) {
|
|
49
|
+
previewsUlr.push(result);
|
|
50
|
+
// @ts-ignore
|
|
51
|
+
setPreviews(previewsUlr.filter(function (pItem) {
|
|
52
|
+
return pItem;
|
|
53
|
+
}));
|
|
54
|
+
return result;
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
}, [value]);
|
|
59
|
+
return wrapSSR( /*#__PURE__*/_react.default.createElement("div", {
|
|
60
|
+
className: (0, _classnames.default)('spec-uploader-viewonly', hashId)
|
|
61
|
+
}, /*#__PURE__*/_react.default.createElement(_antd.Image.PreviewGroup, null, // @ts-ignore
|
|
62
|
+
(_ref = previews || []) === null || _ref === void 0 ? void 0 : _ref.map(function (item, index) {
|
|
63
|
+
return item !== null && item !== void 0 && item.url ? /*#__PURE__*/_react.default.createElement(_antd.Image, {
|
|
64
|
+
key: index,
|
|
65
|
+
width: 100,
|
|
66
|
+
height: 100,
|
|
67
|
+
style: {
|
|
68
|
+
objectFit: 'contain'
|
|
69
|
+
}
|
|
70
|
+
// @ts-ignore
|
|
71
|
+
,
|
|
72
|
+
src: item.url
|
|
73
|
+
}) : /*#__PURE__*/_react.default.createElement("div", {
|
|
74
|
+
key: index,
|
|
75
|
+
className: "spec-uploader-viewonly-item"
|
|
76
|
+
}, "\u6682\u65E0\u56FE\u7247");
|
|
77
|
+
}))));
|
|
78
|
+
} else {
|
|
79
|
+
var _useState3 = (0, _react.useState)(),
|
|
80
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
81
|
+
preview = _useState4[0],
|
|
82
|
+
setPreview = _useState4[1];
|
|
83
|
+
(0, _react.useEffect)(function () {
|
|
84
|
+
(0, _util.getBase64)(value).then(function (result) {
|
|
85
|
+
// @ts-ignore
|
|
86
|
+
setPreview(result);
|
|
87
|
+
});
|
|
88
|
+
}, [value]);
|
|
89
|
+
return wrapSSR( /*#__PURE__*/_react.default.createElement("div", {
|
|
90
|
+
className: (0, _classnames.default)('spec-uploader-viewonly', hashId)
|
|
91
|
+
}, preview ? /*#__PURE__*/_react.default.createElement(_antd.Image, {
|
|
92
|
+
style: {
|
|
93
|
+
objectFit: 'contain'
|
|
94
|
+
},
|
|
95
|
+
width: 100
|
|
96
|
+
// @ts-ignore
|
|
97
|
+
,
|
|
98
|
+
src: preview === null || preview === void 0 ? void 0 : preview.url
|
|
99
|
+
}) : '暂无图片'));
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
var _default = exports.default = UploaderViewer;
|
|
@@ -14,7 +14,7 @@ export interface FieldComponentProps {
|
|
|
14
14
|
filedName?: string;
|
|
15
15
|
value?: any;
|
|
16
16
|
protoConfig?: any;
|
|
17
|
-
onChange?: (value?: any, option?: any) => void;
|
|
17
|
+
onChange?: (value?: any, option?: any) => void | any;
|
|
18
18
|
selectOptions?: any[];
|
|
19
19
|
selectOptionName?: OptionNameProps;
|
|
20
20
|
fieldNames?: OptionNameProps;
|
|
@@ -4,44 +4,29 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
require("antd/es/rate/style");
|
|
8
|
-
var _rate = _interopRequireDefault(require("antd/es/rate"));
|
|
9
|
-
require("antd/es/mentions/style");
|
|
10
|
-
var _mentions = _interopRequireDefault(require("antd/es/mentions"));
|
|
11
|
-
require("antd/es/slider/style");
|
|
12
|
-
var _slider = _interopRequireDefault(require("antd/es/slider"));
|
|
13
|
-
require("antd/es/switch/style");
|
|
14
|
-
var _switch = _interopRequireDefault(require("antd/es/switch"));
|
|
15
|
-
require("antd/es/cascader/style");
|
|
16
|
-
var _cascader = _interopRequireDefault(require("antd/es/cascader"));
|
|
17
|
-
require("antd/es/button/style");
|
|
18
|
-
var _button = _interopRequireDefault(require("antd/es/button"));
|
|
19
|
-
require("antd/es/time-picker/style");
|
|
20
|
-
var _timePicker = _interopRequireDefault(require("antd/es/time-picker"));
|
|
21
|
-
require("antd/es/radio/style");
|
|
22
|
-
var _radio = _interopRequireDefault(require("antd/es/radio"));
|
|
23
|
-
require("antd/es/checkbox/style");
|
|
24
|
-
var _checkbox = _interopRequireDefault(require("antd/es/checkbox"));
|
|
25
|
-
require("antd/es/input-number/style");
|
|
26
|
-
var _inputNumber = _interopRequireDefault(require("antd/es/input-number"));
|
|
27
|
-
require("antd/es/date-picker/style");
|
|
28
|
-
var _datePicker = _interopRequireDefault(require("antd/es/date-picker"));
|
|
29
|
-
require("antd/es/select/style");
|
|
30
|
-
var _select = _interopRequireDefault(require("antd/es/select"));
|
|
31
|
-
require("antd/es/input/style");
|
|
32
|
-
var _input = _interopRequireDefault(require("antd/es/input"));
|
|
33
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _antd = require("antd");
|
|
34
9
|
var _Uploader = _interopRequireDefault(require("../Uploader"));
|
|
35
10
|
var _SpecIcon = _interopRequireDefault(require("../../SpecIcon"));
|
|
36
|
-
var _RefactorTreeSelect = _interopRequireDefault(require("./RefactorTreeSelect
|
|
37
|
-
var _setReadonlyValues = require("./setReadonlyValues
|
|
11
|
+
var _RefactorTreeSelect = _interopRequireDefault(require("./RefactorTreeSelect"));
|
|
12
|
+
var _setReadonlyValues = require("./setReadonlyValues");
|
|
38
13
|
var _TitleNode = _interopRequireDefault(require("./TitleNode"));
|
|
39
14
|
var _ReUpload = _interopRequireDefault(require("./ReUpload"));
|
|
15
|
+
var _UploaderViewer = _interopRequireDefault(require("./UploaderViewer"));
|
|
40
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
var
|
|
44
|
-
var
|
|
17
|
+
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); }
|
|
18
|
+
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); }
|
|
19
|
+
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; }
|
|
20
|
+
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; }
|
|
21
|
+
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; }
|
|
22
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
23
|
+
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); } /* eslint-disable */ // @ts-ignore
|
|
24
|
+
// @ts-ignore
|
|
25
|
+
var TextArea = _antd.Input.TextArea,
|
|
26
|
+
Password = _antd.Input.Password;
|
|
27
|
+
var Option = _antd.Select.Option;
|
|
28
|
+
var RangePicker = _antd.DatePicker.RangePicker;
|
|
29
|
+
// 表单组件类型
|
|
45
30
|
var FieldComponent = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
46
31
|
var type = props.type,
|
|
47
32
|
_onChange = props.onChange,
|
|
@@ -80,7 +65,7 @@ var FieldComponent = /*#__PURE__*/_react.default.forwardRef(function (props, ref
|
|
|
80
65
|
if (selectOptionName && selectOptions) {
|
|
81
66
|
// 将传值的数据进行转换
|
|
82
67
|
selectOptions = selectOptions.map(function (item) {
|
|
83
|
-
return
|
|
68
|
+
return _objectSpread(_objectSpread({}, item), {}, {
|
|
84
69
|
value: item[selectOptionName.value || 'value'],
|
|
85
70
|
label: item[selectOptionName.label || 'label'],
|
|
86
71
|
disabled: item[selectOptionName.disabled || 'disabled'],
|
|
@@ -88,7 +73,7 @@ var FieldComponent = /*#__PURE__*/_react.default.forwardRef(function (props, ref
|
|
|
88
73
|
});
|
|
89
74
|
});
|
|
90
75
|
}
|
|
91
|
-
var defaultProps =
|
|
76
|
+
var defaultProps = _objectSpread({
|
|
92
77
|
style: style,
|
|
93
78
|
onChange: _onChange,
|
|
94
79
|
value: value,
|
|
@@ -111,7 +96,7 @@ var FieldComponent = /*#__PURE__*/_react.default.forwardRef(function (props, ref
|
|
|
111
96
|
var viewOnly = fieldStatus === 'viewOnly'; // 是否纯展示
|
|
112
97
|
switch (type) {
|
|
113
98
|
case 'input':
|
|
114
|
-
compContent = viewOnly ? value || '-' : /*#__PURE__*/_react.default.createElement(
|
|
99
|
+
compContent = viewOnly ? value || '-' : /*#__PURE__*/_react.default.createElement(_antd.Input, _extends({
|
|
115
100
|
placeholder: fieldStatus === 'disabled' || defaultProps.disabled ? '' : defaultProps.placeholder || placeholder || '请输入',
|
|
116
101
|
autoComplete: "off",
|
|
117
102
|
title: fieldStatus === 'disabled' || defaultProps.disabled ? value : null,
|
|
@@ -119,24 +104,24 @@ var FieldComponent = /*#__PURE__*/_react.default.forwardRef(function (props, ref
|
|
|
119
104
|
}, defaultProps));
|
|
120
105
|
break;
|
|
121
106
|
case 'password':
|
|
122
|
-
compContent = viewOnly ? value ? "\u25CF\u25CF\u25CF\u25CF\u25CF\u25CF" : '-' : /*#__PURE__*/_react.default.createElement(Password,
|
|
107
|
+
compContent = viewOnly ? value ? "\u25CF\u25CF\u25CF\u25CF\u25CF\u25CF" : '-' : /*#__PURE__*/_react.default.createElement(Password, _extends({
|
|
123
108
|
autoComplete: "off",
|
|
124
109
|
placeholder: fieldStatus === 'disabled' || defaultProps.disabled ? '' : defaultProps.placeholder || placeholder || '请输入',
|
|
125
110
|
maxLength: defaultProps.maxLength || 50
|
|
126
111
|
}, defaultProps));
|
|
127
112
|
break;
|
|
128
113
|
case 'textarea':
|
|
129
|
-
compContent = viewOnly ? value || '-' : /*#__PURE__*/_react.default.createElement(TextArea,
|
|
114
|
+
compContent = viewOnly ? value || '-' : /*#__PURE__*/_react.default.createElement(TextArea, _extends({
|
|
130
115
|
placeholder: fieldStatus === 'disabled' || defaultProps.disabled ? '' : defaultProps.placeholder || placeholder || '请输入',
|
|
131
116
|
maxLength: defaultProps.maxLength || 500,
|
|
132
117
|
title: fieldStatus === 'disabled' || defaultProps.disabled ? value : null
|
|
133
118
|
}, defaultProps));
|
|
134
119
|
break;
|
|
135
120
|
case 'inputNumber':
|
|
136
|
-
compContent = viewOnly ? value || 0 : /*#__PURE__*/_react.default.createElement(
|
|
121
|
+
compContent = viewOnly ? value || 0 : /*#__PURE__*/_react.default.createElement(_antd.InputNumber, _extends({
|
|
137
122
|
placeholder: fieldStatus === 'disabled' || defaultProps.disabled ? '' : defaultProps.placeholder || placeholder || '请输入数字'
|
|
138
123
|
}, sortLimitRule, defaultProps, {
|
|
139
|
-
style:
|
|
124
|
+
style: _objectSpread({
|
|
140
125
|
width: '120px'
|
|
141
126
|
}, defaultProps.style)
|
|
142
127
|
}));
|
|
@@ -145,34 +130,36 @@ var FieldComponent = /*#__PURE__*/_react.default.forwardRef(function (props, ref
|
|
|
145
130
|
// 重置返回完整字段值
|
|
146
131
|
var resetResultOption = function resetResultOption(Option) {
|
|
147
132
|
if (!Option) return Option;
|
|
148
|
-
if (Array.isArray(Option)) return selectOptions.filter(function (childOpt) {
|
|
133
|
+
if (Array.isArray(Option)) return (selectOptions || []).filter(function (childOpt) {
|
|
149
134
|
return Option.filter(function (optItem) {
|
|
150
135
|
return childOpt.value === optItem.value;
|
|
151
136
|
}).length > 0;
|
|
152
137
|
}); // 数据为数组
|
|
153
|
-
var extraParam = selectOptions.filter(function (childOpt) {
|
|
138
|
+
var extraParam = (selectOptions || []).filter(function (childOpt) {
|
|
154
139
|
return childOpt.value === Option.value;
|
|
155
140
|
})[0];
|
|
156
|
-
return
|
|
141
|
+
return _objectSpread(_objectSpread({}, Option), extraParam);
|
|
157
142
|
};
|
|
158
143
|
compContent = viewOnly ? (0, _setReadonlyValues.setSelectValue)(value, {
|
|
159
144
|
selectOptions: selectOptions,
|
|
160
145
|
selectOptionRender: selectOptionRender,
|
|
161
146
|
defaultProps: defaultProps,
|
|
162
147
|
type: type
|
|
163
|
-
}) : /*#__PURE__*/_react.default.createElement(
|
|
148
|
+
}) : /*#__PURE__*/_react.default.createElement(_antd.Select, _extends({
|
|
164
149
|
allowClear: true,
|
|
165
150
|
placeholder: fieldStatus === 'disabled' || defaultProps.disabled ? '' : defaultProps.placeholder || placeholder || "".concat(defaultProps.showSearch ? '请输入选择' : '请选择'),
|
|
166
151
|
filterOption: function filterOption(inputValue, option) {
|
|
167
152
|
return defaultProps.showSearch ? option.children.toLowerCase().indexOf(inputValue.toLowerCase()) >= 0 : false;
|
|
168
153
|
},
|
|
169
154
|
value: value
|
|
155
|
+
// fieldNames={fieldNames || selectOptionName}
|
|
156
|
+
// options={selectOptions}
|
|
170
157
|
}, defaultProps, {
|
|
171
158
|
// onChange返回参数:累加当前选中包括其他字段值的数据
|
|
172
159
|
onChange: function onChange(value, Option) {
|
|
173
|
-
return _onChange(value, resetResultOption(Option));
|
|
174
|
-
}
|
|
175
|
-
}),
|
|
160
|
+
return _onChange && _onChange(value, resetResultOption(Option));
|
|
161
|
+
} // 数据为对象
|
|
162
|
+
}), defaultProps !== null && defaultProps !== void 0 && defaultProps.fieldNames ? null : (selectOptions || []).map(function (val, index) {
|
|
176
163
|
return /*#__PURE__*/_react.default.createElement(Option, {
|
|
177
164
|
value: val.value,
|
|
178
165
|
key: val.value || index,
|
|
@@ -182,7 +169,7 @@ var FieldComponent = /*#__PURE__*/_react.default.forwardRef(function (props, ref
|
|
|
182
169
|
}));
|
|
183
170
|
break;
|
|
184
171
|
case 'tree-select':
|
|
185
|
-
compContent = /*#__PURE__*/_react.default.createElement(_RefactorTreeSelect.default,
|
|
172
|
+
compContent = /*#__PURE__*/_react.default.createElement(_RefactorTreeSelect.default, _extends({
|
|
186
173
|
treeData: treeData,
|
|
187
174
|
treeOptionName: treeOptionName,
|
|
188
175
|
allowClear: true,
|
|
@@ -201,20 +188,22 @@ var FieldComponent = /*#__PURE__*/_react.default.forwardRef(function (props, ref
|
|
|
201
188
|
selectOptionRender: selectOptionRender,
|
|
202
189
|
defaultProps: defaultProps,
|
|
203
190
|
separator: separator
|
|
204
|
-
}) : /*#__PURE__*/_react.default.createElement(
|
|
205
|
-
style:
|
|
191
|
+
}) : /*#__PURE__*/_react.default.createElement(_antd.Checkbox.Group, _extends({}, defaultProps, {
|
|
192
|
+
style: _objectSpread({
|
|
206
193
|
width: 'auto'
|
|
207
194
|
}, defaultProps.style)
|
|
208
195
|
}), selectOptions && selectOptions.map(function (val, index) {
|
|
209
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
196
|
+
return /*#__PURE__*/_react.default.createElement(_antd.Checkbox, {
|
|
210
197
|
value: val.value,
|
|
211
|
-
key: val.value || index
|
|
198
|
+
key: val.value || index
|
|
212
199
|
// @ts-ignore
|
|
200
|
+
,
|
|
213
201
|
title: /*#__PURE__*/_react.default.createElement(_TitleNode.default, {
|
|
214
202
|
render: selectOptionRender,
|
|
215
203
|
data: val
|
|
216
|
-
})
|
|
204
|
+
})
|
|
217
205
|
// title={selectOptionRender ? selectOptionRender(val) : (val.title || val.label)}
|
|
206
|
+
,
|
|
218
207
|
disabled: val.disabled
|
|
219
208
|
}, selectOptionRender ? selectOptionRender(val) : val.label);
|
|
220
209
|
}));
|
|
@@ -225,33 +214,16 @@ var FieldComponent = /*#__PURE__*/_react.default.forwardRef(function (props, ref
|
|
|
225
214
|
selectOptions: selectOptions,
|
|
226
215
|
selectOptionRender: selectOptionRender,
|
|
227
216
|
defaultProps: defaultProps
|
|
228
|
-
}) : /*#__PURE__*/_react.default.createElement(
|
|
229
|
-
|
|
217
|
+
}) : /*#__PURE__*/_react.default.createElement(_antd.Radio.Group, _extends({
|
|
218
|
+
options: (selectOptions || []).map(function (val) {
|
|
219
|
+
return _objectSpread(_objectSpread({}, val), {}, {
|
|
220
|
+
label: selectOptionRender ? selectOptionRender(val) : val.label
|
|
221
|
+
});
|
|
222
|
+
})
|
|
223
|
+
}, defaultProps, {
|
|
224
|
+
style: _objectSpread({
|
|
230
225
|
width: 'auto'
|
|
231
226
|
}, defaultProps.style)
|
|
232
|
-
}), selectOptions && selectOptions.map(function (val, index) {
|
|
233
|
-
if (defaultProps.optionType === 'button') {
|
|
234
|
-
return /*#__PURE__*/_react.default.createElement(_radio.default.Button, {
|
|
235
|
-
value: val.value,
|
|
236
|
-
key: val.value || index,
|
|
237
|
-
// @ts-ignore
|
|
238
|
-
title: /*#__PURE__*/_react.default.createElement(_TitleNode.default, {
|
|
239
|
-
render: selectOptionRender,
|
|
240
|
-
data: val
|
|
241
|
-
}),
|
|
242
|
-
disabled: val.disabled
|
|
243
|
-
}, selectOptionRender ? selectOptionRender(val) : val.label);
|
|
244
|
-
}
|
|
245
|
-
return /*#__PURE__*/_react.default.createElement(_radio.default, {
|
|
246
|
-
value: val.value,
|
|
247
|
-
key: val.value,
|
|
248
|
-
// @ts-ignore
|
|
249
|
-
title: /*#__PURE__*/_react.default.createElement(_TitleNode.default, {
|
|
250
|
-
render: selectOptionRender,
|
|
251
|
-
data: val
|
|
252
|
-
}),
|
|
253
|
-
disabled: val.disabled
|
|
254
|
-
}, selectOptionRender ? selectOptionRender(val) : val.label);
|
|
255
227
|
}));
|
|
256
228
|
break;
|
|
257
229
|
case 'datePicker': // 使用配置 picker设置其属于week,month,year
|
|
@@ -259,11 +231,11 @@ var FieldComponent = /*#__PURE__*/_react.default.forwardRef(function (props, ref
|
|
|
259
231
|
compContent = viewOnly ? (0, _setReadonlyValues.setDatePickerValue)(value, {
|
|
260
232
|
type: type,
|
|
261
233
|
protoConfig: protoConfig
|
|
262
|
-
}) : /*#__PURE__*/_react.default.createElement(
|
|
234
|
+
}) : /*#__PURE__*/_react.default.createElement(_antd.DatePicker, _extends({
|
|
263
235
|
showTime: defaultProps.showTime || type === 'dateTimePicker',
|
|
264
236
|
placeholder: fieldStatus === 'disabled' || defaultProps.disabled ? '' : defaultProps.placeholder || placeholder || '请选择'
|
|
265
237
|
}, defaultProps, {
|
|
266
|
-
style:
|
|
238
|
+
style: _objectSpread({
|
|
267
239
|
'minWidth': 'auto'
|
|
268
240
|
}, defaultProps.style)
|
|
269
241
|
}));
|
|
@@ -274,10 +246,11 @@ var FieldComponent = /*#__PURE__*/_react.default.forwardRef(function (props, ref
|
|
|
274
246
|
compContent = viewOnly ? (0, _setReadonlyValues.setDatePickerValue)(value, {
|
|
275
247
|
type: type,
|
|
276
248
|
protoConfig: protoConfig
|
|
277
|
-
}) : /*#__PURE__*/_react.default.createElement(RangePicker,
|
|
278
|
-
showTime: defaultProps.showTime || type === 'rangeTimePicker'
|
|
249
|
+
}) : /*#__PURE__*/_react.default.createElement(RangePicker, _extends({
|
|
250
|
+
showTime: defaultProps.showTime || type === 'rangeTimePicker',
|
|
251
|
+
allowEmpty: true
|
|
279
252
|
}, defaultProps, {
|
|
280
|
-
style:
|
|
253
|
+
style: _objectSpread({
|
|
281
254
|
width: type === 'rangeTimePicker' ? 'auto' : '100%'
|
|
282
255
|
}, defaultProps.style)
|
|
283
256
|
}));
|
|
@@ -287,10 +260,10 @@ var FieldComponent = /*#__PURE__*/_react.default.forwardRef(function (props, ref
|
|
|
287
260
|
compContent = viewOnly ? (0, _setReadonlyValues.setTimePickerValue)(value, {
|
|
288
261
|
type: type,
|
|
289
262
|
protoConfig: protoConfig
|
|
290
|
-
}) : /*#__PURE__*/_react.default.createElement(
|
|
291
|
-
style:
|
|
263
|
+
}) : /*#__PURE__*/_react.default.createElement(_antd.TimePicker, _extends({}, defaultProps, {
|
|
264
|
+
style: _objectSpread(_objectSpread({
|
|
292
265
|
'minWidth': 'auto'
|
|
293
|
-
}, defaultProps.style), {
|
|
266
|
+
}, defaultProps.style), {}, {
|
|
294
267
|
width: 'auto'
|
|
295
268
|
})
|
|
296
269
|
}));
|
|
@@ -301,16 +274,18 @@ var FieldComponent = /*#__PURE__*/_react.default.forwardRef(function (props, ref
|
|
|
301
274
|
compContent = viewOnly ? (0, _setReadonlyValues.setTimePickerValue)(value, {
|
|
302
275
|
type: type,
|
|
303
276
|
protoConfig: protoConfig
|
|
304
|
-
}) : /*#__PURE__*/_react.default.createElement(
|
|
305
|
-
|
|
277
|
+
}) : /*#__PURE__*/_react.default.createElement(_antd.TimePicker.RangePicker, _extends({
|
|
278
|
+
allowEmpty: true
|
|
279
|
+
}, defaultProps, {
|
|
280
|
+
style: _objectSpread(_objectSpread({
|
|
306
281
|
'minWidth': 'auto'
|
|
307
|
-
}, defaultProps.style), {
|
|
282
|
+
}, defaultProps.style), {}, {
|
|
308
283
|
width: 'auto'
|
|
309
284
|
})
|
|
310
285
|
}));
|
|
311
286
|
break;
|
|
312
287
|
case 'upload':
|
|
313
|
-
compContent = viewOnly && (!value || value.length === 0) ? '-' : /*#__PURE__*/_react.default.createElement(_ReUpload.default,
|
|
288
|
+
compContent = viewOnly && (!value || value.length === 0) ? '-' : /*#__PURE__*/_react.default.createElement(_ReUpload.default, _extends({}, defaultProps, {
|
|
314
289
|
viewOnly: viewOnly,
|
|
315
290
|
disabled: viewOnly || fieldStatus === 'disabled' || defaultProps.disabled
|
|
316
291
|
}), defaultProps.children ? defaultProps.children : defaultProps.fileList && defaultProps.fileList.length >= 1 || defaultProps.defaultFileList && defaultProps.defaultFileList.length >= 1 ? null : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, defaultProps.listType === 'picture-card' ? /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -319,12 +294,14 @@ var FieldComponent = /*#__PURE__*/_react.default.forwardRef(function (props, ref
|
|
|
319
294
|
name: "plus"
|
|
320
295
|
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
321
296
|
className: "ant-upload-text"
|
|
322
|
-
}, "\u70B9\u51FB\u9009\u62E9")) : /*#__PURE__*/_react.default.createElement(
|
|
297
|
+
}, "\u70B9\u51FB\u9009\u62E9")) : /*#__PURE__*/_react.default.createElement(_antd.Button, null, /*#__PURE__*/_react.default.createElement(_SpecIcon.default, {
|
|
323
298
|
name: "upload"
|
|
324
299
|
}), " \u70B9\u51FB\u4E0A\u4F20")));
|
|
325
300
|
break;
|
|
326
301
|
case 'uploader':
|
|
327
|
-
compContent = viewOnly ?
|
|
302
|
+
compContent = viewOnly ? /*#__PURE__*/_react.default.createElement(_UploaderViewer.default, {
|
|
303
|
+
value: value
|
|
304
|
+
}) : /*#__PURE__*/_react.default.createElement(_Uploader.default, _extends({}, defaultProps, {
|
|
328
305
|
size: protoConfig === null || protoConfig === void 0 ? void 0 : protoConfig.size
|
|
329
306
|
}));
|
|
330
307
|
// compContent = <Uploader {...defaultProps}></Uploader>
|
|
@@ -334,7 +311,7 @@ var FieldComponent = /*#__PURE__*/_react.default.forwardRef(function (props, ref
|
|
|
334
311
|
selectOptions: selectOptions,
|
|
335
312
|
selectOptionRender: selectOptionRender,
|
|
336
313
|
defaultProps: defaultProps
|
|
337
|
-
}) : /*#__PURE__*/_react.default.createElement(
|
|
314
|
+
}) : /*#__PURE__*/_react.default.createElement(_antd.Cascader, _extends({
|
|
338
315
|
options: selectOptions,
|
|
339
316
|
allowClear: true,
|
|
340
317
|
fieldNames: (defaultProps === null || defaultProps === void 0 ? void 0 : defaultProps.fieldNames) || selectOptionName,
|
|
@@ -342,32 +319,32 @@ var FieldComponent = /*#__PURE__*/_react.default.forwardRef(function (props, ref
|
|
|
342
319
|
}, defaultProps));
|
|
343
320
|
break;
|
|
344
321
|
case 'switch':
|
|
345
|
-
compContent = /*#__PURE__*/_react.default.createElement(
|
|
322
|
+
compContent = /*#__PURE__*/_react.default.createElement(_antd.Switch, _extends({}, defaultProps, {
|
|
346
323
|
disabled: viewOnly || defaultProps.disabled,
|
|
347
324
|
checked: value,
|
|
348
|
-
style:
|
|
325
|
+
style: _objectSpread(_objectSpread({}, defaultProps.style), {}, {
|
|
349
326
|
width: 'auto'
|
|
350
327
|
})
|
|
351
328
|
}));
|
|
352
329
|
// compContent = viewOnly ? (String(value) === 'undefined' ? '-' : String(value)) : (<Switch {...defaultProps} checked={value} style={{ ...defaultProps.style, width: 'auto' }} />)
|
|
353
330
|
break;
|
|
354
331
|
case 'slider':
|
|
355
|
-
compContent = viewOnly ? value : /*#__PURE__*/_react.default.createElement(
|
|
356
|
-
style:
|
|
332
|
+
compContent = viewOnly ? value : /*#__PURE__*/_react.default.createElement(_antd.Slider, _extends({}, defaultProps, {
|
|
333
|
+
style: _objectSpread({}, defaultProps.style)
|
|
357
334
|
}));
|
|
358
335
|
break;
|
|
359
336
|
case 'mentions':
|
|
360
|
-
compContent = viewOnly ? value : /*#__PURE__*/_react.default.createElement(
|
|
361
|
-
placeholder: "\u8BF7\u8F93\u5165 ".concat(defaultProps.prefix || '@', " \u9009\u62E9")
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
}
|
|
367
|
-
}));
|
|
337
|
+
compContent = viewOnly ? value : /*#__PURE__*/_react.default.createElement(_antd.Mentions, _extends({
|
|
338
|
+
placeholder: "\u8BF7\u8F93\u5165 ".concat(defaultProps.prefix || '@', " \u9009\u62E9"),
|
|
339
|
+
options: (selectOptions || []).map(function (val) {
|
|
340
|
+
return _objectSpread(_objectSpread({}, val), {}, {
|
|
341
|
+
label: selectOptionRender ? selectOptionRender(val) : val.label
|
|
342
|
+
});
|
|
343
|
+
})
|
|
344
|
+
}, defaultProps));
|
|
368
345
|
break;
|
|
369
346
|
case 'rate':
|
|
370
|
-
compContent = /*#__PURE__*/_react.default.createElement(
|
|
347
|
+
compContent = /*#__PURE__*/_react.default.createElement(_antd.Rate, _extends({
|
|
371
348
|
disabled: viewOnly || defaultProps.disabled
|
|
372
349
|
}, defaultProps));
|
|
373
350
|
break;
|
|
@@ -380,5 +357,4 @@ var FieldComponent = /*#__PURE__*/_react.default.forwardRef(function (props, ref
|
|
|
380
357
|
}
|
|
381
358
|
return compContent;
|
|
382
359
|
});
|
|
383
|
-
var _default = FieldComponent;
|
|
384
|
-
exports.default = _default;
|
|
360
|
+
var _default = exports.default = FieldComponent;
|