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
|
@@ -1,28 +1,59 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
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); }
|
|
2
|
+
var _excluded = ["data", "rowKey", "rowSelection", "columns", "hideOrderNumber", "orderNumber", "className", "emptyText", "codes", "permissionCodes", "columnsConfig", "title", "buttonGroup", "buttonGroupConfig", "min"];
|
|
3
|
+
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); }
|
|
4
|
+
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; }
|
|
5
|
+
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; }
|
|
6
|
+
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; }
|
|
7
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
8
|
+
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); }
|
|
9
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
10
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
11
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
12
|
+
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."); }
|
|
13
|
+
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); }
|
|
14
|
+
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; }
|
|
15
|
+
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; } }
|
|
16
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
17
|
+
import React, { useContext } from 'react';
|
|
7
18
|
import classNames from 'classnames';
|
|
8
|
-
import
|
|
9
|
-
import
|
|
19
|
+
import { Table, Card } from 'antd';
|
|
20
|
+
import ButtonGroup from "../ButtonGroup/index";
|
|
21
|
+
import "./style/index.less";
|
|
22
|
+
import { FanContext } from "../ConfigContext";
|
|
23
|
+
import useStyle from "./style/index";
|
|
10
24
|
var StandardTable = function StandardTable(props) {
|
|
25
|
+
var InitFanContext = useContext(FanContext);
|
|
26
|
+
var providerConfig = InitFanContext['StandardTable'] || {}; // 使用上下文(全局配置)设置扩展的配置项
|
|
27
|
+
|
|
28
|
+
var componentName = 'spec-standard-table';
|
|
29
|
+
var _useStyle = useStyle(componentName),
|
|
30
|
+
_useStyle2 = _slicedToArray(_useStyle, 2),
|
|
31
|
+
wrapSSR = _useStyle2[0],
|
|
32
|
+
hashId = _useStyle2[1];
|
|
11
33
|
// const ref= React.createRef<Card>();
|
|
12
|
-
var
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
34
|
+
var _providerConfig$props = _objectSpread(_objectSpread({}, providerConfig), props),
|
|
35
|
+
_providerConfig$props2 = _providerConfig$props.data,
|
|
36
|
+
data = _providerConfig$props2 === void 0 ? {} : _providerConfig$props2,
|
|
37
|
+
rowKey = _providerConfig$props.rowKey,
|
|
38
|
+
rowSelection = _providerConfig$props.rowSelection,
|
|
39
|
+
columns = _providerConfig$props.columns,
|
|
40
|
+
hideOrderNumber = _providerConfig$props.hideOrderNumber,
|
|
41
|
+
_providerConfig$props3 = _providerConfig$props.orderNumber,
|
|
42
|
+
orderNumber = _providerConfig$props3 === void 0 ? {} : _providerConfig$props3,
|
|
43
|
+
className = _providerConfig$props.className,
|
|
44
|
+
emptyText = _providerConfig$props.emptyText,
|
|
45
|
+
codes = _providerConfig$props.codes,
|
|
46
|
+
permissionCodes = _providerConfig$props.permissionCodes,
|
|
47
|
+
_providerConfig$props4 = _providerConfig$props.columnsConfig,
|
|
48
|
+
columnsConfig = _providerConfig$props4 === void 0 ? {} : _providerConfig$props4,
|
|
49
|
+
title = _providerConfig$props.title,
|
|
50
|
+
buttonGroup = _providerConfig$props.buttonGroup,
|
|
51
|
+
buttonGroupConfig = _providerConfig$props.buttonGroupConfig,
|
|
52
|
+
min = _providerConfig$props.min,
|
|
53
|
+
rest = _objectWithoutProperties(_providerConfig$props, _excluded);
|
|
54
|
+
|
|
55
|
+
// 加上类型修复 TS:2322 报警
|
|
56
|
+
var resetColumns = [_objectSpread(_objectSpread({
|
|
26
57
|
width: 58,
|
|
27
58
|
align: 'center',
|
|
28
59
|
title: '序号',
|
|
@@ -30,13 +61,13 @@ var StandardTable = function StandardTable(props) {
|
|
|
30
61
|
// fixed: 'left',
|
|
31
62
|
// render: (text, o, index) => pagination ? (pagination.current - 1) * pagination.pageSize + index + 1 : index + 1,
|
|
32
63
|
render: function render(text, record, index) {
|
|
33
|
-
return index + 1;
|
|
64
|
+
return (index || 0) + 1;
|
|
34
65
|
}
|
|
35
|
-
}, orderNumber)];
|
|
66
|
+
}, (columnsConfig === null || columnsConfig === void 0 ? void 0 : columnsConfig.orderNumber) || {}), orderNumber)];
|
|
36
67
|
var _data$list = data.list,
|
|
37
68
|
list = _data$list === void 0 ? [] : _data$list,
|
|
38
69
|
pagination = data.pagination;
|
|
39
|
-
var paginationProps =
|
|
70
|
+
var paginationProps = _objectSpread({
|
|
40
71
|
// showQuickJumper: true,
|
|
41
72
|
className: 'spec-pagination',
|
|
42
73
|
showSizeChanger: true,
|
|
@@ -46,12 +77,18 @@ var StandardTable = function StandardTable(props) {
|
|
|
46
77
|
}
|
|
47
78
|
}, pagination);
|
|
48
79
|
if (columns) {
|
|
49
|
-
columns.map(function (colItem) {
|
|
80
|
+
var recombinationColumns = columns.map(function (colItem) {
|
|
81
|
+
var action = columnsConfig.action,
|
|
82
|
+
otherColumn = columnsConfig.otherColumn;
|
|
50
83
|
if (colItem.type === 'action') {
|
|
51
|
-
|
|
52
|
-
colItem.
|
|
53
|
-
colItem.
|
|
84
|
+
var _colItem, _colItem2, _colItem3;
|
|
85
|
+
colItem.width = ((_colItem = colItem) === null || _colItem === void 0 ? void 0 : _colItem.width) || (action === null || action === void 0 ? void 0 : action.width) || (colItem.buttonGroup.length > 1 ? 120 : 80);
|
|
86
|
+
colItem.align = ((_colItem2 = colItem) === null || _colItem2 === void 0 ? void 0 : _colItem2.align) || (action === null || action === void 0 ? void 0 : action.align) || 'center';
|
|
87
|
+
colItem.title = ((_colItem3 = colItem) === null || _colItem3 === void 0 ? void 0 : _colItem3.title) || (action === null || action === void 0 ? void 0 : action.title) || '操作';
|
|
54
88
|
colItem.key = 'control';
|
|
89
|
+
colItem = _objectSpread(_objectSpread(_objectSpread({}, action || {}), colItem), {}, {
|
|
90
|
+
ellipsis: false
|
|
91
|
+
}); // Object.assign(action || {}, colItem, { ellipsis: false }) // 操作列不配置ellipsis
|
|
55
92
|
// colItem.fixed = colItem.fixed || 'right'
|
|
56
93
|
colItem.render = function (text, record, rowIndex) {
|
|
57
94
|
// 按钮列表组
|
|
@@ -64,10 +101,12 @@ var StandardTable = function StandardTable(props) {
|
|
|
64
101
|
if (typeof buttonGroup === 'function') recombinationGroup = buttonGroup(text, record, rowIndex); // 方法返回数组结构
|
|
65
102
|
// 判断是否是数组且长度大于0时 ?{如下结构渲染} : {按buttonGroup返回的node渲染}
|
|
66
103
|
if (Array.isArray(buttonGroup) || typeof buttonGroup === 'function') {
|
|
104
|
+
var _colItem4, _colItem5;
|
|
67
105
|
if (recombinationGroup.length === 0) return '-';
|
|
68
106
|
return /*#__PURE__*/React.createElement(ButtonGroup, {
|
|
69
107
|
type: "text",
|
|
70
|
-
min: colItem.min || 2
|
|
108
|
+
min: colItem.min || 2 // 配置按钮展示最少数量,其他的将会被折叠
|
|
109
|
+
,
|
|
71
110
|
options: recombinationGroup,
|
|
72
111
|
codes: codes,
|
|
73
112
|
permissionCodes: permissionCodes,
|
|
@@ -76,7 +115,9 @@ var StandardTable = function StandardTable(props) {
|
|
|
76
115
|
record: record,
|
|
77
116
|
rowIndex: rowIndex
|
|
78
117
|
},
|
|
79
|
-
dropdownConfig: colItem.buttonGroupConfig || {}
|
|
118
|
+
dropdownConfig: colItem.buttonGroupConfig || {},
|
|
119
|
+
moreText: (_colItem4 = colItem) === null || _colItem4 === void 0 ? void 0 : _colItem4.moreText,
|
|
120
|
+
moreIcon: (_colItem5 = colItem) === null || _colItem5 === void 0 ? void 0 : _colItem5.moreIcon
|
|
80
121
|
});
|
|
81
122
|
} else {
|
|
82
123
|
return buttonGroup;
|
|
@@ -84,23 +125,34 @@ var StandardTable = function StandardTable(props) {
|
|
|
84
125
|
};
|
|
85
126
|
return /*#__PURE__*/React.createElement(React.Fragment, null, renderTableButtonGroup(colItem.buttonGroup));
|
|
86
127
|
};
|
|
128
|
+
return _objectSpread({}, colItem);
|
|
87
129
|
} else if (!colItem.render) {
|
|
88
130
|
// 若未配置render,则给加个默认的返回方法
|
|
89
131
|
colItem.render = function (text, record, rowIndex) {
|
|
90
132
|
return text || text === 0 ? text : '-';
|
|
91
133
|
};
|
|
92
|
-
return colItem;
|
|
134
|
+
// return Object.assign({ ellipsis: undefined, render: undefined }, { ...otherColumns, ...colItem }); // ellipsis要配置在render之前
|
|
135
|
+
return _objectSpread(_objectSpread({}, otherColumn), colItem);
|
|
93
136
|
}
|
|
94
|
-
return colItem
|
|
137
|
+
// return Object.assign({ ellipsis: undefined, render: undefined }, { ...otherColumns, ...colItem }) // ellipsis要配置在render之前
|
|
138
|
+
return _objectSpread(_objectSpread({}, otherColumn), colItem);
|
|
95
139
|
});
|
|
96
|
-
resetColumns = hideOrderNumber ?
|
|
140
|
+
resetColumns = hideOrderNumber ? recombinationColumns : resetColumns.concat(recombinationColumns);
|
|
97
141
|
}
|
|
98
|
-
return /*#__PURE__*/React.createElement(
|
|
99
|
-
className: classNames('standard-table', className),
|
|
100
|
-
bordered: false
|
|
101
|
-
|
|
142
|
+
return wrapSSR( /*#__PURE__*/React.createElement(Card, {
|
|
143
|
+
className: classNames(componentName, 'standard-table', className, hashId),
|
|
144
|
+
bordered: false,
|
|
145
|
+
title: title,
|
|
146
|
+
extra: buttonGroup && buttonGroup.length > 0 ? /*#__PURE__*/React.createElement(ButtonGroup, {
|
|
147
|
+
options: buttonGroup,
|
|
148
|
+
min: min,
|
|
149
|
+
codes: codes,
|
|
150
|
+
permissionCodes: permissionCodes,
|
|
151
|
+
dropdownConfig: buttonGroupConfig
|
|
152
|
+
}) : null
|
|
153
|
+
}, /*#__PURE__*/React.createElement(Table, _extends({
|
|
102
154
|
rowKey: rowKey || 'id',
|
|
103
|
-
rowSelection: rowSelection ?
|
|
155
|
+
rowSelection: rowSelection ? _objectSpread(_objectSpread({}, rowSelection), {}, {
|
|
104
156
|
columnWidth: 30
|
|
105
157
|
}) : rowSelection,
|
|
106
158
|
dataSource: list,
|
|
@@ -111,6 +163,6 @@ var StandardTable = function StandardTable(props) {
|
|
|
111
163
|
filterReset: '重置',
|
|
112
164
|
emptyText: emptyText || '暂无数据'
|
|
113
165
|
}
|
|
114
|
-
}, rest)));
|
|
166
|
+
}, rest))));
|
|
115
167
|
};
|
|
116
168
|
export default StandardTable;
|
|
@@ -1 +1,113 @@
|
|
|
1
|
-
|
|
1
|
+
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); }
|
|
2
|
+
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; }
|
|
3
|
+
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; }
|
|
4
|
+
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; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
+
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); }
|
|
7
|
+
import { createStyleHook } from "../../theme/utils/genStyleHook";
|
|
8
|
+
import { scrollBar } from "../../theme/index";
|
|
9
|
+
import { TinyColor } from "@ctrl/tinycolor";
|
|
10
|
+
var StandardTableStyleFunc = function StandardTableStyleFunc(prefix) {
|
|
11
|
+
var prepareComponentToken = function prepareComponentToken(token) {
|
|
12
|
+
return {
|
|
13
|
+
// fontWeight: 400,
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
return createStyleHook(prefix, function (token) {
|
|
17
|
+
var prefixCls = ".".concat(prefix);
|
|
18
|
+
var rowTd = {
|
|
19
|
+
'> td': {
|
|
20
|
+
borderColor: new TinyColor(token.colorPrimary).setAlpha(0.5).toRgbString(),
|
|
21
|
+
// fade(@primary-color, 50%),
|
|
22
|
+
'&::before': {
|
|
23
|
+
borderTop: "1px solid ".concat(new TinyColor(token.colorPrimary).setAlpha(0.5).toRgbString())
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
return [_defineProperty(_defineProperty(_defineProperty({}, prefixCls, {
|
|
28
|
+
'.spec-standard-table': {},
|
|
29
|
+
'.spec-pagination': {
|
|
30
|
+
padding: "".concat(token.paddingSM, "px 0 ").concat(token.paddingXs, "px 0"),
|
|
31
|
+
background: token.colorBgBase
|
|
32
|
+
},
|
|
33
|
+
'.ant-table-body': _objectSpread({}, scrollBar(token)),
|
|
34
|
+
'.spec-table-dropdown': {
|
|
35
|
+
'li a[disabled]': {
|
|
36
|
+
color: token.colorBgContainerDisabled
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}), '.ant-table', {
|
|
40
|
+
// 固定右侧列的样式
|
|
41
|
+
'.ant-table-fixed-left table.ant-table-fixed': {
|
|
42
|
+
'.ant-table-thead > tr > th, .ant-table-tbody > tr > td': {
|
|
43
|
+
paddingRight: token.paddingMD / 2,
|
|
44
|
+
'&:first-child': {
|
|
45
|
+
paddingLeft: token.paddingMD,
|
|
46
|
+
paddingRight: token.paddingMD / 2
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
// 固定右侧列的样式
|
|
51
|
+
'.ant-table-fixed-right': {
|
|
52
|
+
'.ant-table-thead > tr > th, .ant-table-tbody > tr > td': {
|
|
53
|
+
paddingRight: token.paddingMD / 2,
|
|
54
|
+
'&:first-child': {
|
|
55
|
+
paddingLeft: token.paddingMD / 2
|
|
56
|
+
},
|
|
57
|
+
'&:nth-last-child(1)': {
|
|
58
|
+
paddingLeft: token.paddingMD / 2,
|
|
59
|
+
paddingRight: token.paddingMD
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
'&.ant-table-small': {
|
|
64
|
+
' > .ant-table-content > .ant-table-body > table': {
|
|
65
|
+
'> .ant-table-thead > tr > th': {
|
|
66
|
+
fontSize: token.fontSize,
|
|
67
|
+
//@font-size-base;
|
|
68
|
+
background: token.headerBg // @table-header-bg
|
|
69
|
+
},
|
|
70
|
+
'> .ant-table-thead > tr > th, > .ant-table-tbody > tr > td': {
|
|
71
|
+
'&:first-child': {
|
|
72
|
+
paddingLeft: token.cellPaddingInline
|
|
73
|
+
},
|
|
74
|
+
'&:last-child': {
|
|
75
|
+
paddingRight: token.cellPaddingInline
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
'table': {
|
|
81
|
+
fontSize: token.fontSize,
|
|
82
|
+
'> .ant-table-thead > tr > th': {
|
|
83
|
+
fontSize: token.fontSizeLG
|
|
84
|
+
},
|
|
85
|
+
'.ant-table-thead > tr > th': {
|
|
86
|
+
'&:first-child': {
|
|
87
|
+
paddingLeft: token.paddingMD
|
|
88
|
+
},
|
|
89
|
+
'&:last-child': {
|
|
90
|
+
paddingRight: token.paddingMD
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
'.ant-table-tbody > tr > td ': {
|
|
94
|
+
padding: "12px ".concat(token.paddingMD / 2, "px"),
|
|
95
|
+
'&:first-child': {
|
|
96
|
+
paddingLeft: token.paddingMD
|
|
97
|
+
},
|
|
98
|
+
' &:last-child': {
|
|
99
|
+
paddingRight: token.paddingMD
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
'.ant-table-thead > tr.ant-table-row-hover:not(.ant-table-expanded-row)': rowTd,
|
|
103
|
+
'.ant-table-tbody > tr.ant-table-row-hover:not(.ant-table-expanded-row)': rowTd,
|
|
104
|
+
'.ant-table-thead > tr:hover:not(.ant-table-expanded-row)': rowTd,
|
|
105
|
+
'.ant-table-tbody > tr:hover:not(.ant-table-expanded-row)': rowTd
|
|
106
|
+
}
|
|
107
|
+
}), '.ant-form-item-control.has-error .ant-table.ant-table-small', {
|
|
108
|
+
borderColor: token.colorError
|
|
109
|
+
})];
|
|
110
|
+
}, prepareComponentToken // 当前组件扩展的变量
|
|
111
|
+
);
|
|
112
|
+
};
|
|
113
|
+
export default StandardTableStyleFunc;
|
|
@@ -1,51 +1,65 @@
|
|
|
1
|
-
@root-entry-name: default;
|
|
2
|
-
@import (reference) '~antd/es/style/themes/index';
|
|
3
|
-
@import '../../theme/spec-variable.less';
|
|
4
1
|
|
|
5
|
-
@spec-card-padding: @padding-xs;
|
|
6
|
-
@spec-card-background: @background-color-base;
|
|
7
|
-
@spec-table-hover-border-color: fade(@primary-color, 50%);
|
|
8
2
|
.standard-table {
|
|
9
3
|
.ant-table-middle ~ .ant-table-pagination {
|
|
10
4
|
margin-top: 8px;
|
|
11
5
|
margin-bottom: 0;
|
|
12
6
|
}
|
|
7
|
+
|
|
13
8
|
.spec-pagination {
|
|
14
9
|
width: 100%;
|
|
15
10
|
margin-top: 0;
|
|
16
11
|
margin-bottom: 0;
|
|
17
|
-
padding: @padding-sm 0 @padding-xs 0;
|
|
12
|
+
//padding: @padding-sm 0 @padding-xs 0;
|
|
18
13
|
text-align: right;
|
|
19
|
-
background: @
|
|
14
|
+
//background: @background-color-base;
|
|
20
15
|
border-radius: 0;
|
|
16
|
+
|
|
21
17
|
.ant-pagination-total-text {
|
|
22
18
|
float: left;
|
|
23
19
|
}
|
|
20
|
+
|
|
24
21
|
.ant-pagination-options-size-changer.ant-select {
|
|
25
22
|
margin-right: 0
|
|
26
23
|
}
|
|
27
24
|
}
|
|
25
|
+
|
|
26
|
+
&.ant-card {
|
|
27
|
+
box-shadow: none;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.ant-card-head {
|
|
31
|
+
padding: 0;
|
|
32
|
+
border-bottom: 0;
|
|
33
|
+
|
|
34
|
+
}
|
|
35
|
+
|
|
28
36
|
.ant-card-body {
|
|
29
37
|
padding: 0;
|
|
30
38
|
background: transparent;
|
|
31
|
-
//padding: @spec-card-padding;
|
|
32
|
-
//background: @spec-card-background;
|
|
33
39
|
}
|
|
40
|
+
|
|
41
|
+
.ant-table-wrapper .ant-table-container table > thead > tr:first-child {
|
|
42
|
+
& > *:first-child,
|
|
43
|
+
& > *:last-child {
|
|
44
|
+
border-radius: 0;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
34
48
|
.ant-table-tbody {
|
|
35
49
|
background: transparent;
|
|
36
50
|
}
|
|
51
|
+
|
|
37
52
|
.ant-table-fixed-left .ant-table-thead > tr > th:first-child {
|
|
38
53
|
padding: 0;
|
|
39
54
|
}
|
|
40
|
-
|
|
41
|
-
// background: transparent;
|
|
42
|
-
//}
|
|
55
|
+
|
|
43
56
|
.ant-table-body {
|
|
44
|
-
|
|
57
|
+
//.spec-scrollbar-base()
|
|
45
58
|
}
|
|
59
|
+
|
|
46
60
|
.spec-table-dropdown {
|
|
47
61
|
li a[disabled] {
|
|
48
|
-
color: @disabled-bg;
|
|
62
|
+
//color: @disabled-bg;
|
|
49
63
|
cursor: not-allowed;
|
|
50
64
|
pointer-events: none;
|
|
51
65
|
}
|
|
@@ -53,7 +67,7 @@
|
|
|
53
67
|
}
|
|
54
68
|
|
|
55
69
|
.ant-form-item-control.has-error .ant-table.ant-table-small {
|
|
56
|
-
border-color: @error-color
|
|
70
|
+
//border-color: @error-color
|
|
57
71
|
}
|
|
58
72
|
|
|
59
73
|
.themeTech {
|
|
@@ -70,99 +84,88 @@
|
|
|
70
84
|
|
|
71
85
|
.ant-table {
|
|
72
86
|
// 固定左侧列的样式
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
}
|
|
87
|
+
//.ant-table-fixed-left {
|
|
88
|
+
// table.ant-table-fixed {
|
|
89
|
+
// .ant-table-thead > tr > th,
|
|
90
|
+
// .ant-table-tbody > tr > td {
|
|
91
|
+
// &:first-child {
|
|
92
|
+
// padding-left: @padding-md;
|
|
93
|
+
// padding-right: @padding-md/2;
|
|
94
|
+
// }
|
|
95
|
+
// padding-right: @padding-md/2;
|
|
96
|
+
// }
|
|
97
|
+
// }
|
|
98
|
+
//}
|
|
85
99
|
// 固定右侧列的样式
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
}
|
|
100
|
+
//.ant-table-fixed-right {
|
|
101
|
+
// table.ant-table-fixed {
|
|
102
|
+
// .ant-table-thead > tr > th,
|
|
103
|
+
// .ant-table-tbody > tr > td {
|
|
104
|
+
// &:first-child {
|
|
105
|
+
// padding-left: @padding-md/2;
|
|
106
|
+
// }
|
|
107
|
+
// &:nth-last-child(1) {
|
|
108
|
+
// padding-left: @padding-md/2;
|
|
109
|
+
// padding-right: @padding-md;
|
|
110
|
+
// }
|
|
111
|
+
// padding-right: @padding-md/2;
|
|
112
|
+
// }
|
|
113
|
+
// }
|
|
114
|
+
//}
|
|
101
115
|
table {
|
|
102
|
-
font-size: @font-size-base; // 14px
|
|
103
|
-
//color: #707070;
|
|
116
|
+
//font-size: @font-size-base; // 14px
|
|
104
117
|
> .ant-table-thead {
|
|
105
118
|
> tr > th {
|
|
106
|
-
//color: @text-color;
|
|
107
119
|
font-weight: bold;
|
|
108
|
-
font-size: @font-size-lg;
|
|
120
|
+
//font-size: @font-size-lg;
|
|
109
121
|
border-bottom: 0;
|
|
110
122
|
}
|
|
111
123
|
}
|
|
124
|
+
|
|
112
125
|
> .ant-table-expand-icon-th, .ant-table-row-expand-icon-cell {
|
|
113
126
|
}
|
|
127
|
+
|
|
114
128
|
.ant-table-thead > tr > th {
|
|
115
|
-
|
|
116
|
-
//padding:
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
//
|
|
120
|
-
// color: @primary-color;
|
|
121
|
-
// line-height: 12px;
|
|
122
|
-
// border-color: @primary-color;
|
|
129
|
+
//&:first-child {
|
|
130
|
+
// padding-left: @padding-md;
|
|
131
|
+
//}
|
|
132
|
+
//&:last-child {
|
|
133
|
+
// padding-right: @padding-md;
|
|
123
134
|
//}
|
|
124
|
-
&:first-child {
|
|
125
|
-
padding-left: @padding-md;
|
|
126
|
-
}
|
|
127
|
-
&:last-child {
|
|
128
|
-
padding-right: @padding-md;
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
.ant-table-tbody > tr > td {
|
|
132
|
-
padding: 12px @padding-md/2;
|
|
133
|
-
&:first-child {
|
|
134
|
-
padding-left: @padding-md;
|
|
135
|
-
}
|
|
136
135
|
}
|
|
136
|
+
|
|
137
137
|
.ant-table-tbody > tr > td {
|
|
138
|
-
padding: 12px @padding-md/2;
|
|
138
|
+
//padding: 12px @padding-md/2;
|
|
139
139
|
&:first-child {
|
|
140
|
-
padding-left: @padding-md;
|
|
140
|
+
//padding-left: @padding-md;
|
|
141
141
|
border-left: 1px solid transparent;
|
|
142
142
|
}
|
|
143
|
+
|
|
143
144
|
&:last-child {
|
|
144
|
-
padding-right: @padding-md;
|
|
145
|
+
//padding-right: @padding-md;
|
|
145
146
|
border-right: 1px solid transparent;
|
|
146
147
|
}
|
|
147
148
|
}
|
|
149
|
+
|
|
148
150
|
.ant-table-thead > tr.ant-table-row-hover:not(.ant-table-expanded-row),
|
|
149
151
|
.ant-table-tbody > tr.ant-table-row-hover:not(.ant-table-expanded-row),
|
|
150
152
|
.ant-table-thead > tr:hover:not(.ant-table-expanded-row),
|
|
151
153
|
.ant-table-tbody > tr:hover:not(.ant-table-expanded-row) {
|
|
152
154
|
> td {
|
|
153
155
|
position: relative;
|
|
154
|
-
border-color: @
|
|
156
|
+
//border-color: fade(@primary-color, 50%);
|
|
155
157
|
&::before {
|
|
156
158
|
position: absolute;
|
|
157
159
|
top: 0;
|
|
158
160
|
left: 0;
|
|
159
161
|
display: inline-block;
|
|
160
162
|
width: 100%;
|
|
161
|
-
border-top: 1px solid @
|
|
163
|
+
//border-top: 1px solid fade(@primary-color, 50%);
|
|
162
164
|
content: '';
|
|
163
165
|
}
|
|
164
166
|
}
|
|
165
167
|
}
|
|
168
|
+
|
|
166
169
|
//.ant-table-tbody > tr.ant-table-expanded-row,
|
|
167
170
|
//.ant-table-tbody > tr.ant-table-expanded-row:hover {
|
|
168
171
|
// background: #f9f9fb;
|
|
@@ -173,30 +176,36 @@
|
|
|
173
176
|
text-align: center;
|
|
174
177
|
}
|
|
175
178
|
}
|
|
179
|
+
|
|
176
180
|
//.ant-table-small > .ant-table-content > .ant-table-body > table > .ant-table-thead > tr > th
|
|
177
181
|
&.ant-table-small {
|
|
182
|
+
|
|
178
183
|
> .ant-table-content > .ant-table-body {
|
|
179
184
|
margin: 0;
|
|
185
|
+
|
|
180
186
|
> table {
|
|
181
187
|
font-size: 14px;
|
|
188
|
+
|
|
182
189
|
> .ant-table-thead {
|
|
183
190
|
> tr > th {
|
|
184
191
|
font-weight: bold;
|
|
185
|
-
font-size: @font-size-base; // 14px
|
|
186
|
-
background: @table-header-bg;
|
|
192
|
+
//font-size: @font-size-base; // 14px
|
|
193
|
+
//background: @table-header-bg;
|
|
187
194
|
}
|
|
188
195
|
}
|
|
196
|
+
|
|
189
197
|
> .ant-table-thead > tr > th,
|
|
190
198
|
> .ant-table-tbody > tr > td {
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
}
|
|
199
|
+
//&:first-child {
|
|
200
|
+
// padding-left: @table-padding-horizontal;
|
|
201
|
+
//}
|
|
202
|
+
//&:last-child {
|
|
203
|
+
// padding-right: @table-padding-horizontal;
|
|
204
|
+
//}
|
|
197
205
|
}
|
|
198
206
|
}
|
|
199
207
|
}
|
|
208
|
+
|
|
200
209
|
.ant-empty-normal {
|
|
201
210
|
margin: 0;
|
|
202
211
|
}
|
|
@@ -12,5 +12,5 @@ import React from "react";
|
|
|
12
12
|
interface IconNodeProps {
|
|
13
13
|
icon?: string | string[] | React.ReactNode;
|
|
14
14
|
}
|
|
15
|
-
declare const IconNode: (props: IconNodeProps) => JSX.Element;
|
|
15
|
+
declare const IconNode: (props: IconNodeProps) => React.JSX.Element | null;
|
|
16
16
|
export default IconNode;
|
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
import SpecIcon from "../../SpecIcon/index";
|
|
2
2
|
import React from "react";
|
|
3
|
+
// 渲染图标展示
|
|
4
|
+
/**
|
|
5
|
+
* @params { String,Array,ReactNode } icon: 图标支持传值为字符串,
|
|
6
|
+
* @value {String} 当表示为String,单个名称字符串 如'plus' ==> 结果渲染为'speci-plus'
|
|
7
|
+
* 说明1.当数据里面包含','则将区分两个参数,第一个参数代表图标类名前缀,第二个参数代表当前图标类名 ‘speci,plus’ ==> 结果SVG渲染名称为 'speci-plus'
|
|
8
|
+
* 说明2.当数据里面包含','第一个参数为空或者为noPrefix,结构渲染为最后一个作为图标的名称,即',plus'或'noPrefix,plus' ==》 结果SVG渲染名称为 'plus'
|
|
9
|
+
* @value {Array} 当表示为Array时,必须包含两个参数['speci','plus'],
|
|
10
|
+
* 说明1.第一个参数代表图标类名前缀,第二个参数代表当前图标类名 => 结果渲染'speci-plus'
|
|
11
|
+
* 说明2.如果第一个参数为'noPrefix'或空,则将不显示前缀值,即:['', 'spec-plus]或 ['noPrefix', 'spec-plus] => 结果渲染'speci-plus'
|
|
12
|
+
* @value {ReactNode} 当表示为ReactNode时,则直接渲染
|
|
13
|
+
*/
|
|
14
|
+
|
|
3
15
|
var IconNode = function IconNode(props) {
|
|
4
16
|
var icon = props.icon;
|
|
5
17
|
if (!icon) return null;
|
|
@@ -18,7 +30,6 @@ var IconNode = function IconNode(props) {
|
|
|
18
30
|
name: icon[1]
|
|
19
31
|
}); // 预留 Array ['speci','plus']
|
|
20
32
|
}
|
|
21
|
-
|
|
22
33
|
return /*#__PURE__*/React.createElement(React.Fragment, null, icon);
|
|
23
34
|
};
|
|
24
35
|
export default IconNode;
|
package/es/components/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import IconNode from
|
|
1
|
+
import IconNode from "./IconNode/index";
|
|
2
2
|
export { IconNode };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
btnFuncCodes: ({
|
|
3
|
+
name: string;
|
|
4
|
+
code: string;
|
|
5
|
+
icon: string;
|
|
6
|
+
} | {
|
|
7
|
+
name: string;
|
|
8
|
+
code: string;
|
|
9
|
+
icon?: undefined;
|
|
10
|
+
})[];
|
|
11
|
+
pageFuncCodes: {
|
|
12
|
+
name: string;
|
|
13
|
+
code: string;
|
|
14
|
+
}[];
|
|
15
|
+
};
|
|
16
|
+
export default _default;
|