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,13 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import './index.less';
|
|
3
|
-
interface PaneStateProps {
|
|
4
|
-
paneClassName: string;
|
|
5
|
-
paneStyle: object;
|
|
6
|
-
vertical: boolean;
|
|
7
|
-
primary: boolean;
|
|
8
|
-
size: number;
|
|
9
|
-
percentage: boolean;
|
|
10
|
-
children: React.ReactNode | React.ReactNode[];
|
|
11
|
-
}
|
|
12
|
-
declare function Pane(props: PaneStateProps): JSX.Element;
|
|
13
|
-
export default Pane;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import './index.less';
|
|
3
|
-
//
|
|
4
|
-
// Pane.defaultProps = {
|
|
5
|
-
// paneClassName:'',
|
|
6
|
-
// vertical: false,
|
|
7
|
-
// primary: false,
|
|
8
|
-
// size: 0,
|
|
9
|
-
// percentage: false,
|
|
10
|
-
// children: []
|
|
11
|
-
// };
|
|
12
|
-
function Pane(props) {
|
|
13
|
-
var size = props.size || 0;
|
|
14
|
-
var unit = props.percentage ? '%' : 'px';
|
|
15
|
-
var classes = "".concat(props.paneClassName, " layout-pane ");
|
|
16
|
-
var style = {};
|
|
17
|
-
if (!props.primary) {
|
|
18
|
-
if (props.vertical) {
|
|
19
|
-
// @ts-ignore
|
|
20
|
-
style.height = "".concat(size).concat(unit);
|
|
21
|
-
} else {
|
|
22
|
-
// @ts-ignore
|
|
23
|
-
style.width = "".concat(size).concat(unit);
|
|
24
|
-
}
|
|
25
|
-
} else {
|
|
26
|
-
classes += ' layout-pane-primary';
|
|
27
|
-
}
|
|
28
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
29
|
-
className: classes,
|
|
30
|
-
style: Object.assign(Object.assign({}, props.paneStyle), style)
|
|
31
|
-
}, props.children);
|
|
32
|
-
}
|
|
33
|
-
export default Pane;
|
|
@@ -1,325 +0,0 @@
|
|
|
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 _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
3
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
4
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
5
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
6
|
-
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
7
|
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
8
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
9
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
10
|
-
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
11
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
12
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
13
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
14
|
-
import React from 'react';
|
|
15
|
-
// import PropTypes from 'prop-types';
|
|
16
|
-
import Pane from './Pane';
|
|
17
|
-
import './index.less';
|
|
18
|
-
function clearSelection() {
|
|
19
|
-
if (document.body.createTextRange) {
|
|
20
|
-
// https://github.com/zesik/react-splitter-layout/issues/16
|
|
21
|
-
// https://stackoverflow.com/questions/22914075/#37580789
|
|
22
|
-
var range = document.body.createTextRange();
|
|
23
|
-
range.collapse();
|
|
24
|
-
range.select();
|
|
25
|
-
} else if (window.getSelection) {
|
|
26
|
-
if (window.getSelection().empty) {
|
|
27
|
-
window.getSelection().empty();
|
|
28
|
-
} else if (window.getSelection().removeAllRanges) {
|
|
29
|
-
window.getSelection().removeAllRanges();
|
|
30
|
-
}
|
|
31
|
-
} else if (document.selection) {
|
|
32
|
-
document.selection.empty();
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
var DEFAULT_SPLITTER_SIZE = 4;
|
|
36
|
-
var SplitterLayout = /*#__PURE__*/function (_React$Component) {
|
|
37
|
-
_inherits(SplitterLayout, _React$Component);
|
|
38
|
-
var _super = _createSuper(SplitterLayout);
|
|
39
|
-
function SplitterLayout(props) {
|
|
40
|
-
var _this;
|
|
41
|
-
_classCallCheck(this, SplitterLayout);
|
|
42
|
-
_this = _super.call(this, props);
|
|
43
|
-
_this.handleResize = _this.handleResize.bind(_assertThisInitialized(_this));
|
|
44
|
-
_this.handleMouseMove = _this.handleMouseMove.bind(_assertThisInitialized(_this));
|
|
45
|
-
_this.handleMouseUp = _this.handleMouseUp.bind(_assertThisInitialized(_this));
|
|
46
|
-
_this.handleTouchMove = _this.handleTouchMove.bind(_assertThisInitialized(_this));
|
|
47
|
-
_this.handleSplitterMouseDown = _this.handleSplitterMouseDown.bind(_assertThisInitialized(_this));
|
|
48
|
-
_this.state = {
|
|
49
|
-
secondaryPaneSize: 0,
|
|
50
|
-
resizing: false
|
|
51
|
-
};
|
|
52
|
-
return _this;
|
|
53
|
-
}
|
|
54
|
-
_createClass(SplitterLayout, [{
|
|
55
|
-
key: "componentDidMount",
|
|
56
|
-
value: function componentDidMount() {
|
|
57
|
-
window.addEventListener('resize', this.handleResize);
|
|
58
|
-
document.addEventListener('mouseup', this.handleMouseUp);
|
|
59
|
-
document.addEventListener('mousemove', this.handleMouseMove);
|
|
60
|
-
document.addEventListener('touchend', this.handleMouseUp);
|
|
61
|
-
document.addEventListener('touchmove', this.handleTouchMove);
|
|
62
|
-
var secondaryPaneSize, primaryPaneSize;
|
|
63
|
-
if (typeof this.props.secondaryInitialSize !== 'undefined') {
|
|
64
|
-
//设置其余部分大小
|
|
65
|
-
secondaryPaneSize = this.props.secondaryInitialSize;
|
|
66
|
-
} else {
|
|
67
|
-
if (typeof this.props.primaryInitialSize !== 'undefined') {
|
|
68
|
-
//设置主要部分大小
|
|
69
|
-
primaryPaneSize = this.props.primaryInitialSize;
|
|
70
|
-
}
|
|
71
|
-
var containerRect = this.container.getBoundingClientRect();
|
|
72
|
-
var splitterRect;
|
|
73
|
-
if (this.splitter) {
|
|
74
|
-
splitterRect = this.splitter.getBoundingClientRect();
|
|
75
|
-
} else {
|
|
76
|
-
// Simulate a splitter
|
|
77
|
-
splitterRect = {
|
|
78
|
-
width: DEFAULT_SPLITTER_SIZE,
|
|
79
|
-
height: DEFAULT_SPLITTER_SIZE
|
|
80
|
-
};
|
|
81
|
-
}
|
|
82
|
-
var totalSize, splitterSize;
|
|
83
|
-
if (this.props.vertical) {
|
|
84
|
-
//垂直排列
|
|
85
|
-
totalSize = containerRect.height;
|
|
86
|
-
splitterSize = splitterRect.height;
|
|
87
|
-
} else {
|
|
88
|
-
totalSize = containerRect.width;
|
|
89
|
-
splitterSize = splitterRect.width;
|
|
90
|
-
}
|
|
91
|
-
//计算目标对象位置
|
|
92
|
-
var primarySize = this.props.primaryIndex === 1 ? totalSize - splitterSize - primaryPaneSize : primaryPaneSize || (totalSize - splitterSize) / 2;
|
|
93
|
-
secondaryPaneSize = this.getSecondaryPaneSize(containerRect, splitterRect, {
|
|
94
|
-
left: containerRect.left + primarySize,
|
|
95
|
-
top: containerRect.top + primarySize
|
|
96
|
-
}, false);
|
|
97
|
-
}
|
|
98
|
-
this.setState({
|
|
99
|
-
secondaryPaneSize: secondaryPaneSize
|
|
100
|
-
});
|
|
101
|
-
}
|
|
102
|
-
}, {
|
|
103
|
-
key: "componentDidUpdate",
|
|
104
|
-
value: function componentDidUpdate(prevProps, prevState) {
|
|
105
|
-
if (prevState.secondaryPaneSize !== this.state.secondaryPaneSize && this.props.onSecondaryPaneSizeChange) {
|
|
106
|
-
this.props.onSecondaryPaneSizeChange(this.state.secondaryPaneSize);
|
|
107
|
-
}
|
|
108
|
-
if (prevState.resizing !== this.state.resizing) {
|
|
109
|
-
if (this.state.resizing) {
|
|
110
|
-
if (this.props.onDragStart) {
|
|
111
|
-
this.props.onDragStart();
|
|
112
|
-
}
|
|
113
|
-
} else if (this.props.onDragEnd) {
|
|
114
|
-
this.props.onDragEnd();
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
}, {
|
|
119
|
-
key: "componentWillUnmount",
|
|
120
|
-
value: function componentWillUnmount() {
|
|
121
|
-
window.removeEventListener('resize', this.handleResize);
|
|
122
|
-
document.removeEventListener('mouseup', this.handleMouseUp);
|
|
123
|
-
document.removeEventListener('mousemove', this.handleMouseMove);
|
|
124
|
-
document.removeEventListener('touchend', this.handleMouseUp);
|
|
125
|
-
document.removeEventListener('touchmove', this.handleTouchMove);
|
|
126
|
-
} //获取第二块内容宽度or高度
|
|
127
|
-
}, {
|
|
128
|
-
key: "getSecondaryPaneSize",
|
|
129
|
-
value: function getSecondaryPaneSize(containerRect, splitterRect, clientPosition, offsetMouse) {
|
|
130
|
-
var totalSize;
|
|
131
|
-
var splitterSize;
|
|
132
|
-
var offset;
|
|
133
|
-
if (this.props.vertical) {
|
|
134
|
-
//垂直排列
|
|
135
|
-
totalSize = containerRect.height; //总高度
|
|
136
|
-
splitterSize = splitterRect.height; //划分条高度
|
|
137
|
-
offset = clientPosition.top - containerRect.top; //移动位置减去原始位置
|
|
138
|
-
} else {
|
|
139
|
-
//默认水平排列
|
|
140
|
-
totalSize = containerRect.width; //总宽度
|
|
141
|
-
splitterSize = splitterRect.width; //划分条宽度
|
|
142
|
-
offset = clientPosition.left - containerRect.left; //移动位置减去原始位置
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
if (offsetMouse) {
|
|
146
|
-
//移动
|
|
147
|
-
offset -= splitterSize / 2;
|
|
148
|
-
}
|
|
149
|
-
if (offset < 0) {
|
|
150
|
-
offset = 0;
|
|
151
|
-
} else if (offset > totalSize - splitterSize) {
|
|
152
|
-
//移动超过容器大小
|
|
153
|
-
offset = totalSize - splitterSize;
|
|
154
|
-
}
|
|
155
|
-
var secondaryPaneSize;
|
|
156
|
-
if (this.props.primaryIndex === 1) {
|
|
157
|
-
//目标对象是1
|
|
158
|
-
secondaryPaneSize = offset;
|
|
159
|
-
} else {
|
|
160
|
-
secondaryPaneSize = totalSize - splitterSize - offset;
|
|
161
|
-
}
|
|
162
|
-
var primaryPaneSize = totalSize - splitterSize - secondaryPaneSize;
|
|
163
|
-
if (this.props.percentage) {
|
|
164
|
-
//百分比
|
|
165
|
-
secondaryPaneSize = secondaryPaneSize * 100 / totalSize;
|
|
166
|
-
primaryPaneSize = primaryPaneSize * 100 / totalSize;
|
|
167
|
-
splitterSize = splitterSize * 100 / totalSize;
|
|
168
|
-
totalSize = 100;
|
|
169
|
-
}
|
|
170
|
-
if (primaryPaneSize < this.props.primaryMinSize) {
|
|
171
|
-
secondaryPaneSize = Math.max(secondaryPaneSize - (this.props.primaryMinSize - primaryPaneSize), 0);
|
|
172
|
-
} else if (secondaryPaneSize < this.props.secondaryMinSize) {
|
|
173
|
-
secondaryPaneSize = Math.min(totalSize - splitterSize - this.props.primaryMinSize, this.props.secondaryMinSize);
|
|
174
|
-
}
|
|
175
|
-
return secondaryPaneSize;
|
|
176
|
-
}
|
|
177
|
-
}, {
|
|
178
|
-
key: "handleResize",
|
|
179
|
-
value: function handleResize() {
|
|
180
|
-
if (this.splitter && !this.props.percentage) {
|
|
181
|
-
var containerRect = this.container.getBoundingClientRect();
|
|
182
|
-
var splitterRect = this.splitter.getBoundingClientRect();
|
|
183
|
-
var secondaryPaneSize = this.getSecondaryPaneSize(containerRect, splitterRect, {
|
|
184
|
-
left: splitterRect.left,
|
|
185
|
-
top: splitterRect.top
|
|
186
|
-
}, false);
|
|
187
|
-
this.setState({
|
|
188
|
-
secondaryPaneSize: secondaryPaneSize
|
|
189
|
-
});
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
}, {
|
|
193
|
-
key: "handleMouseMove",
|
|
194
|
-
value: function handleMouseMove(e) {
|
|
195
|
-
if (this.state.resizing) {
|
|
196
|
-
var containerRect = this.container.getBoundingClientRect();
|
|
197
|
-
var splitterRect = this.splitter.getBoundingClientRect();
|
|
198
|
-
var secondaryPaneSize = this.getSecondaryPaneSize(containerRect, splitterRect, {
|
|
199
|
-
left: e.clientX,
|
|
200
|
-
top: e.clientY
|
|
201
|
-
}, true);
|
|
202
|
-
clearSelection();
|
|
203
|
-
this.setState({
|
|
204
|
-
secondaryPaneSize: secondaryPaneSize
|
|
205
|
-
});
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
}, {
|
|
209
|
-
key: "handleTouchMove",
|
|
210
|
-
value: function handleTouchMove(e) {
|
|
211
|
-
this.handleMouseMove(e.changedTouches[0]);
|
|
212
|
-
}
|
|
213
|
-
}, {
|
|
214
|
-
key: "handleSplitterMouseDown",
|
|
215
|
-
value: function handleSplitterMouseDown() {
|
|
216
|
-
clearSelection();
|
|
217
|
-
this.setState({
|
|
218
|
-
resizing: true
|
|
219
|
-
});
|
|
220
|
-
}
|
|
221
|
-
}, {
|
|
222
|
-
key: "handleMouseUp",
|
|
223
|
-
value: function handleMouseUp() {
|
|
224
|
-
this.setState(function (prevState) {
|
|
225
|
-
return prevState.resizing ? {
|
|
226
|
-
resizing: false
|
|
227
|
-
} : null;
|
|
228
|
-
});
|
|
229
|
-
}
|
|
230
|
-
}, {
|
|
231
|
-
key: "render",
|
|
232
|
-
value: function render() {
|
|
233
|
-
var _this2 = this;
|
|
234
|
-
var _this$props = this.props,
|
|
235
|
-
customClassName = _this$props.customClassName,
|
|
236
|
-
vertical = _this$props.vertical,
|
|
237
|
-
_this$props$partClass = _this$props.partClassNames,
|
|
238
|
-
partClassNames = _this$props$partClass === void 0 ? [] : _this$props$partClass,
|
|
239
|
-
_this$props$partStyle = _this$props.partStyles,
|
|
240
|
-
partStyles = _this$props$partStyle === void 0 ? [] : _this$props$partStyle;
|
|
241
|
-
var containerClasses = "splitter-layout ".concat(customClassName || '').concat(vertical ? ' splitter-layout-vertical' : '');
|
|
242
|
-
if (this.state.resizing) {
|
|
243
|
-
containerClasses += ' layout-changing';
|
|
244
|
-
}
|
|
245
|
-
var children = React.Children.toArray(this.props.children).slice(0, 2);
|
|
246
|
-
if (children.length === 0) {
|
|
247
|
-
children.push( /*#__PURE__*/React.createElement("div", null));
|
|
248
|
-
}
|
|
249
|
-
var wrappedChildren = [];
|
|
250
|
-
var primaryIndex = this.props.primaryIndex !== 0 && this.props.primaryIndex !== 1 ? 0 : this.props.primaryIndex;
|
|
251
|
-
for (var i = 0; i < children.length; ++i) {
|
|
252
|
-
var primary = true;
|
|
253
|
-
var size = null;
|
|
254
|
-
var classname = partClassNames === null || partClassNames === void 0 ? void 0 : partClassNames[i];
|
|
255
|
-
var styleObj = partStyles === null || partStyles === void 0 ? void 0 : partStyles[i];
|
|
256
|
-
if (children.length > 1 && i !== primaryIndex) {
|
|
257
|
-
primary = false;
|
|
258
|
-
size = this.state.secondaryPaneSize;
|
|
259
|
-
}
|
|
260
|
-
wrappedChildren.push( /*#__PURE__*/React.createElement(Pane, {
|
|
261
|
-
vertical: vertical,
|
|
262
|
-
percentage: this.props.percentage,
|
|
263
|
-
primary: primary,
|
|
264
|
-
size: size,
|
|
265
|
-
paneClassName: classname,
|
|
266
|
-
paneStyle: styleObj
|
|
267
|
-
}, children[i]));
|
|
268
|
-
}
|
|
269
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
270
|
-
className: containerClasses,
|
|
271
|
-
style: this.props.containerStyle,
|
|
272
|
-
ref: function ref(c) {
|
|
273
|
-
_this2.container = c;
|
|
274
|
-
}
|
|
275
|
-
}, wrappedChildren[0], wrappedChildren.length > 1 && /*#__PURE__*/React.createElement("div", {
|
|
276
|
-
role: "separator",
|
|
277
|
-
className: "layout-splitter ".concat(!this.props.vertical && 'layout-splitter-horizontal', " ").concat(this.props.splitterClassName),
|
|
278
|
-
style: this.props.splitterStyle,
|
|
279
|
-
ref: function ref(c) {
|
|
280
|
-
_this2.splitter = c;
|
|
281
|
-
},
|
|
282
|
-
onMouseDown: this.handleSplitterMouseDown,
|
|
283
|
-
onTouchStart: this.handleSplitterMouseDown
|
|
284
|
-
}), wrappedChildren.length > 1 && wrappedChildren[1]);
|
|
285
|
-
}
|
|
286
|
-
}]);
|
|
287
|
-
return SplitterLayout;
|
|
288
|
-
}(React.Component); //
|
|
289
|
-
// SplitterLayout.propTypes = {
|
|
290
|
-
// containerStyle: PropTypes.object,
|
|
291
|
-
// customClassName: PropTypes.string,
|
|
292
|
-
// splitterClassName: PropTypes.string,
|
|
293
|
-
// splitterStyle: PropTypes.object,
|
|
294
|
-
// partClassNames: PropTypes.arrayOf(PropTypes.string),
|
|
295
|
-
// partStyles: PropTypes.arrayOf(PropTypes.object),
|
|
296
|
-
// vertical: PropTypes.bool,
|
|
297
|
-
// percentage: PropTypes.bool,
|
|
298
|
-
// primaryIndex: PropTypes.number,
|
|
299
|
-
// primaryMinSize: PropTypes.number,
|
|
300
|
-
// primaryInitialSize:PropTypes.number,
|
|
301
|
-
// secondaryInitialSize: PropTypes.number,
|
|
302
|
-
// secondaryMinSize: PropTypes.number,
|
|
303
|
-
// onDragStart: PropTypes.func,
|
|
304
|
-
// onDragEnd: PropTypes.func,
|
|
305
|
-
// onSecondaryPaneSizeChange: PropTypes.func,
|
|
306
|
-
// children: PropTypes.arrayOf(PropTypes.node)
|
|
307
|
-
// };
|
|
308
|
-
//
|
|
309
|
-
// SplitterLayout.defaultProps = {
|
|
310
|
-
// customClassName: '',
|
|
311
|
-
// splitterClassName: '',
|
|
312
|
-
// partClassNames:[],
|
|
313
|
-
// partStyles:[],
|
|
314
|
-
// vertical: false,
|
|
315
|
-
// percentage: false,
|
|
316
|
-
// primaryIndex: 0,
|
|
317
|
-
// primaryMinSize: 0,
|
|
318
|
-
// secondaryInitialSize: undefined,
|
|
319
|
-
// secondaryMinSize: 0,
|
|
320
|
-
// onDragStart: null,
|
|
321
|
-
// onDragEnd: null,
|
|
322
|
-
// onSecondaryPaneSizeChange: null,
|
|
323
|
-
// children: []
|
|
324
|
-
// };
|
|
325
|
-
export default SplitterLayout;
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
@import '~antd/lib/style/themes/default.less';
|
|
2
|
-
.splitter-layout {
|
|
3
|
-
position: relative;
|
|
4
|
-
display: flex;
|
|
5
|
-
flex-direction: row;
|
|
6
|
-
width: 100%;
|
|
7
|
-
height: 100%;
|
|
8
|
-
overflow: hidden;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.spec-grid-content .splitter-layout .layout-pane,.splitter-layout .layout-pane {
|
|
12
|
-
position: relative;
|
|
13
|
-
flex: 0 0 auto;
|
|
14
|
-
overflow: auto;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.spec-grid-content .splitter-layout .layout-pane.layout-pane-primary,.splitter-layout .layout-pane.layout-pane-primary {
|
|
18
|
-
flex: 1 1 auto;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.splitter-layout > .layout-splitter {
|
|
22
|
-
flex: 0 0 auto;
|
|
23
|
-
width: 4px;
|
|
24
|
-
height: 100%;
|
|
25
|
-
cursor: col-resize;
|
|
26
|
-
background-color: rgba(0,0,0,0);
|
|
27
|
-
}
|
|
28
|
-
.splitter-layout > .layout-splitter-horizontal{
|
|
29
|
-
padding-bottom:9999px;
|
|
30
|
-
margin-bottom:-9999px;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.splitter-layout .layout-splitter:hover {
|
|
34
|
-
background-color: rgba(0,0,0,.1);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
.splitter-layout.layout-changing {
|
|
38
|
-
cursor: col-resize;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
.splitter-layout.layout-changing > .layout-splitter {
|
|
42
|
-
background-color: rgba(0,0,0,.1);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.splitter-layout.splitter-layout-vertical {
|
|
46
|
-
flex-direction: column;
|
|
47
|
-
height: 150px;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
.splitter-layout.splitter-layout-vertical.layout-changing {
|
|
51
|
-
cursor: row-resize;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.splitter-layout.splitter-layout-vertical > .layout-splitter {
|
|
55
|
-
width: 100%;
|
|
56
|
-
height: 4px;
|
|
57
|
-
cursor: row-resize;
|
|
58
|
-
}
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
@root-entry-name: default;
|
|
2
|
-
@import (reference) '~antd/es/style/themes/index';
|
|
3
|
-
|
|
4
|
-
.scroll-bar(){
|
|
5
|
-
&::-webkit-scrollbar-track-piece {
|
|
6
|
-
background: fade(@primary-color, 10%);
|
|
7
|
-
}
|
|
8
|
-
&::-webkit-scrollbar {
|
|
9
|
-
width: 6px;
|
|
10
|
-
height: 6px;
|
|
11
|
-
}
|
|
12
|
-
&::-webkit-scrollbar-thumb {
|
|
13
|
-
background: fade(@primary-color, 50%);
|
|
14
|
-
border-radius: 20px;
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
.spec-wrapper-content {
|
|
18
|
-
position: relative;
|
|
19
|
-
padding: @padding-lg;
|
|
20
|
-
background: @background-color-base;
|
|
21
|
-
height: 100%;
|
|
22
|
-
overflow: auto;
|
|
23
|
-
& .light-block {
|
|
24
|
-
padding: @padding-lg;
|
|
25
|
-
background: @layout-body-background;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
.spec-grid-content {
|
|
29
|
-
position: relative;
|
|
30
|
-
display: flex;
|
|
31
|
-
height: calc(100vh - @layout-header-height);
|
|
32
|
-
background:transparent; // @background-color-base;
|
|
33
|
-
.spec-grid-left {
|
|
34
|
-
height: calc(100vh - @layout-header-height);
|
|
35
|
-
padding: @padding-md @padding-sm;
|
|
36
|
-
background: @layout-body-background;
|
|
37
|
-
overflow-y: auto;
|
|
38
|
-
.scroll-bar();
|
|
39
|
-
.ant-tree-list,
|
|
40
|
-
.ant-tree {
|
|
41
|
-
max-height: 100%;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
.spec-grid-right {
|
|
45
|
-
flex: 1;
|
|
46
|
-
height: calc(100vh - @layout-header-height);
|
|
47
|
-
padding: @padding-lg;
|
|
48
|
-
overflow-y: auto;
|
|
49
|
-
//margin-left: 200px
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
// 加载loading中状态样式
|
|
54
|
-
.spec-wrapper-content-loading,
|
|
55
|
-
.spec-grid-content-loading{
|
|
56
|
-
& > *:not(.ant-spin) {
|
|
57
|
-
opacity: .6;
|
|
58
|
-
}
|
|
59
|
-
& > .ant-spin.ant-spin-spinning{
|
|
60
|
-
position: absolute;
|
|
61
|
-
top: 0;
|
|
62
|
-
left: 0;
|
|
63
|
-
z-index: 4;
|
|
64
|
-
width: 100%;
|
|
65
|
-
height: 100%;
|
|
66
|
-
.ant-spin-dot {
|
|
67
|
-
position: absolute;
|
|
68
|
-
top: 25%;
|
|
69
|
-
left: 50%;
|
|
70
|
-
margin: -10px;
|
|
71
|
-
}
|
|
72
|
-
.ant-spin-text {
|
|
73
|
-
position: absolute;
|
|
74
|
-
top: 25%;
|
|
75
|
-
width: 100%;
|
|
76
|
-
padding-top: 5px;
|
|
77
|
-
margin-top: 10px;
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
@root-entry-name: default;
|
|
2
|
-
@import (reference) '~antd/es/style/themes/index';
|
|
3
|
-
|
|
4
|
-
.spec-scrollbar-base(){
|
|
5
|
-
&::-webkit-scrollbar-track-piece {
|
|
6
|
-
background: fade(#c1c1c1, 10%);
|
|
7
|
-
}
|
|
8
|
-
&::-webkit-scrollbar {
|
|
9
|
-
width: 6px;
|
|
10
|
-
height: 6px;
|
|
11
|
-
}
|
|
12
|
-
&::-webkit-scrollbar-thumb {
|
|
13
|
-
background: fade(#c1c1c1, 50%);
|
|
14
|
-
border-radius: 20px;
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
.spec-scrollbar(){
|
|
18
|
-
&::-webkit-scrollbar-track-piece {
|
|
19
|
-
background: fade(@primary-color, 10%);
|
|
20
|
-
}
|
|
21
|
-
&::-webkit-scrollbar {
|
|
22
|
-
width: 6px;
|
|
23
|
-
height: 6px;
|
|
24
|
-
}
|
|
25
|
-
&::-webkit-scrollbar-thumb {
|
|
26
|
-
background: fade(@primary-color, 50%);
|
|
27
|
-
border-radius: 20px;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
.spec-scrollbar-light() {
|
|
31
|
-
&::-webkit-scrollbar {
|
|
32
|
-
width: 4px;
|
|
33
|
-
height: 4px;
|
|
34
|
-
}
|
|
35
|
-
&::-webkit-scrollbar-thumb {
|
|
36
|
-
background: rgba(0,0,0,0.2);
|
|
37
|
-
border-radius: 10px;
|
|
38
|
-
-webkit-box-shadow: inset 0 0 5px rgba(0,0,0,0.2);
|
|
39
|
-
}
|
|
40
|
-
&::-webkit-scrollbar-track {
|
|
41
|
-
background: rgba(0,0,0,0.1);
|
|
42
|
-
border-radius: 0;
|
|
43
|
-
-webkit-box-shadow: inset 0 0 5px rgba(0,0,0,0.2);
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
@spec-box-shadow: 0 0 12px fade(@primary-color, 10%); // 蓝色阴影
|
|
48
|
-
@spec-box-shadow-dark: 0 0 10px fade(#1E1E1E, 10%); // 灰色阴影
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
require("antd/es/button/style");
|
|
8
|
-
var _button = _interopRequireDefault(require("antd/es/button"));
|
|
9
|
-
require("antd/es/dropdown/style");
|
|
10
|
-
var _dropdown = _interopRequireDefault(require("antd/es/dropdown"));
|
|
11
|
-
var _react = _interopRequireDefault(require("react"));
|
|
12
|
-
var _SpecIcon = _interopRequireDefault(require("@/SpecIcon"));
|
|
13
|
-
var _ButtonMenu = _interopRequireDefault(require("./ButtonMenu"));
|
|
14
|
-
var _IconNode = _interopRequireDefault(require("@/components/IconNode"));
|
|
15
|
-
var _filterPermission = require("@/utils/filterPermission");
|
|
16
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
-
// 渲染按钮形式 (用于筛选)
|
|
18
|
-
|
|
19
|
-
var RenderButtonList = function RenderButtonList(item) {
|
|
20
|
-
if (Array.isArray(item.children) && item.children.length > 0) {
|
|
21
|
-
return /*#__PURE__*/_react.default.createElement(_dropdown.default, {
|
|
22
|
-
overlay: (0, _ButtonMenu.default)(item.children),
|
|
23
|
-
placement: "bottomRight"
|
|
24
|
-
}, /*#__PURE__*/_react.default.createElement(_button.default, {
|
|
25
|
-
type: "primary"
|
|
26
|
-
}, item.exName || item.name, " ", /*#__PURE__*/_react.default.createElement(_SpecIcon.default, {
|
|
27
|
-
name: "down"
|
|
28
|
-
})));
|
|
29
|
-
}
|
|
30
|
-
return /*#__PURE__*/_react.default.createElement(_button.default, {
|
|
31
|
-
type: item.type ? item.type : 'primary',
|
|
32
|
-
danger: item.danger,
|
|
33
|
-
icon: /*#__PURE__*/_react.default.createElement(_IconNode.default, {
|
|
34
|
-
icon: item.icon
|
|
35
|
-
}),
|
|
36
|
-
disabled: (0, _filterPermission.btnIsDisabled)(item.disabled, item.rowParams),
|
|
37
|
-
onClick: item.fn ? function () {
|
|
38
|
-
return item.fn(item);
|
|
39
|
-
} : null
|
|
40
|
-
}, item.exName || item.name);
|
|
41
|
-
};
|
|
42
|
-
var _default = RenderButtonList;
|
|
43
|
-
exports.default = _default;
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
require("antd/es/menu/style");
|
|
8
|
-
var _menu = _interopRequireDefault(require("antd/es/menu"));
|
|
9
|
-
var _react = _interopRequireDefault(require("react"));
|
|
10
|
-
var _IconNode = _interopRequireDefault(require("@/components/IconNode"));
|
|
11
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
|
-
// 渲染按钮多层级形式 (用于筛选)
|
|
13
|
-
|
|
14
|
-
var RenderButtonList = function RenderButtonList(group) {
|
|
15
|
-
return /*#__PURE__*/_react.default.createElement(_menu.default, null, group.map(function (item, index) {
|
|
16
|
-
if (item.children) {
|
|
17
|
-
return /*#__PURE__*/_react.default.createElement(_menu.default.SubMenu, {
|
|
18
|
-
title: item.exName || item.name,
|
|
19
|
-
key: index
|
|
20
|
-
}, item.children.map(function (child, childIndex) {
|
|
21
|
-
return /*#__PURE__*/_react.default.createElement(_menu.default.Item, {
|
|
22
|
-
key: childIndex
|
|
23
|
-
}, /*#__PURE__*/_react.default.createElement("a", {
|
|
24
|
-
onClick: child.fn ? function () {
|
|
25
|
-
return child.fn(child);
|
|
26
|
-
} : null
|
|
27
|
-
}, /*#__PURE__*/_react.default.createElement(_IconNode.default, {
|
|
28
|
-
icon: child.icon
|
|
29
|
-
}), " ", child.exName || child.name));
|
|
30
|
-
}));
|
|
31
|
-
}
|
|
32
|
-
return /*#__PURE__*/_react.default.createElement(_menu.default.Item, {
|
|
33
|
-
key: index
|
|
34
|
-
}, /*#__PURE__*/_react.default.createElement("a", {
|
|
35
|
-
onClick: item.fn ? function () {
|
|
36
|
-
return item.fn(item);
|
|
37
|
-
} : null
|
|
38
|
-
}, /*#__PURE__*/_react.default.createElement(_IconNode.default, {
|
|
39
|
-
icon: item.icon
|
|
40
|
-
}), " ", item.exName || item.name));
|
|
41
|
-
}));
|
|
42
|
-
};
|
|
43
|
-
var _default = RenderButtonList;
|
|
44
|
-
exports.default = _default;
|