@zat-design/sisyphus-react 3.13.19-beta.1 → 3.13.19-beta.11
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/dist/index.esm.css +1 -6344
- package/dist/index.min.js +1 -0
- package/dist/less.esm.css +1 -5768
- package/dist/less.min.js +1 -0
- package/es/FormsProvider/index.js +9 -7
- package/es/ProAction/components/CheckModalContent/index.js +14 -14
- package/es/ProAction/index.js +46 -47
- package/es/ProConfigProvider/index.js +26 -20
- package/es/ProDownload/index.js +66 -73
- package/es/ProDownload/utils.js +26 -23
- package/es/ProDrawerForm/components/ProDrawer/index.js +43 -39
- package/es/ProDrawerForm/components/ProModal/index.js +25 -23
- package/es/ProDrawerForm/components/index.js +2 -2
- package/es/ProDrawerForm/index.js +19 -21
- package/es/ProDrawerForm/utils/index.js +1 -1
- package/es/ProEditLabel/components/RenderProForm.js +30 -26
- package/es/ProEditLabel/index.js +49 -36
- package/es/ProEditLabel/utils/index.js +4 -3
- package/es/ProEditTable/components/ActionButton/index.js +83 -76
- package/es/ProEditTable/components/RcTable/BaseTable.js +24 -24
- package/es/ProEditTable/components/RcTable/DraggableTable.js +34 -41
- package/es/ProEditTable/components/RcTable/VirtualTable.js +4 -3
- package/es/ProEditTable/components/RcTable/index.js +3 -3
- package/es/ProEditTable/components/RenderField/ListChangedWrapper.js +61 -57
- package/es/ProEditTable/components/RenderField/index.js +151 -145
- package/es/ProEditTable/components/RenderToolbar/index.js +37 -42
- package/es/ProEditTable/components/Summary/index.js +22 -21
- package/es/ProEditTable/components/Validator/index.js +11 -10
- package/es/ProEditTable/components/index.js +5 -5
- package/es/ProEditTable/index.d.ts +1 -1
- package/es/ProEditTable/index.js +170 -173
- package/es/ProEditTable/utils/config.js +42 -46
- package/es/ProEditTable/utils/diffOriginal.js +34 -19
- package/es/ProEditTable/utils/getDefaultProps.js +12 -13
- package/es/ProEditTable/utils/index.js +102 -99
- package/es/ProEditTable/utils/tools.js +88 -91
- package/es/ProEditTable/utils/transform.js +7 -11
- package/es/ProEditTable/utils/useEditTableError.js +22 -13
- package/es/ProEnum/components/Group.js +23 -27
- package/es/ProEnum/components/Tag.js +14 -16
- package/es/ProEnum/hooks/useEnum.js +32 -14
- package/es/ProEnum/hooks/useEnumRequest.js +42 -42
- package/es/ProEnum/hooks/useFrequentEnumRequest.js +17 -19
- package/es/ProEnum/index.js +80 -89
- package/es/ProEnum/utils/eventCenter.js +23 -32
- package/es/ProEnum/utils/frequentEnum.js +16 -4
- package/es/ProEnum/utils/getEnumLabel.js +16 -21
- package/es/ProEnum/utils/index.js +12 -7
- package/es/ProForm/components/Container.js +8 -6
- package/es/ProForm/components/FormFooter/index.js +21 -19
- package/es/ProForm/components/base/Checkbox/index.js +16 -15
- package/es/ProForm/components/base/DatePicker/index.js +23 -20
- package/es/ProForm/components/base/Input/index.js +20 -18
- package/es/ProForm/components/base/InputNumber/index.js +57 -53
- package/es/ProForm/components/base/Radio/index.js +15 -15
- package/es/ProForm/components/base/RangePicker/index.js +24 -29
- package/es/ProForm/components/base/RangePicker/useDateRange.js +3 -3
- package/es/ProForm/components/base/Select/index.js +17 -15
- package/es/ProForm/components/base/Switch/index.js +16 -15
- package/es/ProForm/components/base/SwitchCheckbox/index.js +19 -18
- package/es/ProForm/components/base/TextArea/index.js +18 -17
- package/es/ProForm/components/base/TimePicker/index.js +10 -9
- package/es/ProForm/components/combination/Container/index.js +25 -23
- package/es/ProForm/components/combination/FormList/components/ActionButton.js +80 -92
- package/es/ProForm/components/combination/FormList/components/BlockFields.js +21 -19
- package/es/ProForm/components/combination/FormList/components/BlockTitle.js +7 -7
- package/es/ProForm/components/combination/FormList/components/Empty.js +21 -20
- package/es/ProForm/components/combination/FormList/components/LineFields.js +19 -18
- package/es/ProForm/components/combination/FormList/components/ToolbarButton.js +45 -51
- package/es/ProForm/components/combination/FormList/index.js +43 -51
- package/es/ProForm/components/combination/FormList/utils.js +9 -9
- package/es/ProForm/components/combination/Group/component/AddonWrapper/index.js +8 -6
- package/es/ProForm/components/combination/Group/component/ComRender.js +33 -29
- package/es/ProForm/components/combination/Group/hooks/index.js +49 -47
- package/es/ProForm/components/combination/Group/index.js +38 -37
- package/es/ProForm/components/combination/Group/utils.js +56 -50
- package/es/ProForm/components/combination/ProCascader/index.js +81 -85
- package/es/ProForm/components/combination/ProCascader/utils/index.js +6 -6
- package/es/ProForm/components/combination/ProCombination/index.js +41 -37
- package/es/ProForm/components/combination/ProModalSelect/hooks/useRequestList.js +31 -25
- package/es/ProForm/components/combination/ProModalSelect/index.js +166 -173
- package/es/ProForm/components/combination/ProModalSelect/utils/index.js +1 -1
- package/es/ProForm/components/combination/ProNumberRange/index.js +46 -51
- package/es/ProForm/components/combination/ProRangeLimit/index.js +39 -39
- package/es/ProForm/components/combination/ProTimeLimit/hooks/useControlled.js +3 -3
- package/es/ProForm/components/combination/ProTimeLimit/index.js +43 -40
- package/es/ProForm/components/index.d.ts +1 -0
- package/es/ProForm/components/index.js +40 -35
- package/es/ProForm/components/old/EnumSelect/hooks/useRequestList.js +30 -28
- package/es/ProForm/components/old/EnumSelect/index.js +55 -62
- package/es/ProForm/components/old/InputRange/index.js +17 -16
- package/es/ProForm/components/old/InputWithSuffix/index.js +6 -5
- package/es/ProForm/components/old/ProAddress/index.js +53 -75
- package/es/ProForm/components/old/ProCertNo/index.js +17 -17
- package/es/ProForm/components/old/ProCertValidity/index.js +19 -21
- package/es/ProForm/components/old/ProRangeBox/index.js +25 -24
- package/es/ProForm/components/render/ChangedWrapper.js +34 -33
- package/es/ProForm/components/render/ConfirmWrapper.js +16 -18
- package/es/ProForm/components/render/Render.js +150 -135
- package/es/ProForm/components/render/RenderFields.js +65 -50
- package/es/ProForm/components/render/propsType.js +25 -0
- package/es/ProForm/index.js +83 -70
- package/es/ProForm/propsType.d.ts +1 -1
- package/es/ProForm/propsType.js +5 -1
- package/es/ProForm/utils/diffOriginal.js +30 -16
- package/es/ProForm/utils/getDefaultProps.js +10 -10
- package/es/ProForm/utils/index.js +105 -110
- package/es/ProForm/utils/processDependencies.js +15 -5
- package/es/ProForm/utils/rulesCreator.js +21 -22
- package/es/ProForm/utils/transformNames.js +7 -6
- package/es/ProForm/utils/transformValue.js +16 -13
- package/es/ProForm/utils/useDeepCompareMemo.js +6 -4
- package/es/ProForm/utils/useFieldProps.js +1 -3
- package/es/ProForm/utils/useForm.js +36 -34
- package/es/ProForm/utils/useRules.js +28 -31
- package/es/ProForm/utils/useShouldUpdate.js +83 -86
- package/es/ProForm/utils/useWatch.js +36 -14
- package/es/ProForm/utils/valueType.js +51 -52
- package/es/ProIcon/config/index.js +2 -0
- package/es/ProIcon/index.js +53 -49
- package/es/ProIcon/utils/index.js +8 -9
- package/es/ProLayout/components/Layout/Header/index.js +13 -11
- package/es/ProLayout/components/Layout/Icon/Icon.js +7 -7
- package/es/ProLayout/components/Layout/Icon/index.js +1 -1
- package/es/ProLayout/components/Layout/Menu/FoldMenu/index.js +42 -40
- package/es/ProLayout/components/Layout/Menu/OpenMenu/index.js +51 -52
- package/es/ProLayout/components/Layout/Menu/SideMenu/index.js +10 -9
- package/es/ProLayout/components/Layout/Menu/index.js +20 -18
- package/es/ProLayout/components/Layout/Notice/index.js +12 -11
- package/es/ProLayout/components/Layout/index.js +4 -4
- package/es/ProLayout/components/ProCollapse/index.js +35 -32
- package/es/ProLayout/components/ProFooter/index.js +13 -15
- package/es/ProLayout/components/ProHeader/components/Copy/index.js +9 -9
- package/es/ProLayout/components/ProHeader/components/ProBackBtn/index.js +8 -7
- package/es/ProLayout/components/ProHeader/components/index.js +2 -2
- package/es/ProLayout/components/ProHeader/index.js +129 -118
- package/es/ProLayout/components/ProHeader/utils/index.js +1 -1
- package/es/ProLayout/components/index.js +3 -3
- package/es/ProLayout/index.d.ts +1 -1
- package/es/ProLayout/index.js +28 -25
- package/es/ProLayout/utils/index.js +37 -35
- package/es/ProSelect/components/AdaptiveTooltip.js +10 -11
- package/es/ProSelect/index.js +87 -99
- package/es/ProSelect/utils/index.js +27 -33
- package/es/ProStep/components/Anchor/index.d.ts +1 -0
- package/es/ProStep/components/Anchor/index.js +26 -25
- package/es/ProStep/components/Item/index.d.ts +1 -0
- package/es/ProStep/components/Item/index.js +26 -22
- package/es/ProStep/components/Listener/index.js +11 -15
- package/es/ProStep/components/Step/index.js +24 -25
- package/es/ProStep/index.js +51 -53
- package/es/ProStep/utils/index.js +13 -12
- package/es/ProStepTab/index.js +59 -37
- package/es/ProTable/components/FormatColumn/index.js +106 -110
- package/es/ProTable/components/RcTable/components/BaseTable/index.js +7 -9
- package/es/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/index.js +36 -50
- package/es/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/utils/index.js +24 -24
- package/es/ProTable/components/RcTable/components/DraggableTable/index.js +8 -10
- package/es/ProTable/components/RcTable/index.js +2 -2
- package/es/ProTable/components/RenderColumn/index.js +51 -51
- package/es/ProTable/components/RenderEmptyText/index.js +8 -7
- package/es/ProTable/components/RenderFooter/index.js +3 -3
- package/es/ProTable/components/RenderSummary/index.js +13 -13
- package/es/ProTable/components/RenderTableHeader/index.js +16 -14
- package/es/ProTable/components/RenderTabs/index.js +28 -33
- package/es/ProTable/components/TableResizable/index.js +17 -16
- package/es/ProTable/components/TooltipTitle/index.js +7 -6
- package/es/ProTable/components/index.js +11 -6
- package/es/ProTable/hooks/useAntdTable.js +106 -119
- package/es/ProTable/index.js +158 -176
- package/es/ProTable/utils/index.js +25 -21
- package/es/ProTabs/components/Card/index.js +15 -14
- package/es/ProTabs/components/index.js +1 -1
- package/es/ProTabs/index.js +24 -25
- package/es/ProThemeTools/component/ProTools/index.js +69 -68
- package/es/ProThemeTools/component/index.js +1 -1
- package/es/ProThemeTools/index.js +47 -33
- package/es/ProThemeTools/utils/index.js +20 -17
- package/es/ProTooltip/index.js +44 -46
- package/es/ProTree/components/AdaptiveTooltip.js +5 -7
- package/es/ProTree/components/CloseIcon.js +5 -5
- package/es/ProTree/components/List.js +22 -24
- package/es/ProTree/components/ProTree.js +84 -102
- package/es/ProTree/components/ProTreeSelect/index.js +128 -119
- package/es/ProTree/components/SearchTitle.js +10 -9
- package/es/ProTree/components/Tree.js +57 -58
- package/es/ProTree/components/index.js +4 -4
- package/es/ProTree/index.js +6 -6
- package/es/ProTree/utils.js +29 -22
- package/es/ProTreeModal/components/Cascader.js +31 -33
- package/es/ProTreeModal/components/CloseIcon.js +5 -5
- package/es/ProTreeModal/components/List.js +74 -93
- package/es/ProTreeModal/components/SearchTitle.js +5 -4
- package/es/ProTreeModal/components/SortableItem.js +14 -14
- package/es/ProTreeModal/components/Tree.js +49 -53
- package/es/ProTreeModal/components/Trigger.js +29 -28
- package/es/ProTreeModal/components/index.js +6 -6
- package/es/ProTreeModal/index.js +166 -206
- package/es/ProTreeModal/utils.js +37 -33
- package/es/ProUpload/components/ButtonRender.js +33 -36
- package/es/ProUpload/components/DragRender.js +54 -51
- package/es/ProUpload/components/DraggableUploadListItem.js +5 -4
- package/es/ProUpload/components/Example.js +13 -12
- package/es/ProUpload/components/FileItem.js +63 -58
- package/es/ProUpload/components/ImageRender.js +98 -100
- package/es/ProUpload/index.js +75 -82
- package/es/ProUpload/uitls.js +3 -3
- package/es/ProUtils/utils/index.js +10 -14
- package/es/ProViewer/index.js +29 -25
- package/es/ProViewer/propsType.js +0 -1
- package/es/ProWaterMark/index.js +5 -4
- package/es/index.d.ts +1 -1
- package/es/index.js +38 -29
- package/es/locale/index.js +7 -4
- package/es/old/ProCertValidity/index.js +19 -21
- package/es/old/ProEditableTable/index.js +156 -156
- package/es/old/ProEditableTable/utils.js +61 -63
- package/es/tokens.js +1 -0
- package/es/utils/index.js +12 -12
- package/lib/FormsProvider/index.js +11 -7
- package/lib/ProAction/components/CheckModalContent/index.js +11 -13
- package/lib/ProAction/index.js +40 -43
- package/lib/ProConfigProvider/index.js +24 -17
- package/lib/ProDownload/index.js +65 -71
- package/lib/ProDownload/utils.js +25 -22
- package/lib/ProDrawerForm/components/ProDrawer/index.js +39 -38
- package/lib/ProDrawerForm/components/ProModal/index.js +23 -22
- package/lib/ProDrawerForm/index.js +18 -18
- package/lib/ProDrawerForm/utils/index.js +3 -2
- package/lib/ProEditLabel/components/RenderProForm.js +26 -24
- package/lib/ProEditLabel/index.js +46 -35
- package/lib/ProEditLabel/utils/index.js +6 -5
- package/lib/ProEditTable/components/ActionButton/index.js +79 -74
- package/lib/ProEditTable/components/RcTable/BaseTable.js +21 -23
- package/lib/ProEditTable/components/RcTable/DraggableTable.js +32 -40
- package/lib/ProEditTable/components/RcTable/VirtualTable.js +3 -3
- package/lib/ProEditTable/components/RenderField/ListChangedWrapper.js +62 -59
- package/lib/ProEditTable/components/RenderField/index.js +137 -132
- package/lib/ProEditTable/components/RenderToolbar/index.js +34 -41
- package/lib/ProEditTable/components/Summary/index.js +20 -20
- package/lib/ProEditTable/components/Validator/index.js +10 -10
- package/lib/ProEditTable/index.d.ts +1 -1
- package/lib/ProEditTable/index.js +159 -164
- package/lib/ProEditTable/utils/config.js +40 -44
- package/lib/ProEditTable/utils/diffOriginal.js +36 -21
- package/lib/ProEditTable/utils/getDefaultProps.js +14 -15
- package/lib/ProEditTable/utils/index.js +97 -97
- package/lib/ProEditTable/utils/tools.js +96 -91
- package/lib/ProEditTable/utils/transform.js +7 -11
- package/lib/ProEditTable/utils/useEditTableError.js +22 -13
- package/lib/ProEnum/components/Group.js +23 -27
- package/lib/ProEnum/components/Tag.js +14 -16
- package/lib/ProEnum/hooks/useEnum.js +30 -12
- package/lib/ProEnum/hooks/useEnumRequest.js +39 -39
- package/lib/ProEnum/hooks/useFrequentEnumRequest.js +16 -18
- package/lib/ProEnum/index.js +68 -78
- package/lib/ProEnum/utils/eventCenter.js +23 -32
- package/lib/ProEnum/utils/frequentEnum.js +14 -3
- package/lib/ProEnum/utils/getEnumLabel.js +15 -21
- package/lib/ProEnum/utils/index.js +12 -7
- package/lib/ProForm/components/Container.js +7 -5
- package/lib/ProForm/components/FormFooter/index.js +19 -17
- package/lib/ProForm/components/base/Checkbox/index.js +14 -13
- package/lib/ProForm/components/base/DatePicker/index.js +20 -17
- package/lib/ProForm/components/base/Input/index.js +15 -15
- package/lib/ProForm/components/base/InputNumber/index.js +51 -48
- package/lib/ProForm/components/base/Radio/index.js +13 -13
- package/lib/ProForm/components/base/RangePicker/index.js +19 -22
- package/lib/ProForm/components/base/RangePicker/useDateRange.js +5 -4
- package/lib/ProForm/components/base/Select/index.js +14 -12
- package/lib/ProForm/components/base/Switch/index.js +11 -11
- package/lib/ProForm/components/base/SwitchCheckbox/index.js +16 -15
- package/lib/ProForm/components/base/TextArea/index.js +14 -13
- package/lib/ProForm/components/base/TimePicker/index.js +6 -5
- package/lib/ProForm/components/combination/Container/index.js +22 -21
- package/lib/ProForm/components/combination/FormList/components/ActionButton.js +77 -89
- package/lib/ProForm/components/combination/FormList/components/BlockFields.js +17 -15
- package/lib/ProForm/components/combination/FormList/components/BlockTitle.js +7 -7
- package/lib/ProForm/components/combination/FormList/components/Empty.js +17 -18
- package/lib/ProForm/components/combination/FormList/components/LineFields.js +14 -14
- package/lib/ProForm/components/combination/FormList/components/ToolbarButton.js +43 -48
- package/lib/ProForm/components/combination/FormList/index.js +35 -43
- package/lib/ProForm/components/combination/FormList/utils.js +11 -10
- package/lib/ProForm/components/combination/Group/component/AddonWrapper/index.js +7 -5
- package/lib/ProForm/components/combination/Group/component/ComRender.js +30 -28
- package/lib/ProForm/components/combination/Group/hooks/index.js +48 -45
- package/lib/ProForm/components/combination/Group/index.js +34 -35
- package/lib/ProForm/components/combination/Group/utils.js +62 -50
- package/lib/ProForm/components/combination/ProCascader/index.js +75 -80
- package/lib/ProForm/components/combination/ProCascader/utils/index.js +8 -7
- package/lib/ProForm/components/combination/ProCombination/index.js +35 -31
- package/lib/ProForm/components/combination/ProModalSelect/hooks/useRequestList.js +30 -24
- package/lib/ProForm/components/combination/ProModalSelect/index.js +171 -180
- package/lib/ProForm/components/combination/ProModalSelect/utils/index.js +3 -2
- package/lib/ProForm/components/combination/ProNumberRange/index.js +42 -48
- package/lib/ProForm/components/combination/ProRangeLimit/index.js +35 -35
- package/lib/ProForm/components/combination/ProTimeLimit/hooks/useControlled.js +3 -3
- package/lib/ProForm/components/combination/ProTimeLimit/index.js +37 -34
- package/lib/ProForm/components/index.d.ts +1 -0
- package/lib/ProForm/components/old/EnumSelect/hooks/useRequestList.js +35 -33
- package/lib/ProForm/components/old/EnumSelect/index.js +50 -58
- package/lib/ProForm/components/old/InputRange/index.js +16 -16
- package/lib/ProForm/components/old/InputWithSuffix/index.js +4 -4
- package/lib/ProForm/components/old/ProAddress/index.js +53 -75
- package/lib/ProForm/components/old/ProCertNo/index.js +16 -17
- package/lib/ProForm/components/old/ProCertValidity/index.js +17 -18
- package/lib/ProForm/components/old/ProRangeBox/index.js +24 -24
- package/lib/ProForm/components/render/ChangedWrapper.js +35 -35
- package/lib/ProForm/components/render/ConfirmWrapper.js +14 -17
- package/lib/ProForm/components/render/Render.js +138 -125
- package/lib/ProForm/components/render/RenderFields.js +57 -43
- package/lib/ProForm/components/render/propsType.js +26 -1
- package/lib/ProForm/index.js +74 -61
- package/lib/ProForm/propsType.d.ts +1 -1
- package/lib/ProForm/propsType.js +5 -1
- package/lib/ProForm/utils/diffOriginal.js +30 -17
- package/lib/ProForm/utils/getDefaultProps.js +12 -12
- package/lib/ProForm/utils/index.js +127 -106
- package/lib/ProForm/utils/processDependencies.js +15 -6
- package/lib/ProForm/utils/rulesCreator.js +21 -21
- package/lib/ProForm/utils/transformNames.js +6 -6
- package/lib/ProForm/utils/transformValue.js +14 -11
- package/lib/ProForm/utils/useDeepCompareMemo.js +7 -6
- package/lib/ProForm/utils/useFieldProps.js +2 -3
- package/lib/ProForm/utils/useForm.js +33 -31
- package/lib/ProForm/utils/useRules.js +25 -28
- package/lib/ProForm/utils/useShouldUpdate.js +82 -85
- package/lib/ProForm/utils/useWatch.js +36 -14
- package/lib/ProForm/utils/valueType.js +52 -52
- package/lib/ProIcon/config/index.js +2 -0
- package/lib/ProIcon/index.js +47 -44
- package/lib/ProIcon/utils/index.js +10 -8
- package/lib/ProLayout/components/Layout/Header/index.js +10 -10
- package/lib/ProLayout/components/Layout/Icon/Icon.js +8 -7
- package/lib/ProLayout/components/Layout/Menu/FoldMenu/index.js +37 -36
- package/lib/ProLayout/components/Layout/Menu/OpenMenu/index.js +49 -52
- package/lib/ProLayout/components/Layout/Menu/SideMenu/index.js +8 -8
- package/lib/ProLayout/components/Layout/Menu/index.js +17 -16
- package/lib/ProLayout/components/Layout/Notice/index.js +8 -8
- package/lib/ProLayout/components/ProCollapse/index.js +32 -30
- package/lib/ProLayout/components/ProFooter/index.js +14 -16
- package/lib/ProLayout/components/ProHeader/components/Copy/index.js +7 -7
- package/lib/ProLayout/components/ProHeader/components/ProBackBtn/index.js +6 -7
- package/lib/ProLayout/components/ProHeader/index.js +131 -120
- package/lib/ProLayout/components/ProHeader/utils/index.js +3 -2
- package/lib/ProLayout/index.d.ts +1 -1
- package/lib/ProLayout/index.js +22 -21
- package/lib/ProLayout/utils/index.js +42 -33
- package/lib/ProSelect/components/AdaptiveTooltip.js +9 -11
- package/lib/ProSelect/index.js +82 -93
- package/lib/ProSelect/utils/index.js +29 -34
- package/lib/ProStep/components/Anchor/index.d.ts +1 -0
- package/lib/ProStep/components/Anchor/index.js +25 -24
- package/lib/ProStep/components/Item/index.d.ts +1 -0
- package/lib/ProStep/components/Item/index.js +24 -20
- package/lib/ProStep/components/Listener/index.js +9 -13
- package/lib/ProStep/components/Step/index.js +20 -21
- package/lib/ProStep/index.js +45 -49
- package/lib/ProStep/utils/index.js +16 -12
- package/lib/ProStepTab/index.js +60 -38
- package/lib/ProTable/components/FormatColumn/index.js +100 -104
- package/lib/ProTable/components/RcTable/components/BaseTable/index.js +5 -7
- package/lib/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/index.js +34 -48
- package/lib/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/utils/index.js +25 -23
- package/lib/ProTable/components/RcTable/components/DraggableTable/index.js +5 -7
- package/lib/ProTable/components/RenderColumn/index.js +46 -48
- package/lib/ProTable/components/RenderEmptyText/index.js +6 -6
- package/lib/ProTable/components/RenderFooter/index.js +3 -3
- package/lib/ProTable/components/RenderSummary/index.js +11 -12
- package/lib/ProTable/components/RenderTableHeader/index.js +14 -13
- package/lib/ProTable/components/RenderTabs/index.js +27 -32
- package/lib/ProTable/components/TableResizable/index.js +16 -15
- package/lib/ProTable/components/TooltipTitle/index.js +5 -5
- package/lib/ProTable/hooks/useAntdTable.js +103 -116
- package/lib/ProTable/index.js +149 -169
- package/lib/ProTable/utils/index.js +33 -22
- package/lib/ProTabs/components/Card/index.js +14 -14
- package/lib/ProTabs/index.js +24 -24
- package/lib/ProThemeTools/component/ProTools/index.js +66 -65
- package/lib/ProThemeTools/index.js +43 -29
- package/lib/ProThemeTools/utils/index.js +25 -18
- package/lib/ProTooltip/index.js +44 -46
- package/lib/ProTree/components/AdaptiveTooltip.js +5 -7
- package/lib/ProTree/components/CloseIcon.js +5 -5
- package/lib/ProTree/components/List.js +18 -22
- package/lib/ProTree/components/ProTree.js +77 -96
- package/lib/ProTree/components/ProTreeSelect/index.js +126 -116
- package/lib/ProTree/components/SearchTitle.js +8 -8
- package/lib/ProTree/components/Tree.js +53 -55
- package/lib/ProTree/index.js +4 -4
- package/lib/ProTree/utils.js +34 -25
- package/lib/ProTreeModal/components/Cascader.js +28 -32
- package/lib/ProTreeModal/components/CloseIcon.js +5 -5
- package/lib/ProTreeModal/components/List.js +69 -89
- package/lib/ProTreeModal/components/SearchTitle.js +4 -4
- package/lib/ProTreeModal/components/SortableItem.js +11 -12
- package/lib/ProTreeModal/components/Tree.js +44 -49
- package/lib/ProTreeModal/components/Trigger.js +26 -26
- package/lib/ProTreeModal/index.js +157 -199
- package/lib/ProTreeModal/utils.js +43 -35
- package/lib/ProUpload/components/ButtonRender.js +29 -33
- package/lib/ProUpload/components/DragRender.js +50 -48
- package/lib/ProUpload/components/DraggableUploadListItem.js +7 -5
- package/lib/ProUpload/components/Example.js +13 -11
- package/lib/ProUpload/components/FileItem.js +58 -50
- package/lib/ProUpload/components/ImageRender.js +89 -93
- package/lib/ProUpload/index.js +68 -76
- package/lib/ProUpload/uitls.js +5 -3
- package/lib/ProUtils/utils/index.js +10 -14
- package/lib/ProViewer/index.js +26 -24
- package/lib/ProViewer/propsType.js +1 -5
- package/lib/ProWaterMark/index.js +5 -4
- package/lib/index.d.ts +1 -1
- package/lib/locale/index.js +6 -2
- package/lib/old/ProCertValidity/index.js +17 -18
- package/lib/old/ProEditableTable/index.js +153 -156
- package/lib/old/ProEditableTable/utils.js +61 -62
- package/lib/tokens.js +1 -0
- package/lib/utils/index.js +16 -13
- package/package.json +8 -8
- package/dist/index.esm.js +0 -3
- package/dist/less.esm.js +0 -3
@@ -1,2 +1,2 @@
|
|
1
|
-
import Icon from
|
1
|
+
import Icon from "./Icon";
|
2
2
|
export default Icon;
|
@@ -3,15 +3,16 @@ import _Tooltip from "antd/es/tooltip";
|
|
3
3
|
import "antd/es/popover/style";
|
4
4
|
import _Popover from "antd/es/popover";
|
5
5
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
6
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
7
6
|
import { useContext } from 'react';
|
8
7
|
import classnames from 'classnames';
|
9
8
|
import { Link } from 'react-router-dom';
|
10
|
-
import { Icon } from
|
11
|
-
import SideMenu from
|
12
|
-
import { LayoutContext } from
|
13
|
-
import { getUrlParams, getPathNameKey, findMenuItemByKey } from
|
14
|
-
|
9
|
+
import { Icon } from "../../index";
|
10
|
+
import SideMenu from "../SideMenu";
|
11
|
+
import { LayoutContext } from "../../../../index";
|
12
|
+
import { getUrlParams, getPathNameKey, findMenuItemByKey } from "../../../../utils";
|
13
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
14
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
15
|
+
var FoldMenu = props => {
|
15
16
|
var style = props.style,
|
16
17
|
dataSource = props.dataSource,
|
17
18
|
onMenuClick = props.onMenuClick;
|
@@ -20,7 +21,7 @@ var FoldMenu = function FoldMenu(props) {
|
|
20
21
|
notice = dataSource.notice,
|
21
22
|
collapsed = dataSource.collapsed,
|
22
23
|
headerHeight = dataSource.headerHeight;
|
23
|
-
var pathNamePrefix =
|
24
|
+
var pathNamePrefix = `/${window.location.pathname.split('/')[1]}`;
|
24
25
|
var noticeCls = classnames({
|
25
26
|
'pro-layout-menu-tooltip': true,
|
26
27
|
'pro-layout-menu-tooltip-has-notice': notice,
|
@@ -29,13 +30,13 @@ var FoldMenu = function FoldMenu(props) {
|
|
29
30
|
var _useContext = useContext(LayoutContext),
|
30
31
|
selectedPath = _useContext.selectedPath,
|
31
32
|
onSelected = _useContext.onSelected;
|
32
|
-
return _jsx("div", {
|
33
|
+
return /*#__PURE__*/_jsx("div", {
|
33
34
|
className: "pro-layout-menu-fold",
|
34
35
|
style: _objectSpread({}, style),
|
35
|
-
children: _jsx("ul", {
|
36
|
+
children: /*#__PURE__*/_jsx("ul", {
|
36
37
|
className: "pro-layout-menu-fold-list",
|
37
38
|
style: _objectSpread({}, style),
|
38
|
-
children: menus.map(
|
39
|
+
children: menus.map((item, index) => {
|
39
40
|
var _url$split;
|
40
41
|
var id = item.id,
|
41
42
|
url = item.url,
|
@@ -46,41 +47,45 @@ var FoldMenu = function FoldMenu(props) {
|
|
46
47
|
hideInMenu = item.hideInMenu,
|
47
48
|
children = item.children;
|
48
49
|
var toPath = item.redirectUrl || item.url;
|
50
|
+
|
49
51
|
// 隐藏菜单
|
50
52
|
if (hideInMenu) {
|
51
53
|
return null;
|
52
54
|
}
|
53
55
|
var selectedMenu = getUrlParams('activeMenu');
|
56
|
+
|
54
57
|
// 取第一级
|
55
58
|
var currentKeyIdPath = getPathNameKey({
|
56
|
-
menus
|
59
|
+
menus,
|
57
60
|
pathName: selectedMenu || selectedPath || window.location.pathname // 优先匹配URL中定位菜单
|
58
61
|
}) || [];
|
59
62
|
var cls = classnames({
|
60
63
|
active: currentKeyIdPath.includes(id)
|
61
64
|
});
|
65
|
+
|
62
66
|
// 是否包含子级菜单
|
63
67
|
var hasChildrenMenu = Array.isArray(children) && children.length;
|
68
|
+
|
64
69
|
// 一级li Dom节点
|
65
|
-
var LiNode = _jsx("li", {
|
66
|
-
id: url === null || url === void 0
|
67
|
-
className:
|
68
|
-
children: _jsxs("div", {
|
69
|
-
children: [imgUrl ? _jsx("img", {
|
70
|
+
var LiNode = /*#__PURE__*/_jsx("li", {
|
71
|
+
id: url === null || url === void 0 || (_url$split = url.split('/')) === null || _url$split === void 0 ? void 0 : _url$split[1],
|
72
|
+
className: `${cls} pro-layout-menu-fold-li`,
|
73
|
+
children: /*#__PURE__*/_jsxs("div", {
|
74
|
+
children: [imgUrl ? /*#__PURE__*/_jsx("img", {
|
70
75
|
className: "pro-layout-icon",
|
71
76
|
src: pathNamePrefix === url ? imgActiveUrl || imgUrl : imgUrl,
|
72
77
|
alt: "icon"
|
73
|
-
}) : _jsx(Icon, {
|
78
|
+
}) : /*#__PURE__*/_jsx(Icon, {
|
74
79
|
type: icon || '',
|
75
80
|
iconfontUrl: iconfontUrl || ''
|
76
|
-
}), _jsx("h2", {
|
81
|
+
}), /*#__PURE__*/_jsx("h2", {
|
77
82
|
children: name
|
78
83
|
})]
|
79
84
|
})
|
80
|
-
},
|
81
|
-
return hasChildrenMenu ? _jsx(_Popover, {
|
85
|
+
}, `${id}-${name}`);
|
86
|
+
return hasChildrenMenu ? /*#__PURE__*/_jsx(_Popover, {
|
82
87
|
mouseEnterDelay: 0,
|
83
|
-
content: _jsx(SideMenu, {
|
88
|
+
content: /*#__PURE__*/_jsx(SideMenu, {
|
84
89
|
dataSource: _objectSpread(_objectSpread({}, dataSource), {}, {
|
85
90
|
menus: item
|
86
91
|
}),
|
@@ -90,16 +95,15 @@ var FoldMenu = function FoldMenu(props) {
|
|
90
95
|
overlayClassName: noticeCls,
|
91
96
|
overlayInnerStyle: {
|
92
97
|
marginTop: headerHeight - 48,
|
93
|
-
height:
|
98
|
+
height: `calc(100vh - ${headerHeight + (notice ? 32 : 0)}px)`
|
94
99
|
},
|
95
100
|
placement: "rightTop",
|
96
|
-
children: _jsx("span", {
|
97
|
-
onClick:
|
101
|
+
children: /*#__PURE__*/_jsx("span", {
|
102
|
+
onClick: () => {
|
98
103
|
// 查找完整的菜单项数据
|
99
104
|
var menuItem = findMenuItemByKey(menus, String(id));
|
100
|
-
var menuKeyPath =
|
101
|
-
|
102
|
-
}) : [String(id)];
|
105
|
+
var menuKeyPath = menuItem !== null && menuItem !== void 0 && menuItem.keyIdPath ? menuItem.keyIdPath.map(id => String(id)) : [String(id)];
|
106
|
+
|
103
107
|
// 调用用户传入的onMenuClick回调
|
104
108
|
if (onMenuClick) {
|
105
109
|
onMenuClick({
|
@@ -111,16 +115,15 @@ var FoldMenu = function FoldMenu(props) {
|
|
111
115
|
},
|
112
116
|
children: LiNode
|
113
117
|
})
|
114
|
-
},
|
118
|
+
}, `${id}-${name}`) : !collapsed ? /*#__PURE__*/_jsx(_Tooltip, {
|
115
119
|
placement: "right",
|
116
120
|
title: name,
|
117
|
-
children: _jsx("span", {
|
118
|
-
onClick:
|
121
|
+
children: /*#__PURE__*/_jsx("span", {
|
122
|
+
onClick: () => {
|
119
123
|
// 查找完整的菜单项数据
|
120
124
|
var menuItem = findMenuItemByKey(menus, String(id));
|
121
|
-
var menuKeyPath =
|
122
|
-
|
123
|
-
}) : [String(id)];
|
125
|
+
var menuKeyPath = menuItem !== null && menuItem !== void 0 && menuItem.keyIdPath ? menuItem.keyIdPath.map(id => String(id)) : [String(id)];
|
126
|
+
|
124
127
|
// 调用用户传入的onMenuClick回调
|
125
128
|
if (onMenuClick) {
|
126
129
|
onMenuClick({
|
@@ -133,18 +136,17 @@ var FoldMenu = function FoldMenu(props) {
|
|
133
136
|
selectedPath: toPath
|
134
137
|
});
|
135
138
|
},
|
136
|
-
children: _jsx(Link, {
|
139
|
+
children: /*#__PURE__*/_jsx(Link, {
|
137
140
|
to: toPath,
|
138
141
|
children: LiNode
|
139
142
|
}, toPath)
|
140
143
|
})
|
141
|
-
}, toPath) : _jsx("span", {
|
142
|
-
onClick:
|
144
|
+
}, toPath) : /*#__PURE__*/_jsx("span", {
|
145
|
+
onClick: () => {
|
143
146
|
// 查找完整的菜单项数据
|
144
147
|
var menuItem = findMenuItemByKey(menus, String(id));
|
145
|
-
var menuKeyPath =
|
146
|
-
|
147
|
-
}) : [String(id)];
|
148
|
+
var menuKeyPath = menuItem !== null && menuItem !== void 0 && menuItem.keyIdPath ? menuItem.keyIdPath.map(id => String(id)) : [String(id)];
|
149
|
+
|
148
150
|
// 调用用户传入的onMenuClick回调
|
149
151
|
if (onMenuClick) {
|
150
152
|
onMenuClick({
|
@@ -154,7 +156,7 @@ var FoldMenu = function FoldMenu(props) {
|
|
154
156
|
});
|
155
157
|
}
|
156
158
|
},
|
157
|
-
children: _jsx(Link, {
|
159
|
+
children: /*#__PURE__*/_jsx(Link, {
|
158
160
|
to: toPath,
|
159
161
|
children: LiNode
|
160
162
|
}, toPath)
|
@@ -1,18 +1,19 @@
|
|
1
1
|
import "antd/es/menu/style";
|
2
2
|
import _Menu from "antd/es/menu";
|
3
|
-
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
4
3
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
5
|
-
import _cloneDeep from "lodash/cloneDeep";
|
6
|
-
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
7
4
|
import { useMemo, useRef, useContext } from 'react';
|
8
5
|
import { useDeepCompareEffect, useSetState } from 'ahooks';
|
9
6
|
import { CaretDownOutlined } from '@ant-design/icons';
|
10
7
|
import classnames from 'classnames';
|
11
8
|
import { Link } from 'react-router-dom';
|
12
|
-
import {
|
13
|
-
import {
|
14
|
-
import {
|
15
|
-
|
9
|
+
import { cloneDeep } from 'lodash';
|
10
|
+
import { LayoutContext } from "../../../../index";
|
11
|
+
import { getIdsByPathName, findMenuItemByKey } from "../../../../utils";
|
12
|
+
import { Icon } from "../../index";
|
13
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
14
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
15
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
16
|
+
var OpenMenu = props => {
|
16
17
|
var _getIdsByPathName;
|
17
18
|
var className = props.className,
|
18
19
|
dataSource = props.dataSource,
|
@@ -40,60 +41,58 @@ var OpenMenu = function OpenMenu(props) {
|
|
40
41
|
var _useContext = useContext(LayoutContext),
|
41
42
|
onSelected = _useContext.onSelected,
|
42
43
|
target = _useContext.target;
|
43
|
-
var cls = classnames(
|
44
|
-
'pro-layout-open-menu': true
|
45
|
-
|
44
|
+
var cls = classnames({
|
45
|
+
'pro-layout-open-menu': true,
|
46
|
+
[`${className}`]: className
|
47
|
+
});
|
48
|
+
|
46
49
|
// 默认激活菜单优先取activeMenu中,默认取pathName进行匹配
|
47
|
-
var selectKeyIdPath = ((_getIdsByPathName = getIdsByPathName(menus, query.get('activeMenu'))) === null || _getIdsByPathName === void 0 ? void 0 : _getIdsByPathName.map(
|
48
|
-
|
49
|
-
|
50
|
-
var itemsTransform = useMemo(function () {
|
51
|
-
var result = _cloneDeep(menus);
|
50
|
+
var selectKeyIdPath = ((_getIdsByPathName = getIdsByPathName(menus, query.get('activeMenu'))) === null || _getIdsByPathName === void 0 ? void 0 : _getIdsByPathName.map(item => String(item))) || [];
|
51
|
+
var itemsTransform = useMemo(() => {
|
52
|
+
var result = cloneDeep(menus);
|
52
53
|
if (!Array.isArray(result) || !result.length) {
|
53
54
|
return [];
|
54
55
|
}
|
55
|
-
var
|
56
|
-
data.forEach(
|
56
|
+
var menuDeep = data => {
|
57
|
+
data.forEach(item => {
|
57
58
|
var _item$keyIdPath, _item$keyIdPath2, _item$children;
|
58
59
|
// 是否是第一级菜单,展开模式一级菜单有icon, 收起模式二级菜单有icon
|
59
60
|
var isFirstMenu = ((_item$keyIdPath = item.keyIdPath) === null || _item$keyIdPath === void 0 ? void 0 : _item$keyIdPath.length) === 1 || sideMenu && ((_item$keyIdPath2 = item.keyIdPath) === null || _item$keyIdPath2 === void 0 ? void 0 : _item$keyIdPath2.length) === 2;
|
60
61
|
// 第一级菜单显示icon
|
61
|
-
item.label = _jsxs("div", {
|
62
|
+
item.label = /*#__PURE__*/_jsxs("div", {
|
62
63
|
className: classnames({
|
63
64
|
'pro-layout-open-menu-lv1': isFirstMenu
|
64
65
|
}),
|
65
|
-
children: [_jsx(_Fragment, {
|
66
|
-
children: item.imgUrl && isFirstMenu ? _jsx("img", {
|
66
|
+
children: [/*#__PURE__*/_jsx(_Fragment, {
|
67
|
+
children: item.imgUrl && isFirstMenu ? /*#__PURE__*/_jsx("img", {
|
67
68
|
className: "pro-layout-icon",
|
68
69
|
src: selectKeyIdPath[0] === String(item.id) ? item.imgActiveUrl || item.imgUrl : item.imgUrl,
|
69
70
|
alt: "icon"
|
70
|
-
}) : item.icon && isFirstMenu ? _jsx(Icon, {
|
71
|
+
}) : item.icon && isFirstMenu ? /*#__PURE__*/_jsx(Icon, {
|
71
72
|
type: item.icon || '',
|
72
73
|
iconfontUrl: (dataSource === null || dataSource === void 0 ? void 0 : dataSource.iconfontUrl) || ''
|
73
|
-
}) : _jsx("span", {
|
74
|
+
}) : /*#__PURE__*/_jsx("span", {
|
74
75
|
className: classnames({
|
75
76
|
'pro-layout-icon': true,
|
76
77
|
'pro-layout-icon-empty': isFirstMenu
|
77
78
|
})
|
78
79
|
})
|
79
|
-
}), _jsx("h2", {
|
80
|
+
}), /*#__PURE__*/_jsx("h2", {
|
80
81
|
children: item.name
|
81
82
|
})]
|
82
83
|
});
|
83
84
|
item.key = String(item.id);
|
84
85
|
item.router = item.redirectUrl || item.router || item.url;
|
85
|
-
Object.keys(item).filter(
|
86
|
-
return !['label', 'key', 'children', 'onTitleClick', 'router'].includes(keyItem);
|
87
|
-
}).forEach(function (_keyItem) {
|
86
|
+
Object.keys(item).filter(keyItem => !['label', 'key', 'children', 'onTitleClick', 'router'].includes(keyItem)).forEach(_keyItem => {
|
88
87
|
delete item[_keyItem];
|
89
88
|
});
|
90
|
-
if (Array.isArray(item === null || item === void 0 ? void 0 : item.children) && (item === null || item === void 0
|
89
|
+
if (Array.isArray(item === null || item === void 0 ? void 0 : item.children) && (item === null || item === void 0 || (_item$children = item.children) === null || _item$children === void 0 ? void 0 : _item$children.length) > 0) {
|
91
90
|
var _item = item === null || item === void 0 ? void 0 : item.children[0];
|
92
91
|
// 移除不需要显示的菜单
|
93
|
-
if (
|
92
|
+
if (_item !== null && _item !== void 0 && _item.hideInMenu || ['TAB', 'QUERY', 'BUTTON'].includes(_item === null || _item === void 0 ? void 0 : _item.type)) {
|
94
93
|
delete item.children;
|
95
94
|
} else {
|
96
|
-
|
95
|
+
menuDeep(item.children);
|
97
96
|
}
|
98
97
|
} else {
|
99
98
|
delete item.children;
|
@@ -101,10 +100,10 @@ var OpenMenu = function OpenMenu(props) {
|
|
101
100
|
});
|
102
101
|
return data;
|
103
102
|
};
|
104
|
-
|
103
|
+
menuDeep(result);
|
105
104
|
return result;
|
106
105
|
}, [dataSource]);
|
107
|
-
useDeepCompareEffect(
|
106
|
+
useDeepCompareEffect(() => {
|
108
107
|
if (Array.isArray(selectKeyIdPath) && selectKeyIdPath.length) {
|
109
108
|
setState({
|
110
109
|
selectedKeys: selectKeyIdPath,
|
@@ -112,35 +111,35 @@ var OpenMenu = function OpenMenu(props) {
|
|
112
111
|
});
|
113
112
|
}
|
114
113
|
}, [menus, selectKeyIdPath]);
|
114
|
+
|
115
115
|
// 折叠模式默认展开全部菜单
|
116
|
-
useDeepCompareEffect(
|
116
|
+
useDeepCompareEffect(() => {
|
117
117
|
if (sideMenu) {
|
118
|
-
var keys = menus.map(
|
119
|
-
return String(item.id);
|
120
|
-
});
|
118
|
+
var keys = menus.map(item => String(item.id));
|
121
119
|
setState({
|
122
120
|
openKeys: keys
|
123
121
|
});
|
124
122
|
}
|
125
123
|
}, [sideMenu]);
|
126
|
-
return _jsxs("div", {
|
124
|
+
return /*#__PURE__*/_jsxs("div", {
|
127
125
|
className: cls,
|
128
126
|
style: style,
|
129
|
-
children: [_jsx(_Menu, {
|
130
|
-
mode: "inline"
|
127
|
+
children: [/*#__PURE__*/_jsx(_Menu, {
|
128
|
+
mode: "inline"
|
131
129
|
// @ts-ignore
|
130
|
+
,
|
132
131
|
theme: theme,
|
133
132
|
selectedKeys: selectedKeys,
|
134
133
|
openKeys: openKeys,
|
135
134
|
items: itemsTransform,
|
136
135
|
inlineIndent: 14,
|
137
|
-
expandIcon: _jsx(CaretDownOutlined, {}),
|
138
|
-
onOpenChange:
|
136
|
+
expandIcon: /*#__PURE__*/_jsx(CaretDownOutlined, {}),
|
137
|
+
onOpenChange: openKeys => {
|
139
138
|
setState({
|
140
|
-
openKeys
|
139
|
+
openKeys
|
141
140
|
});
|
142
141
|
},
|
143
|
-
onClick:
|
142
|
+
onClick: _ref2 => {
|
144
143
|
var _item$props, _item$props2;
|
145
144
|
var item = _ref2.item,
|
146
145
|
keyPath = _ref2.keyPath,
|
@@ -150,31 +149,31 @@ var OpenMenu = function OpenMenu(props) {
|
|
150
149
|
// console.log('keyPath', keyPath);
|
151
150
|
// console.log('key', key);
|
152
151
|
// console.log('domEvent', domEvent);
|
152
|
+
|
153
153
|
// 查找完整的菜单项数据
|
154
154
|
var menuItem = findMenuItemByKey(menus, key);
|
155
|
-
var menuKeyPath =
|
156
|
-
|
157
|
-
}) : keyPath;
|
155
|
+
var menuKeyPath = menuItem !== null && menuItem !== void 0 && menuItem.keyIdPath ? menuItem.keyIdPath.map(id => String(id)) : keyPath;
|
156
|
+
|
158
157
|
// 调用用户传入的onMenuClick回调
|
159
158
|
if (onMenuClick) {
|
160
159
|
onMenuClick({
|
161
160
|
item: menuItem,
|
162
|
-
key
|
161
|
+
key,
|
163
162
|
keyPath: menuKeyPath
|
164
163
|
});
|
165
164
|
}
|
166
165
|
setState({
|
167
166
|
selectedKeys: keyPath,
|
168
|
-
router: item === null || item === void 0
|
167
|
+
router: item === null || item === void 0 || (_item$props = item.props) === null || _item$props === void 0 ? void 0 : _item$props.router
|
169
168
|
});
|
170
169
|
onSelected({
|
171
|
-
selectedPath: item === null || item === void 0
|
170
|
+
selectedPath: item === null || item === void 0 || (_item$props2 = item.props) === null || _item$props2 === void 0 ? void 0 : _item$props2.router
|
172
171
|
});
|
173
172
|
if (target) {
|
174
173
|
var _item$props3;
|
175
|
-
window.open(item === null || item === void 0
|
174
|
+
window.open(item === null || item === void 0 || (_item$props3 = item.props) === null || _item$props3 === void 0 ? void 0 : _item$props3.router, target);
|
176
175
|
} else {
|
177
|
-
setTimeout(
|
176
|
+
setTimeout(() => {
|
178
177
|
// 路由变更,且不再demo文档中
|
179
178
|
if (!window.location.href.includes('~demos/prolayout')) {
|
180
179
|
linkRef.current.click();
|
@@ -183,10 +182,10 @@ var OpenMenu = function OpenMenu(props) {
|
|
183
182
|
}
|
184
183
|
},
|
185
184
|
style: {
|
186
|
-
height: dataSource.sideMenu ? 'auto' :
|
185
|
+
height: dataSource.sideMenu ? 'auto' : `calc(100vh - ${(dataSource === null || dataSource === void 0 ? void 0 : dataSource.height) || 0}px)`,
|
187
186
|
color: 'red'
|
188
187
|
}
|
189
|
-
}), _jsx(Link, {
|
188
|
+
}), /*#__PURE__*/_jsx(Link, {
|
190
189
|
to: router,
|
191
190
|
ref: linkRef
|
192
191
|
})]
|
@@ -1,9 +1,10 @@
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
1
|
import { useRef } from 'react';
|
3
2
|
import classnames from 'classnames';
|
4
3
|
import { useSize } from 'ahooks';
|
5
|
-
import OpenMenu from
|
6
|
-
|
4
|
+
import OpenMenu from "../OpenMenu";
|
5
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
6
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
7
|
+
var SideMenu = props => {
|
7
8
|
var dataSource = props.dataSource,
|
8
9
|
onMenuClick = props.onMenuClick;
|
9
10
|
var ref = useRef(null);
|
@@ -16,23 +17,23 @@ var SideMenu = function SideMenu(props) {
|
|
16
17
|
var cls = classnames({
|
17
18
|
'pro-layout-sider-menu': true
|
18
19
|
});
|
19
|
-
return _jsxs("div", {
|
20
|
+
return /*#__PURE__*/_jsxs("div", {
|
20
21
|
className: cls,
|
21
|
-
children: [_jsx("h2", {
|
22
|
+
children: [/*#__PURE__*/_jsx("h2", {
|
22
23
|
ref: ref,
|
23
24
|
children: (menus === null || menus === void 0 ? void 0 : menus.name) || ''
|
24
|
-
}), _jsx("div", {
|
25
|
-
children: _jsx(OpenMenu, {
|
25
|
+
}), /*#__PURE__*/_jsx("div", {
|
26
|
+
children: /*#__PURE__*/_jsx(OpenMenu, {
|
26
27
|
className: "pro-layout-sider-menu-list",
|
27
28
|
theme: "light",
|
28
29
|
onMenuClick: onMenuClick,
|
29
30
|
dataSource: {
|
30
31
|
menus: (menus === null || menus === void 0 ? void 0 : menus.children) || [],
|
31
|
-
iconfontUrl
|
32
|
+
iconfontUrl,
|
32
33
|
sideMenu: true
|
33
34
|
},
|
34
35
|
style: {
|
35
|
-
height:
|
36
|
+
height: `calc(100vh - ${headerHeight + (notice ? 32 : 0) + ((size === null || size === void 0 ? void 0 : size.height) || 0)}px)`
|
36
37
|
}
|
37
38
|
})
|
38
39
|
})]
|
@@ -1,8 +1,10 @@
|
|
1
|
-
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
1
|
import classnames from 'classnames';
|
3
|
-
import OpenMenu from
|
4
|
-
import FoldMenu from
|
5
|
-
|
2
|
+
import OpenMenu from "./OpenMenu";
|
3
|
+
import FoldMenu from "./FoldMenu"; // 折叠后菜单
|
4
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
5
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
6
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
7
|
+
var Menu = props => {
|
6
8
|
var _ref = props || {},
|
7
9
|
headerHeight = _ref.headerHeight,
|
8
10
|
dataSource = _ref.dataSource,
|
@@ -26,17 +28,17 @@ var Menu = function Menu(props) {
|
|
26
28
|
menus = dataSource === null || dataSource === void 0 ? void 0 : dataSource.menus;
|
27
29
|
}
|
28
30
|
if (pure.leftMenu || pure === true) {
|
29
|
-
return _jsx(_Fragment, {});
|
31
|
+
return /*#__PURE__*/_jsx(_Fragment, {});
|
30
32
|
}
|
31
|
-
return _jsxs("div", {
|
33
|
+
return /*#__PURE__*/_jsxs("div", {
|
32
34
|
className: menuCls,
|
33
35
|
style: {
|
34
36
|
top: notice ? 80 + headerHeight - 48 : headerHeight
|
35
37
|
},
|
36
|
-
children: [sideMenuHeaderRender, _jsx(OpenMenu, {
|
38
|
+
children: [sideMenuHeaderRender, /*#__PURE__*/_jsx(OpenMenu, {
|
37
39
|
dataSource: {
|
38
|
-
menus
|
39
|
-
iconfontUrl
|
40
|
+
menus,
|
41
|
+
iconfontUrl,
|
40
42
|
height: headerHeight + (notice ? 32 : 0) + 48
|
41
43
|
},
|
42
44
|
theme: theme,
|
@@ -44,24 +46,24 @@ var Menu = function Menu(props) {
|
|
44
46
|
style: {
|
45
47
|
display: collapsed ? 'block' : 'none'
|
46
48
|
}
|
47
|
-
}), _jsx(FoldMenu, {
|
49
|
+
}), /*#__PURE__*/_jsx(FoldMenu, {
|
48
50
|
dataSource: {
|
49
|
-
menus
|
50
|
-
iconfontUrl
|
51
|
+
menus,
|
52
|
+
iconfontUrl,
|
51
53
|
height: headerHeight + (notice ? 32 : 0) + 48,
|
52
|
-
notice
|
53
|
-
collapsed
|
54
|
-
headerHeight
|
54
|
+
notice,
|
55
|
+
collapsed,
|
56
|
+
headerHeight
|
55
57
|
},
|
56
58
|
onMenuClick: onMenuClick,
|
57
59
|
style: {
|
58
60
|
display: collapsed ? 'none' : 'block',
|
59
|
-
height:
|
61
|
+
height: `calc(100vh - ${headerHeight + (notice ? 32 : 0) + 48 || 0}px)`
|
60
62
|
}
|
61
|
-
}), sideMenuFooterRender || _jsx("div", {
|
63
|
+
}), sideMenuFooterRender || /*#__PURE__*/_jsx("div", {
|
62
64
|
className: "pro-layout-menu-collapsed",
|
63
65
|
onClick: onToggle,
|
64
|
-
children: _jsx("div", {
|
66
|
+
children: /*#__PURE__*/_jsx("div", {
|
65
67
|
className: "pro-layout-arrow "
|
66
68
|
})
|
67
69
|
})]
|
@@ -1,28 +1,29 @@
|
|
1
|
-
import
|
2
|
-
import
|
3
|
-
import
|
4
|
-
import
|
5
|
-
|
1
|
+
import tipMsg from "../../../images/tipMsg.png";
|
2
|
+
import close from "../../../images/close.png";
|
3
|
+
import locale from "../../../../locale";
|
4
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
5
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
6
|
+
var Notice = props => {
|
6
7
|
var headerHeight = props.headerHeight,
|
7
8
|
notice = props.notice,
|
8
9
|
onCancel = props.onCancel;
|
9
10
|
if (!notice) {
|
10
11
|
return null;
|
11
12
|
}
|
12
|
-
return _jsxs("div", {
|
13
|
+
return /*#__PURE__*/_jsxs("div", {
|
13
14
|
className: "pro-layout-header-notice",
|
14
15
|
style: {
|
15
16
|
top: headerHeight
|
16
17
|
},
|
17
|
-
children: [_jsx("img", {
|
18
|
+
children: [/*#__PURE__*/_jsx("img", {
|
18
19
|
src: tipMsg,
|
19
|
-
alt:
|
20
|
-
}), " ", notice, _jsx("span", {
|
20
|
+
alt: `${locale.ProLayout.tipAlt}`
|
21
|
+
}), " ", notice, /*#__PURE__*/_jsx("span", {
|
21
22
|
className: "pro-layout-header-notice-close",
|
22
23
|
onClick: onCancel,
|
23
|
-
children: _jsx("img", {
|
24
|
+
children: /*#__PURE__*/_jsx("img", {
|
24
25
|
src: close,
|
25
|
-
alt:
|
26
|
+
alt: `${locale.ProLayout.closeAlt}`
|
26
27
|
})
|
27
28
|
})]
|
28
29
|
});
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export { default as Header } from
|
2
|
-
export { default as Notice } from
|
3
|
-
export { default as Menu } from
|
4
|
-
export { default as Icon } from
|
1
|
+
export { default as Header } from "./Header";
|
2
|
+
export { default as Notice } from "./Notice";
|
3
|
+
export { default as Menu } from "./Menu";
|
4
|
+
export { default as Icon } from "./Icon";
|