@zat-design/sisyphus-react 4.0.0-beta.9 → 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/README.md +1 -1
- package/dist/index.esm.css +1 -1
- package/dist/less.esm.css +1 -1
- package/es/ProAction/index.js +14 -4
- package/es/ProConfigProvider/index.js +11 -2
- package/es/ProDownload/index.js +16 -5
- package/es/ProDownload/utils.js +8 -3
- package/es/ProDrawerForm/components/ProDrawer/index.js +14 -4
- package/es/ProDrawerForm/components/ProModal/index.js +14 -4
- package/es/ProDrawerForm/index.js +13 -3
- package/es/ProEditLabel/components/RenderProForm.js +5 -1
- package/es/ProEditLabel/index.js +16 -5
- package/es/ProEditTable/components/ActionButton/index.js +5 -1
- package/es/ProEditTable/components/RcTable/BaseTable.js +13 -3
- package/es/ProEditTable/components/RcTable/DraggableTable.js +7 -2
- package/es/ProEditTable/components/RenderField/ListChangedWrapper.js +16 -7
- package/es/ProEditTable/components/RenderField/index.js +54 -29
- package/es/ProEditTable/components/RenderToolbar/index.js +10 -4
- package/es/ProEditTable/index.js +16 -10
- package/es/ProEditTable/propsType.d.ts +12 -6
- package/es/ProEditTable/style/index.less +22 -1
- package/es/ProEditTable/utils/config.js +8 -3
- package/es/ProEditTable/utils/index.js +14 -10
- package/es/ProEditTable/utils/tools.js +22 -10
- package/es/ProEditTable/utils/useEditTableError.js +6 -1
- package/es/ProEditTable/utils/useShouldUpdateForTable.js +16 -7
- package/es/ProEnum/components/Group.js +6 -1
- package/es/ProEnum/components/Tag.js +6 -1
- package/es/ProEnum/hooks/useEnum.d.ts +8 -0
- package/es/ProEnum/hooks/useEnum.js +76 -4
- package/es/ProEnum/hooks/useEnumRequest.js +8 -3
- package/es/ProEnum/hooks/useFrequentEnumRequest.js +8 -3
- package/es/ProEnum/index.js +25 -15
- package/es/ProEnum/utils/eventCenter.js +3 -1
- package/es/ProEnum/utils/frequentEnum.js +5 -1
- package/es/ProEnum/utils/index.js +2 -1
- package/es/ProForm/components/FormFooter/index.js +5 -1
- package/es/ProForm/components/base/Checkbox/index.js +7 -2
- package/es/ProForm/components/base/DatePicker/index.js +7 -2
- package/es/ProForm/components/base/DatePicker/useDateLimit.js +6 -1
- package/es/ProForm/components/base/Input/index.js +7 -2
- package/es/ProForm/components/base/InputNumber/index.js +13 -3
- package/es/ProForm/components/base/Radio/index.js +7 -2
- package/es/ProForm/components/base/RangePicker/index.d.ts +7 -1
- package/es/ProForm/components/base/RangePicker/index.js +50 -4
- package/es/ProForm/components/base/RangePicker/useDateRange.js +6 -1
- package/es/ProForm/components/base/Select/index.js +7 -2
- package/es/ProForm/components/base/Switch/index.js +7 -2
- package/es/ProForm/components/base/SwitchCheckbox/index.js +7 -2
- package/es/ProForm/components/base/TextArea/index.js +7 -2
- package/es/ProForm/components/base/TimePicker/index.js +7 -2
- package/es/ProForm/components/combination/Container/index.js +5 -1
- package/es/ProForm/components/combination/Container/style/index.less +5 -0
- package/es/ProForm/components/combination/FormList/components/ActionButton.js +10 -4
- package/es/ProForm/components/combination/FormList/components/Empty.js +3 -2
- package/es/ProForm/components/combination/FormList/components/LineFields.js +5 -1
- package/es/ProForm/components/combination/FormList/components/ToolbarButton.js +10 -4
- package/es/ProForm/components/combination/FormList/index.js +41 -4
- package/es/ProForm/components/combination/FormList/style/index.less +1 -1
- package/es/ProForm/components/combination/FormList/utils.d.ts +6 -0
- package/es/ProForm/components/combination/FormList/utils.js +17 -0
- package/es/ProForm/components/combination/Group/component/ComRender.d.ts +3 -0
- package/es/ProForm/components/combination/Group/component/ComRender.js +70 -3
- package/es/ProForm/components/combination/Group/component/FlexibleGroup.d.ts +10 -0
- package/es/ProForm/components/combination/Group/component/FlexibleGroup.js +351 -0
- package/es/ProForm/components/combination/Group/hooks/index.d.ts +16 -1
- package/es/ProForm/components/combination/Group/hooks/index.js +107 -4
- package/es/ProForm/components/combination/Group/index.d.ts +3 -4
- package/es/ProForm/components/combination/Group/index.js +108 -24
- package/es/ProForm/components/combination/Group/propsType.d.ts +44 -1
- package/es/ProForm/components/combination/Group/style/index.less +425 -3
- package/es/ProForm/components/combination/Group/utils/index.d.ts +154 -0
- package/es/ProForm/components/combination/Group/utils/index.js +428 -0
- package/es/ProForm/components/combination/ProCascader/index.js +13 -3
- package/es/ProForm/components/combination/ProCascader/utils/index.js +7 -2
- package/es/ProForm/components/combination/ProModalSelect/hooks/useRequestList.js +14 -4
- package/es/ProForm/components/combination/ProModalSelect/index.js +16 -5
- package/es/ProForm/components/combination/ProNumberRange/index.js +24 -12
- package/es/ProForm/components/combination/ProNumberRange/propsType.d.ts +4 -0
- package/es/ProForm/components/combination/ProNumberRange/style/index.less +14 -7
- package/es/ProForm/components/combination/ProRangeLimit/index.js +13 -3
- package/es/ProForm/components/combination/ProTimeLimit/hooks/useControlled.js +6 -1
- package/es/ProForm/components/combination/ProTimeLimit/index.js +13 -3
- package/es/ProForm/components/render/ChangedWrapper.js +7 -2
- package/es/ProForm/components/render/ConfirmWrapper.js +10 -4
- package/es/ProForm/components/render/CustomComponentViewWrapper.d.ts +30 -0
- package/es/ProForm/components/render/CustomComponentViewWrapper.js +120 -0
- package/es/ProForm/components/render/Render.js +71 -16
- package/es/ProForm/components/render/RenderFields.js +7 -2
- package/es/ProForm/index.js +17 -4
- package/es/ProForm/propsType.d.ts +7 -0
- package/es/ProForm/style/index.less +11 -2
- package/es/ProForm/utils/index.js +7 -2
- package/es/ProForm/utils/rulesCreator.js +5 -1
- package/es/ProForm/utils/transformValue.js +5 -1
- package/es/ProForm/utils/useForm.js +15 -5
- package/es/ProForm/utils/useShouldUpdate.js +93 -35
- package/es/ProForm/utils/useWatch.js +6 -1
- package/es/ProForm/utils/valueType.js +11 -2
- package/es/ProIcon/index.js +13 -3
- package/es/ProIcon/utils/index.js +5 -1
- package/es/ProLayout/components/Layout/Menu/FoldMenu/index.js +28 -35
- package/es/ProLayout/components/Layout/Menu/FoldMenu/style/index.less +6 -2
- package/es/ProLayout/components/Layout/Menu/OpenMenu/index.js +54 -35
- package/es/ProLayout/components/Layout/Menu/OpenMenu/style/index.less +3 -12
- package/es/ProLayout/components/Layout/Notice/style/index.less +4 -0
- package/es/ProLayout/components/ProCollapse/index.js +5 -1
- package/es/ProLayout/components/ProCollapse/style/index.less +9 -9
- package/es/ProLayout/components/ProFooter/index.js +6 -2
- package/es/ProLayout/components/ProHeader/index.js +14 -4
- package/es/ProLayout/components/TabsManager/components/TabContextMenu.d.ts +7 -0
- package/es/ProLayout/components/TabsManager/components/TabContextMenu.js +100 -0
- package/es/ProLayout/components/TabsManager/components/TabItem.d.ts +26 -0
- package/es/ProLayout/components/TabsManager/components/TabItem.js +61 -0
- package/es/ProLayout/components/TabsManager/components/TabsContext.d.ts +6 -0
- package/es/ProLayout/components/TabsManager/components/TabsContext.js +5 -0
- package/es/ProLayout/components/TabsManager/hooks/useActiveTab.d.ts +6 -0
- package/es/ProLayout/components/TabsManager/hooks/useActiveTab.js +14 -0
- package/es/ProLayout/components/TabsManager/hooks/useProLayoutTabs.d.ts +18 -0
- package/es/ProLayout/components/TabsManager/hooks/useProLayoutTabs.js +26 -0
- package/es/ProLayout/components/TabsManager/hooks/useTabsCache.d.ts +31 -0
- package/es/ProLayout/components/TabsManager/hooks/useTabsCache.js +96 -0
- package/es/ProLayout/components/TabsManager/hooks/useTabsState.d.ts +5 -0
- package/es/ProLayout/components/TabsManager/hooks/useTabsState.js +364 -0
- package/es/ProLayout/components/TabsManager/index.d.ts +8 -0
- package/es/ProLayout/components/TabsManager/index.js +180 -0
- package/es/ProLayout/components/TabsManager/propTypes.d.ts +74 -0
- package/es/ProLayout/components/TabsManager/propTypes.js +16 -0
- package/es/ProLayout/components/TabsManager/style/index.less +179 -0
- package/es/ProLayout/components/TabsManager/utils/index.d.ts +38 -0
- package/es/ProLayout/components/TabsManager/utils/index.js +106 -0
- package/es/ProLayout/index.d.ts +10 -4
- package/es/ProLayout/index.js +100 -16
- package/es/ProLayout/propTypes.d.ts +139 -1
- package/es/ProLayout/propTypes.js +37 -1
- package/es/ProLayout/utils/index.js +16 -7
- package/es/ProSelect/components/AdaptiveTooltip.js +6 -1
- package/es/ProSelect/index.js +13 -3
- package/es/ProSelect/utils/index.js +3 -1
- package/es/ProStep/components/Item/index.js +8 -2
- package/es/ProStep/components/Listener/index.js +10 -4
- package/es/ProStep/components/Step/index.js +11 -2
- package/es/ProStep/index.js +16 -5
- package/es/ProStep/utils/index.js +5 -1
- package/es/ProStepTab/index.js +19 -8
- package/es/ProTable/components/FormatColumn/index.js +7 -2
- package/es/ProTable/components/RcTable/components/BaseTable/index.js +7 -2
- package/es/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/index.js +10 -4
- package/es/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/utils/index.js +5 -1
- package/es/ProTable/components/RcTable/components/DraggableTable/index.js +7 -2
- package/es/ProTable/components/RenderColumn/index.js +11 -2
- package/es/ProTable/components/RenderTabs/index.js +11 -2
- package/es/ProTable/components/TableResizable/index.js +13 -3
- package/es/ProTable/components/TooltipTitle/index.js +3 -5
- package/es/ProTable/hooks/useAntdTable.js +17 -6
- package/es/ProTable/index.js +16 -5
- package/es/ProTable/style/index.less +3 -0
- package/es/ProTable/utils/index.js +6 -1
- package/es/ProTabs/index.js +13 -3
- package/es/ProThemeTools/component/ProTools/index.js +11 -2
- package/es/ProThemeTools/context/ThemeContext.js +11 -2
- package/es/ProThemeTools/index.js +13 -3
- package/es/ProThemeTools/utils/index.js +5 -1
- package/es/ProTooltip/index.js +13 -3
- package/es/ProTree/components/CloseIcon.js +5 -1
- package/es/ProTree/components/List.js +7 -2
- package/es/ProTree/components/ProTree.js +16 -5
- package/es/ProTree/components/ProTreeSelect/index.js +122 -76
- package/es/ProTree/components/Tree.js +16 -5
- package/es/ProTree/index.js +5 -1
- package/es/ProTree/utils.js +8 -2
- package/es/ProTreeModal/components/Cascader.js +11 -2
- package/es/ProTreeModal/components/CloseIcon.js +5 -1
- package/es/ProTreeModal/components/List.js +6 -1
- package/es/ProTreeModal/components/SortableItem.js +5 -1
- package/es/ProTreeModal/components/Tree.js +13 -3
- package/es/ProTreeModal/components/Trigger.js +11 -2
- package/es/ProTreeModal/index.js +11 -2
- package/es/ProTreeModal/style/index.less +6 -0
- package/es/ProTreeModal/utils.js +8 -2
- package/es/ProUpload/components/ButtonRender.js +8 -3
- package/es/ProUpload/components/DragRender.d.ts +1 -0
- package/es/ProUpload/components/DragRender.js +10 -2
- package/es/ProUpload/components/DraggableUploadListItem.js +5 -1
- package/es/ProUpload/components/Example.js +11 -2
- package/es/ProUpload/components/ImageRender.js +14 -4
- package/es/ProUpload/index.js +17 -5
- package/es/ProUpload/propsType.d.ts +5 -0
- package/es/ProViewer/index.js +14 -4
- package/es/ProWaterMark/index.js +5 -1
- package/es/index.d.ts +1 -2
- package/es/index.js +1 -0
- package/es/locale/en_US.d.ts +9 -0
- package/es/locale/en_US.js +9 -0
- package/es/locale/zh_CN.d.ts +9 -0
- package/es/locale/zh_CN.js +9 -0
- package/es/style/theme/antd.less +11 -35
- package/es/utils/index.js +6 -1
- package/jest.config.js +3 -1
- package/lib/FormsProvider/index.js +2 -1
- package/lib/ProAction/index.js +20 -10
- package/lib/ProConfigProvider/index.js +29 -19
- package/lib/ProDownload/index.js +29 -17
- package/lib/ProDownload/utils.js +14 -12
- package/lib/ProDrawerForm/components/ProDrawer/index.js +27 -16
- package/lib/ProDrawerForm/components/ProModal/index.js +21 -10
- package/lib/ProDrawerForm/components/index.js +2 -2
- package/lib/ProDrawerForm/index.js +20 -9
- package/lib/ProEditLabel/components/RenderProForm.js +9 -6
- package/lib/ProEditLabel/index.js +30 -18
- package/lib/ProEditTable/components/ActionButton/index.js +14 -11
- package/lib/ProEditTable/components/RcTable/BaseTable.js +19 -9
- package/lib/ProEditTable/components/RcTable/DraggableTable.js +19 -13
- package/lib/ProEditTable/components/RcTable/index.js +2 -2
- package/lib/ProEditTable/components/RenderField/ListChangedWrapper.js +21 -11
- package/lib/ProEditTable/components/RenderField/index.js +76 -50
- package/lib/ProEditTable/components/RenderToolbar/index.js +18 -12
- package/lib/ProEditTable/components/index.js +2 -2
- package/lib/ProEditTable/index.js +33 -26
- package/lib/ProEditTable/propsType.d.ts +12 -6
- package/lib/ProEditTable/style/index.less +22 -1
- package/lib/ProEditTable/utils/config.js +20 -15
- package/lib/ProEditTable/utils/index.js +23 -19
- package/lib/ProEditTable/utils/tools.js +30 -21
- package/lib/ProEditTable/utils/useEditTableError.js +7 -3
- package/lib/ProEditTable/utils/useShouldUpdateForTable.js +17 -9
- package/lib/ProEnum/components/Group.js +8 -3
- package/lib/ProEnum/components/Tag.js +8 -3
- package/lib/ProEnum/hooks/useEnum.d.ts +8 -0
- package/lib/ProEnum/hooks/useEnum.js +76 -4
- package/lib/ProEnum/hooks/useEnumRequest.js +23 -18
- package/lib/ProEnum/hooks/useFrequentEnumRequest.js +12 -8
- package/lib/ProEnum/index.js +37 -26
- package/lib/ProEnum/utils/eventCenter.js +4 -3
- package/lib/ProEnum/utils/frequentEnum.js +6 -3
- package/lib/ProEnum/utils/index.js +3 -3
- package/lib/ProForm/components/Container.js +1 -1
- package/lib/ProForm/components/FormFooter/index.js +11 -6
- package/lib/ProForm/components/base/Checkbox/index.js +13 -7
- package/lib/ProForm/components/base/DatePicker/index.js +11 -6
- package/lib/ProForm/components/base/DatePicker/useDateLimit.js +7 -3
- package/lib/ProForm/components/base/Input/index.js +11 -6
- package/lib/ProForm/components/base/InputNumber/index.js +21 -10
- package/lib/ProForm/components/base/Radio/index.js +10 -5
- package/lib/ProForm/components/base/RangePicker/index.d.ts +7 -1
- package/lib/ProForm/components/base/RangePicker/index.js +55 -9
- package/lib/ProForm/components/base/RangePicker/useDateRange.js +7 -3
- package/lib/ProForm/components/base/Select/index.js +10 -5
- package/lib/ProForm/components/base/Switch/index.js +10 -5
- package/lib/ProForm/components/base/SwitchCheckbox/index.js +12 -6
- package/lib/ProForm/components/base/TextArea/index.js +10 -5
- package/lib/ProForm/components/base/TimePicker/index.js +10 -5
- package/lib/ProForm/components/combination/Container/index.js +11 -6
- package/lib/ProForm/components/combination/Container/style/index.less +5 -0
- package/lib/ProForm/components/combination/FormList/components/ActionButton.js +26 -19
- package/lib/ProForm/components/combination/FormList/components/BlockFields.js +3 -2
- package/lib/ProForm/components/combination/FormList/components/BlockTitle.js +1 -1
- package/lib/ProForm/components/combination/FormList/components/Empty.js +6 -5
- package/lib/ProForm/components/combination/FormList/components/LineFields.js +7 -3
- package/lib/ProForm/components/combination/FormList/components/ToolbarButton.js +20 -14
- package/lib/ProForm/components/combination/FormList/index.js +48 -10
- package/lib/ProForm/components/combination/FormList/style/index.less +1 -1
- package/lib/ProForm/components/combination/FormList/utils.d.ts +6 -0
- package/lib/ProForm/components/combination/FormList/utils.js +20 -2
- package/lib/ProForm/components/combination/Group/component/AddonWrapper/index.js +1 -1
- package/lib/ProForm/components/combination/Group/component/ComRender.d.ts +3 -0
- package/lib/ProForm/components/combination/Group/component/ComRender.js +79 -11
- package/lib/ProForm/components/combination/Group/component/FlexibleGroup.d.ts +10 -0
- package/lib/ProForm/components/combination/Group/component/FlexibleGroup.js +360 -0
- package/lib/ProForm/components/combination/Group/hooks/index.d.ts +16 -1
- package/lib/ProForm/components/combination/Group/hooks/index.js +111 -9
- package/lib/ProForm/components/combination/Group/index.d.ts +3 -4
- package/lib/ProForm/components/combination/Group/index.js +111 -27
- package/lib/ProForm/components/combination/Group/propsType.d.ts +44 -1
- package/lib/ProForm/components/combination/Group/style/index.less +425 -3
- package/lib/ProForm/components/combination/Group/utils/index.d.ts +154 -0
- package/lib/ProForm/components/combination/Group/utils/index.js +444 -0
- package/lib/ProForm/components/combination/ProCascader/index.js +20 -10
- package/lib/ProForm/components/combination/ProCascader/utils/index.js +9 -5
- package/lib/ProForm/components/combination/ProModalSelect/hooks/useRequestList.js +25 -15
- package/lib/ProForm/components/combination/ProModalSelect/index.js +53 -41
- package/lib/ProForm/components/combination/ProNumberRange/index.js +28 -16
- package/lib/ProForm/components/combination/ProNumberRange/propsType.d.ts +4 -0
- package/lib/ProForm/components/combination/ProNumberRange/style/index.less +14 -7
- package/lib/ProForm/components/combination/ProRangeLimit/index.js +29 -18
- package/lib/ProForm/components/combination/ProTimeLimit/hooks/useControlled.js +8 -3
- package/lib/ProForm/components/combination/ProTimeLimit/index.js +26 -15
- package/lib/ProForm/components/index.js +2 -2
- package/lib/ProForm/components/render/ChangedWrapper.js +16 -10
- package/lib/ProForm/components/render/ConfirmWrapper.js +19 -13
- package/lib/ProForm/components/render/CustomComponentViewWrapper.d.ts +30 -0
- package/lib/ProForm/components/render/CustomComponentViewWrapper.js +127 -0
- package/lib/ProForm/components/render/Render.js +93 -37
- package/lib/ProForm/components/render/RenderFields.js +15 -9
- package/lib/ProForm/index.js +27 -13
- package/lib/ProForm/propsType.d.ts +7 -0
- package/lib/ProForm/style/index.less +11 -2
- package/lib/ProForm/utils/index.js +12 -8
- package/lib/ProForm/utils/rulesCreator.js +8 -4
- package/lib/ProForm/utils/transformValue.js +6 -3
- package/lib/ProForm/utils/useFieldProps.js +2 -1
- package/lib/ProForm/utils/useForm.js +21 -12
- package/lib/ProForm/utils/useRules.js +1 -1
- package/lib/ProForm/utils/useShouldUpdate.js +94 -37
- package/lib/ProForm/utils/useWatch.js +8 -3
- package/lib/ProForm/utils/valueType.js +15 -6
- package/lib/ProIcon/index.js +26 -16
- package/lib/ProIcon/utils/index.js +7 -4
- package/lib/ProLayout/components/Layout/Header/index.js +1 -1
- package/lib/ProLayout/components/Layout/Icon/Icon.js +2 -1
- package/lib/ProLayout/components/Layout/Icon/index.js +1 -1
- package/lib/ProLayout/components/Layout/Menu/FoldMenu/index.js +31 -38
- package/lib/ProLayout/components/Layout/Menu/FoldMenu/style/index.less +6 -2
- package/lib/ProLayout/components/Layout/Menu/OpenMenu/index.js +55 -36
- package/lib/ProLayout/components/Layout/Menu/OpenMenu/style/index.less +3 -12
- package/lib/ProLayout/components/Layout/Menu/SideMenu/index.js +1 -1
- package/lib/ProLayout/components/Layout/Menu/index.js +1 -1
- package/lib/ProLayout/components/Layout/Notice/index.js +1 -1
- package/lib/ProLayout/components/Layout/Notice/style/index.less +4 -0
- package/lib/ProLayout/components/Layout/index.js +2 -2
- package/lib/ProLayout/components/ProCollapse/index.js +10 -6
- package/lib/ProLayout/components/ProCollapse/style/index.less +9 -9
- package/lib/ProLayout/components/ProFooter/index.js +8 -4
- package/lib/ProLayout/components/ProHeader/components/Copy/index.js +1 -1
- package/lib/ProLayout/components/ProHeader/components/ProBackBtn/index.js +1 -1
- package/lib/ProLayout/components/ProHeader/components/index.js +2 -2
- package/lib/ProLayout/components/ProHeader/index.js +22 -12
- package/lib/ProLayout/components/TabsManager/components/TabContextMenu.d.ts +7 -0
- package/lib/ProLayout/components/TabsManager/components/TabContextMenu.js +106 -0
- package/lib/ProLayout/components/TabsManager/components/TabItem.d.ts +26 -0
- package/lib/ProLayout/components/TabsManager/components/TabItem.js +67 -0
- package/lib/ProLayout/components/TabsManager/components/TabsContext.d.ts +6 -0
- package/lib/ProLayout/components/TabsManager/components/TabsContext.js +11 -0
- package/lib/ProLayout/components/TabsManager/hooks/useActiveTab.d.ts +6 -0
- package/lib/ProLayout/components/TabsManager/hooks/useActiveTab.js +20 -0
- package/lib/ProLayout/components/TabsManager/hooks/useProLayoutTabs.d.ts +18 -0
- package/lib/ProLayout/components/TabsManager/hooks/useProLayoutTabs.js +31 -0
- package/lib/ProLayout/components/TabsManager/hooks/useTabsCache.d.ts +31 -0
- package/lib/ProLayout/components/TabsManager/hooks/useTabsCache.js +103 -0
- package/lib/ProLayout/components/TabsManager/hooks/useTabsState.d.ts +5 -0
- package/lib/ProLayout/components/TabsManager/hooks/useTabsState.js +370 -0
- package/lib/ProLayout/components/TabsManager/index.d.ts +8 -0
- package/lib/ProLayout/components/TabsManager/index.js +183 -0
- package/lib/ProLayout/components/TabsManager/propTypes.d.ts +74 -0
- package/lib/ProLayout/components/TabsManager/propTypes.js +22 -0
- package/lib/ProLayout/components/TabsManager/style/index.less +179 -0
- package/lib/ProLayout/components/TabsManager/utils/index.d.ts +38 -0
- package/lib/ProLayout/components/TabsManager/utils/index.js +119 -0
- package/lib/ProLayout/components/index.js +2 -2
- package/lib/ProLayout/index.d.ts +10 -4
- package/lib/ProLayout/index.js +115 -23
- package/lib/ProLayout/propTypes.d.ts +139 -1
- package/lib/ProLayout/propTypes.js +40 -1
- package/lib/ProLayout/utils/index.js +18 -13
- package/lib/ProSelect/components/AdaptiveTooltip.js +7 -3
- package/lib/ProSelect/index.js +23 -12
- package/lib/ProSelect/utils/index.js +8 -8
- package/lib/ProStep/components/Anchor/index.js +1 -1
- package/lib/ProStep/components/Item/index.js +15 -9
- package/lib/ProStep/components/Listener/index.js +15 -9
- package/lib/ProStep/components/Step/index.js +17 -7
- package/lib/ProStep/index.js +30 -19
- package/lib/ProStep/utils/index.js +6 -3
- package/lib/ProStepTab/index.js +33 -22
- package/lib/ProTable/components/FormatColumn/index.js +22 -16
- package/lib/ProTable/components/RcTable/components/BaseTable/index.js +9 -5
- package/lib/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/index.js +22 -16
- package/lib/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/utils/index.js +8 -5
- package/lib/ProTable/components/RcTable/components/DraggableTable/index.js +11 -6
- package/lib/ProTable/components/RcTable/index.js +2 -2
- package/lib/ProTable/components/RenderColumn/index.js +17 -8
- package/lib/ProTable/components/RenderTabs/index.js +16 -7
- package/lib/ProTable/components/TableResizable/index.js +19 -9
- package/lib/ProTable/components/TooltipTitle/index.js +3 -6
- package/lib/ProTable/components/index.js +2 -2
- package/lib/ProTable/hooks/useAntdTable.js +42 -31
- package/lib/ProTable/index.js +41 -29
- package/lib/ProTable/style/index.less +3 -0
- package/lib/ProTable/utils/index.js +7 -3
- package/lib/ProTabs/components/index.js +2 -2
- package/lib/ProTabs/index.js +23 -12
- package/lib/ProThemeTools/component/ProTools/index.js +21 -11
- package/lib/ProThemeTools/component/index.js +2 -2
- package/lib/ProThemeTools/context/ThemeContext.js +20 -16
- package/lib/ProThemeTools/index.js +22 -12
- package/lib/ProThemeTools/utils/index.js +6 -3
- package/lib/ProTooltip/index.js +30 -20
- package/lib/ProTree/components/CloseIcon.js +6 -3
- package/lib/ProTree/components/List.js +10 -5
- package/lib/ProTree/components/ProTree.js +23 -12
- package/lib/ProTree/components/ProTreeSelect/index.js +141 -94
- package/lib/ProTree/components/SearchTitle.js +1 -1
- package/lib/ProTree/components/Tree.js +28 -16
- package/lib/ProTree/components/index.js +2 -2
- package/lib/ProTree/index.js +9 -5
- package/lib/ProTree/utils.js +16 -11
- package/lib/ProTreeModal/components/Cascader.js +14 -5
- package/lib/ProTreeModal/components/CloseIcon.js +6 -3
- package/lib/ProTreeModal/components/List.js +11 -7
- package/lib/ProTreeModal/components/SortableItem.js +10 -6
- package/lib/ProTreeModal/components/Tree.js +24 -13
- package/lib/ProTreeModal/components/Trigger.js +19 -9
- package/lib/ProTreeModal/components/index.js +2 -2
- package/lib/ProTreeModal/index.js +16 -6
- package/lib/ProTreeModal/style/index.less +6 -0
- package/lib/ProTreeModal/utils.js +17 -14
- package/lib/ProUpload/components/ButtonRender.js +14 -9
- package/lib/ProUpload/components/DragRender.d.ts +1 -0
- package/lib/ProUpload/components/DragRender.js +13 -5
- package/lib/ProUpload/components/DraggableUploadListItem.js +7 -3
- package/lib/ProUpload/components/Example.js +16 -6
- package/lib/ProUpload/components/FileItem.js +1 -1
- package/lib/ProUpload/components/ImageRender.js +20 -10
- package/lib/ProUpload/index.js +31 -18
- package/lib/ProUpload/propsType.d.ts +5 -0
- package/lib/ProViewer/index.js +22 -14
- package/lib/ProWaterMark/index.js +7 -3
- package/lib/index.d.ts +1 -2
- package/lib/index.js +4 -3
- package/lib/locale/en_US.d.ts +9 -0
- package/lib/locale/en_US.js +9 -0
- package/lib/locale/index.js +1 -1
- package/lib/locale/zh_CN.d.ts +9 -0
- package/lib/locale/zh_CN.js +9 -0
- package/lib/style/theme/antd.less +11 -35
- package/lib/utils/index.js +9 -4
- package/package.json +13 -16
- package/es/ProForm/components/combination/Group/utils.d.ts +0 -54
- package/es/ProForm/components/combination/Group/utils.js +0 -196
- package/es/assets/tip.svg +0 -1
- package/lib/ProForm/components/combination/Group/utils.d.ts +0 -54
- package/lib/ProForm/components/combination/Group/utils.js +0 -210
- package/lib/assets/tip.svg +0 -1
package/lib/ProIcon/index.js
CHANGED
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
7
6
|
exports.default = void 0;
|
|
8
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
9
|
-
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
10
|
-
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
11
7
|
var _ahooks = require("ahooks");
|
|
12
8
|
var _antd = require("antd");
|
|
13
9
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
@@ -21,6 +17,20 @@ var _locale = _interopRequireDefault(require("../locale"));
|
|
|
21
17
|
require("./symbolIcon.js");
|
|
22
18
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
23
19
|
var _excluded = ["type", "onClick", "size", "color", "className", "style", "spin", "rotate", "theme", "disabled", "mode", "buttonProps", "children", "mapList", "src", "actionMap", "tooltip", "buttonIcon"];
|
|
20
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
22
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
23
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
24
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
25
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
26
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
27
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
28
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
29
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
30
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
31
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
32
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
|
33
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
24
34
|
var ProIcon = props => {
|
|
25
35
|
var _window, _window2;
|
|
26
36
|
var _useProConfig = (0, _ProConfigProvider.useProConfig)(),
|
|
@@ -28,7 +38,7 @@ var ProIcon = props => {
|
|
|
28
38
|
dispatch = _useProConfig.dispatch;
|
|
29
39
|
var config = state.ProIcon,
|
|
30
40
|
antdTheme = state.theme;
|
|
31
|
-
var _config = (
|
|
41
|
+
var _config = _objectSpread(_objectSpread({}, config), props !== null && props !== void 0 ? props : {});
|
|
32
42
|
var _config$type = _config.type,
|
|
33
43
|
type = _config$type === void 0 ? null : _config$type,
|
|
34
44
|
onClick = _config.onClick,
|
|
@@ -56,11 +66,11 @@ var ProIcon = props => {
|
|
|
56
66
|
tooltip = _config.tooltip,
|
|
57
67
|
_config$buttonIcon = _config.buttonIcon,
|
|
58
68
|
buttonIcon = _config$buttonIcon === void 0 ? true : _config$buttonIcon,
|
|
59
|
-
reset = (
|
|
69
|
+
reset = _objectWithoutProperties(_config, _excluded);
|
|
60
70
|
var _useSetState = (0, _ahooks.useSetState)({
|
|
61
71
|
IconInstance: /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {})
|
|
62
72
|
}),
|
|
63
|
-
_useSetState2 = (
|
|
73
|
+
_useSetState2 = _slicedToArray(_useSetState, 2),
|
|
64
74
|
IconInstance = _useSetState2[0].IconInstance,
|
|
65
75
|
setState = _useSetState2[1];
|
|
66
76
|
|
|
@@ -73,7 +83,7 @@ var ProIcon = props => {
|
|
|
73
83
|
|
|
74
84
|
// 本地存储初始化主题
|
|
75
85
|
var _useLocalStorageState = (0, _ahooks.useLocalStorageState)('themeConfig'),
|
|
76
|
-
_useLocalStorageState2 = (
|
|
86
|
+
_useLocalStorageState2 = _slicedToArray(_useLocalStorageState, 1),
|
|
77
87
|
themeConfig = _useLocalStorageState2[0];
|
|
78
88
|
|
|
79
89
|
// 文档内部就不用判断window.top !== window.self了
|
|
@@ -136,13 +146,13 @@ var ProIcon = props => {
|
|
|
136
146
|
var svgProps = {
|
|
137
147
|
className: proIconClassNames,
|
|
138
148
|
fill: 'currentColor',
|
|
139
|
-
style: (
|
|
149
|
+
style: _objectSpread(_objectSpread({
|
|
140
150
|
width: size,
|
|
141
151
|
height: size
|
|
142
152
|
}, rotateStyle), style)
|
|
143
153
|
};
|
|
144
|
-
var icon = !src ? /*#__PURE__*/(0, _jsxRuntime.jsx)("svg", (
|
|
145
|
-
style: (
|
|
154
|
+
var icon = !src ? /*#__PURE__*/(0, _jsxRuntime.jsx)("svg", _objectSpread(_objectSpread({}, svgProps), {}, {
|
|
155
|
+
style: _objectSpread({
|
|
146
156
|
color
|
|
147
157
|
}, svgProps === null || svgProps === void 0 ? void 0 : svgProps.style),
|
|
148
158
|
onClick: onClick,
|
|
@@ -150,7 +160,7 @@ var ProIcon = props => {
|
|
|
150
160
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("use", {
|
|
151
161
|
xlinkHref: `#icon-${_type}`
|
|
152
162
|
})
|
|
153
|
-
})) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactSvg.ReactSVG, (
|
|
163
|
+
})) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactSvg.ReactSVG, _objectSpread(_objectSpread({}, svgProps), {}, {
|
|
154
164
|
// @ts-ignore
|
|
155
165
|
onClick: onClick,
|
|
156
166
|
"aria-hidden": "true",
|
|
@@ -166,12 +176,12 @@ var ProIcon = props => {
|
|
|
166
176
|
}
|
|
167
177
|
}
|
|
168
178
|
}));
|
|
169
|
-
var RenderIcon = /*#__PURE__*/(0, _jsxRuntime.jsx)("span", (
|
|
179
|
+
var RenderIcon = /*#__PURE__*/(0, _jsxRuntime.jsx)("span", _objectSpread(_objectSpread({
|
|
170
180
|
className: "anticon"
|
|
171
181
|
}, reset), {}, {
|
|
172
182
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.Tooltip, {
|
|
173
183
|
title: iconText,
|
|
174
|
-
children: buttonIcon ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.Button, (
|
|
184
|
+
children: buttonIcon ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.Button, _objectSpread({
|
|
175
185
|
style: {
|
|
176
186
|
width: size,
|
|
177
187
|
height: size,
|
|
@@ -210,7 +220,7 @@ var ProIcon = props => {
|
|
|
210
220
|
(_Object$values = Object.values((_targetEntries$target = targetEntries === null || targetEntries === void 0 || (_targetEntries$target2 = targetEntries.target) === null || _targetEntries$target2 === void 0 ? void 0 : _targetEntries$target2.attributes) !== null && _targetEntries$target !== void 0 ? _targetEntries$target : {})) === null || _Object$values === void 0 || (_Object$values = _Object$values.find(item => item.nodeName === 'style')
|
|
211
221
|
// @ts-ignore
|
|
212
222
|
) === null || _Object$values === void 0 || (_Object$values = _Object$values.value) === null || _Object$values === void 0 ? void 0 : _Object$values.match(/--zaui-brand:(.*?);/),
|
|
213
|
-
_Object$values$find$v2 = (
|
|
223
|
+
_Object$values$find$v2 = _slicedToArray(_Object$values$find$v, 2),
|
|
214
224
|
label = _Object$values$find$v2[0],
|
|
215
225
|
value = _Object$values$find$v2[1];
|
|
216
226
|
if (label && value) {
|
|
@@ -277,7 +287,7 @@ var ProIcon = props => {
|
|
|
277
287
|
}, [_config, primaryColor, qiankunPrimaryColor, language, svgProps]);
|
|
278
288
|
return !isExtendButtonMode ? IconInstance : /*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.Tooltip, {
|
|
279
289
|
title: tooltip,
|
|
280
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.Button, (
|
|
290
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.Button, _objectSpread(_objectSpread(_objectSpread({
|
|
281
291
|
type: isIconMode ? 'text' : (buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.type) || 'link',
|
|
282
292
|
className: proIconClassNames,
|
|
283
293
|
disabled: disabled,
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
7
6
|
exports.recurseGetNodes = exports.onBeforeInjection = void 0;
|
|
8
|
-
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
9
7
|
var _config = require("../config");
|
|
8
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
9
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
10
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
11
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
|
12
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
10
13
|
var recurseGetNodes = (type, node, queue) => {
|
|
11
14
|
switch (type) {
|
|
12
15
|
// 渐变
|
|
@@ -38,9 +41,9 @@ var onBeforeInjection = _ref => {
|
|
|
38
41
|
if (actionMap && svg) {
|
|
39
42
|
var _actionMap$themeMap, _actionMap$themeFillM, _actionMap$gradation, _actionMap$fill;
|
|
40
43
|
// 项目内置的四种主题匹配渐变色
|
|
41
|
-
var mergeThemeMap = (
|
|
44
|
+
var mergeThemeMap = _objectSpread(_objectSpread({}, _config.themeMap), (_actionMap$themeMap = actionMap.themeMap) !== null && _actionMap$themeMap !== void 0 ? _actionMap$themeMap : {});
|
|
42
45
|
// 项目内置的四种双色匹配fill
|
|
43
|
-
var mergeFillThemeMap = (
|
|
46
|
+
var mergeFillThemeMap = _objectSpread(_objectSpread({}, _config.themeFillMap), (_actionMap$themeFillM = actionMap.themeFillMap) !== null && _actionMap$themeFillM !== void 0 ? _actionMap$themeFillM : {});
|
|
44
47
|
var _gradList = mergeThemeMap[primaryColor];
|
|
45
48
|
var _fillList = mergeFillThemeMap[primaryColor];
|
|
46
49
|
// 渐变操作序列
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
@@ -8,6 +7,7 @@ exports.default = void 0;
|
|
|
8
7
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
9
8
|
var _logoImg = _interopRequireDefault(require("../../../images/logoImg.png"));
|
|
10
9
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
11
|
var Header = props => {
|
|
12
12
|
var headerHeight = props.headerHeight,
|
|
13
13
|
pure = props.pure,
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
7
6
|
exports.default = void 0;
|
|
8
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
8
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
9
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
10
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
10
11
|
var customCache = new Set();
|
|
11
12
|
var Icon = props => {
|
|
12
13
|
// @ts-ignore
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
7
6
|
exports.default = void 0;
|
|
8
7
|
var _Icon = _interopRequireDefault(require("./Icon"));
|
|
8
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
9
9
|
var _default = exports.default = _Icon.default;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
7
6
|
exports.default = void 0;
|
|
8
|
-
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
9
7
|
var _react = require("react");
|
|
10
8
|
var _antd = require("antd");
|
|
11
9
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
@@ -15,6 +13,13 @@ var _SideMenu = _interopRequireDefault(require("../SideMenu"));
|
|
|
15
13
|
var _index2 = require("../../../../index");
|
|
16
14
|
var _utils = require("../../../../utils");
|
|
17
15
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
18
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
19
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
20
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
|
21
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
22
|
+
var Link = _reactRouterDom.Link;
|
|
18
23
|
var FoldMenu = props => {
|
|
19
24
|
var style = props.style,
|
|
20
25
|
dataSource = props.dataSource,
|
|
@@ -25,22 +30,24 @@ var FoldMenu = props => {
|
|
|
25
30
|
collapsed = dataSource.collapsed,
|
|
26
31
|
headerHeight = dataSource.headerHeight;
|
|
27
32
|
var pathNamePrefix = `/${window.location.pathname.split('/')[1]}`;
|
|
28
|
-
var history = (0, _reactRouterDom.useHistory)();
|
|
29
33
|
var noticeCls = (0, _classnames.default)({
|
|
30
34
|
'pro-layout-menu-tooltip': true,
|
|
31
35
|
'pro-layout-menu-tooltip-has-notice': notice,
|
|
32
36
|
'pro-layout-menu-tooltip-nav-open': collapsed
|
|
33
37
|
});
|
|
34
|
-
var
|
|
35
|
-
|
|
36
|
-
|
|
38
|
+
var _ref = (0, _react.useContext)(_index2.LayoutContext) || {
|
|
39
|
+
selectedPath: '',
|
|
40
|
+
onSelected: () => {}
|
|
41
|
+
},
|
|
42
|
+
selectedPath = _ref.selectedPath,
|
|
43
|
+
onSelected = _ref.onSelected;
|
|
37
44
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
38
45
|
className: "pro-layout-menu-fold",
|
|
39
|
-
style: (
|
|
46
|
+
style: _objectSpread({}, style),
|
|
40
47
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("ul", {
|
|
41
48
|
className: "pro-layout-menu-fold-list",
|
|
42
|
-
style: (
|
|
43
|
-
children: menus.map((item, index) => {
|
|
49
|
+
style: _objectSpread({}, style),
|
|
50
|
+
children: menus.filter(item => !item.hideInMenu).map((item, index) => {
|
|
44
51
|
var _url$split;
|
|
45
52
|
var id = item.id,
|
|
46
53
|
url = item.url,
|
|
@@ -48,20 +55,15 @@ var FoldMenu = props => {
|
|
|
48
55
|
icon = item.icon,
|
|
49
56
|
imgUrl = item.imgUrl,
|
|
50
57
|
imgActiveUrl = item.imgActiveUrl,
|
|
51
|
-
hideInMenu = item.hideInMenu,
|
|
52
58
|
children = item.children;
|
|
53
59
|
var toPath = item.redirectUrl || item.url;
|
|
54
|
-
|
|
55
|
-
// 隐藏菜单
|
|
56
|
-
if (hideInMenu) {
|
|
57
|
-
return null;
|
|
58
|
-
}
|
|
59
60
|
var selectedMenu = (0, _utils.getUrlParams)('activeMenu');
|
|
61
|
+
var pathToMatch = selectedPath || selectedMenu || window.location.pathname;
|
|
60
62
|
|
|
61
63
|
// 取第一级
|
|
62
64
|
var currentKeyIdPath = (0, _utils.getPathNameKey)({
|
|
63
65
|
menus,
|
|
64
|
-
pathName:
|
|
66
|
+
pathName: pathToMatch // 优先匹配上下文路径
|
|
65
67
|
}) || [];
|
|
66
68
|
var cls = (0, _classnames.default)({
|
|
67
69
|
active: currentKeyIdPath.includes(id)
|
|
@@ -86,11 +88,11 @@ var FoldMenu = props => {
|
|
|
86
88
|
children: name
|
|
87
89
|
})]
|
|
88
90
|
})
|
|
89
|
-
}
|
|
91
|
+
});
|
|
90
92
|
return hasChildrenMenu ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.Popover, {
|
|
91
93
|
mouseEnterDelay: 0,
|
|
92
94
|
content: /*#__PURE__*/(0, _jsxRuntime.jsx)(_SideMenu.default, {
|
|
93
|
-
dataSource: (
|
|
95
|
+
dataSource: _objectSpread(_objectSpread({}, dataSource), {}, {
|
|
94
96
|
menus: item
|
|
95
97
|
}),
|
|
96
98
|
onMenuClick: onMenuClick
|
|
@@ -100,7 +102,7 @@ var FoldMenu = props => {
|
|
|
100
102
|
root: noticeCls
|
|
101
103
|
},
|
|
102
104
|
styles: {
|
|
103
|
-
|
|
105
|
+
content: {
|
|
104
106
|
marginTop: headerHeight - 48,
|
|
105
107
|
height: `calc(100vh - ${headerHeight + (notice ? 32 : 0)}px)`
|
|
106
108
|
}
|
|
@@ -120,11 +122,6 @@ var FoldMenu = props => {
|
|
|
120
122
|
keyPath: menuKeyPath
|
|
121
123
|
});
|
|
122
124
|
}
|
|
123
|
-
|
|
124
|
-
// 导航到目标路径
|
|
125
|
-
if (toPath) {
|
|
126
|
-
history.push(toPath);
|
|
127
|
-
}
|
|
128
125
|
},
|
|
129
126
|
children: LiNode
|
|
130
127
|
})
|
|
@@ -145,18 +142,16 @@ var FoldMenu = props => {
|
|
|
145
142
|
keyPath: menuKeyPath
|
|
146
143
|
});
|
|
147
144
|
}
|
|
148
|
-
|
|
149
|
-
// 导航到目标路径
|
|
150
|
-
if (toPath) {
|
|
151
|
-
history.push(toPath);
|
|
152
|
-
}
|
|
153
145
|
onSelected({
|
|
154
146
|
selectedPath: toPath
|
|
155
147
|
});
|
|
156
148
|
},
|
|
157
|
-
children:
|
|
149
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(Link, {
|
|
150
|
+
to: toPath,
|
|
151
|
+
children: LiNode
|
|
152
|
+
})
|
|
158
153
|
})
|
|
159
|
-
},
|
|
154
|
+
}, `${id}-${name}`) : /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
160
155
|
onClick: () => {
|
|
161
156
|
// 查找完整的菜单项数据
|
|
162
157
|
var menuItem = (0, _utils.findMenuItemByKey)(menus, String(id));
|
|
@@ -170,14 +165,12 @@ var FoldMenu = props => {
|
|
|
170
165
|
keyPath: menuKeyPath
|
|
171
166
|
});
|
|
172
167
|
}
|
|
173
|
-
|
|
174
|
-
// 导航到目标路径
|
|
175
|
-
if (toPath) {
|
|
176
|
-
history.push(toPath);
|
|
177
|
-
}
|
|
178
168
|
},
|
|
179
|
-
children:
|
|
180
|
-
|
|
169
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(Link, {
|
|
170
|
+
to: toPath,
|
|
171
|
+
children: LiNode
|
|
172
|
+
})
|
|
173
|
+
}, `${id}-${name}`);
|
|
181
174
|
})
|
|
182
175
|
})
|
|
183
176
|
});
|
|
@@ -67,6 +67,10 @@
|
|
|
67
67
|
top: 48px !important;
|
|
68
68
|
transform: none !important;
|
|
69
69
|
transition: none !important;
|
|
70
|
+
.@{ant-prefix}-popover-container{
|
|
71
|
+
border-radius: 0;
|
|
72
|
+
padding: 0;
|
|
73
|
+
}
|
|
70
74
|
}
|
|
71
75
|
|
|
72
76
|
.pro-layout-menu-tooltip.pro-layout-menu-tooltip-has-notice {
|
|
@@ -90,7 +94,7 @@
|
|
|
90
94
|
}
|
|
91
95
|
}
|
|
92
96
|
|
|
93
|
-
.pro-layout-menu-tooltip .@{ant-prefix}-popover-
|
|
97
|
+
.pro-layout-menu-tooltip .@{ant-prefix}-popover-content {
|
|
94
98
|
padding: 0;
|
|
95
99
|
}
|
|
96
100
|
|
|
@@ -98,7 +102,7 @@
|
|
|
98
102
|
display: none;
|
|
99
103
|
}
|
|
100
104
|
|
|
101
|
-
.pro-layout-menu-tooltip .@{ant-prefix}-popover-content .@{ant-prefix}-popover-
|
|
105
|
+
.pro-layout-menu-tooltip .@{ant-prefix}-popover-content .@{ant-prefix}-popover-container {
|
|
102
106
|
padding: 0;
|
|
103
107
|
box-shadow: 2px 0px 5px 0px rgba(0, 55, 93, 0.1);
|
|
104
108
|
}
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
7
6
|
exports.default = void 0;
|
|
8
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
9
7
|
var _react = require("react");
|
|
10
8
|
var _antd = require("antd");
|
|
11
9
|
var _ahooks = require("ahooks");
|
|
@@ -15,8 +13,17 @@ var _reactRouterDom = require("react-router-dom");
|
|
|
15
13
|
var _lodash = require("lodash");
|
|
16
14
|
var _index = require("../../../../index");
|
|
17
15
|
var _utils = require("../../../../utils");
|
|
16
|
+
var _utils2 = require("../../../TabsManager/utils");
|
|
18
17
|
var _index2 = require("../../index");
|
|
19
18
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
19
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
20
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
21
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
22
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
23
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
24
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
25
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
26
|
+
var Link = _reactRouterDom.Link;
|
|
20
27
|
var OpenMenu = props => {
|
|
21
28
|
var _getIdsByPathName;
|
|
22
29
|
var className = props.className,
|
|
@@ -29,30 +36,32 @@ var OpenMenu = props => {
|
|
|
29
36
|
menus = _ref.menus,
|
|
30
37
|
sideMenu = _ref.sideMenu;
|
|
31
38
|
var linkRef = (0, _react.useRef)(null);
|
|
32
|
-
var history = (0, _reactRouterDom.useHistory)();
|
|
33
39
|
// 通过URL匹配对应的ID用于回显
|
|
34
40
|
var _useSetState = (0, _ahooks.useSetState)({
|
|
35
41
|
selectedKeys: [],
|
|
36
42
|
openKeys: [],
|
|
37
43
|
router: ''
|
|
38
44
|
}),
|
|
39
|
-
_useSetState2 = (
|
|
45
|
+
_useSetState2 = _slicedToArray(_useSetState, 2),
|
|
40
46
|
_useSetState2$ = _useSetState2[0],
|
|
41
47
|
selectedKeys = _useSetState2$.selectedKeys,
|
|
42
48
|
openKeys = _useSetState2$.openKeys,
|
|
43
49
|
router = _useSetState2$.router,
|
|
44
50
|
setState = _useSetState2[1];
|
|
45
51
|
var query = new URLSearchParams(window.location.search);
|
|
46
|
-
var
|
|
47
|
-
|
|
48
|
-
|
|
52
|
+
var layoutContext = (0, _react.useContext)(_index.LayoutContext);
|
|
53
|
+
var layoutSelectedPath = layoutContext === null || layoutContext === void 0 ? void 0 : layoutContext.selectedPath;
|
|
54
|
+
var layoutOnSelected = layoutContext === null || layoutContext === void 0 ? void 0 : layoutContext.onSelected;
|
|
55
|
+
var layoutTarget = layoutContext === null || layoutContext === void 0 ? void 0 : layoutContext.target;
|
|
49
56
|
var cls = (0, _classnames.default)({
|
|
50
57
|
'pro-layout-open-menu': true,
|
|
51
58
|
[`${className}`]: className
|
|
52
59
|
});
|
|
53
60
|
|
|
54
|
-
// 默认激活菜单优先取activeMenu
|
|
55
|
-
|
|
61
|
+
// 默认激活菜单优先取selectedPath或activeMenu,默认取pathName进行匹配
|
|
62
|
+
// 特殊处理:如果layoutSelectedPath是'##EMPTY##',表示有意清空选中状态
|
|
63
|
+
var preferredPath = query.get('activeMenu') || (layoutSelectedPath === '##EMPTY##' ? null : layoutSelectedPath) || window.location.pathname;
|
|
64
|
+
var selectKeyIdPath = preferredPath ? ((_getIdsByPathName = (0, _utils.getIdsByPathName)(menus, preferredPath)) === null || _getIdsByPathName === void 0 ? void 0 : _getIdsByPathName.map(item => String(item))) || [] : [];
|
|
56
65
|
var itemsTransform = (0, _react.useMemo)(() => {
|
|
57
66
|
var result = (0, _lodash.cloneDeep)(menus);
|
|
58
67
|
if (!Array.isArray(result) || !result.length) {
|
|
@@ -79,7 +88,7 @@ var OpenMenu = props => {
|
|
|
79
88
|
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
80
89
|
className: (0, _classnames.default)({
|
|
81
90
|
'pro-layout-icon': true,
|
|
82
|
-
'pro-layout-icon-empty': isFirstMenu
|
|
91
|
+
'pro-layout-icon-empty': isFirstMenu
|
|
83
92
|
})
|
|
84
93
|
})
|
|
85
94
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("h2", {
|
|
@@ -109,11 +118,14 @@ var OpenMenu = props => {
|
|
|
109
118
|
return result;
|
|
110
119
|
}, [dataSource]);
|
|
111
120
|
(0, _ahooks.useDeepCompareEffect)(() => {
|
|
112
|
-
if (Array.isArray(selectKeyIdPath)
|
|
113
|
-
|
|
114
|
-
selectedKeys: selectKeyIdPath
|
|
115
|
-
|
|
116
|
-
|
|
121
|
+
if (Array.isArray(selectKeyIdPath)) {
|
|
122
|
+
var newState = {
|
|
123
|
+
selectedKeys: selectKeyIdPath
|
|
124
|
+
};
|
|
125
|
+
if (selectKeyIdPath.length) {
|
|
126
|
+
newState.openKeys = selectKeyIdPath.slice(0, 2);
|
|
127
|
+
}
|
|
128
|
+
setState(newState);
|
|
117
129
|
}
|
|
118
130
|
}, [menus, selectKeyIdPath]);
|
|
119
131
|
|
|
@@ -126,10 +138,10 @@ var OpenMenu = props => {
|
|
|
126
138
|
});
|
|
127
139
|
}
|
|
128
140
|
}, [sideMenu]);
|
|
129
|
-
return /*#__PURE__*/(0, _jsxRuntime.
|
|
141
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
130
142
|
className: cls,
|
|
131
143
|
style: style,
|
|
132
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.Menu, {
|
|
144
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.Menu, {
|
|
133
145
|
mode: "inline"
|
|
134
146
|
// @ts-ignore
|
|
135
147
|
,
|
|
@@ -145,7 +157,6 @@ var OpenMenu = props => {
|
|
|
145
157
|
});
|
|
146
158
|
},
|
|
147
159
|
onClick: _ref2 => {
|
|
148
|
-
var _item$props, _item$props2;
|
|
149
160
|
var item = _ref2.item,
|
|
150
161
|
keyPath = _ref2.keyPath,
|
|
151
162
|
key = _ref2.key,
|
|
@@ -167,30 +178,38 @@ var OpenMenu = props => {
|
|
|
167
178
|
keyPath: menuKeyPath
|
|
168
179
|
});
|
|
169
180
|
}
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
181
|
+
|
|
182
|
+
// 只有最后一级菜单(叶子节点)才设置选中状态和路径
|
|
183
|
+
if (menuItem && (0, _utils2.isLeafMenuItem)(menuItem)) {
|
|
184
|
+
var _item$props, _item$props2;
|
|
185
|
+
setState({
|
|
186
|
+
selectedKeys: keyPath,
|
|
187
|
+
router: item === null || item === void 0 || (_item$props = item.props) === null || _item$props === void 0 ? void 0 : _item$props.router
|
|
188
|
+
});
|
|
189
|
+
layoutOnSelected === null || layoutOnSelected === void 0 || layoutOnSelected({
|
|
190
|
+
selectedPath: item === null || item === void 0 || (_item$props2 = item.props) === null || _item$props2 === void 0 ? void 0 : _item$props2.router
|
|
191
|
+
});
|
|
192
|
+
if (layoutTarget) {
|
|
193
|
+
var _item$props3;
|
|
194
|
+
window.open(item === null || item === void 0 || (_item$props3 = item.props) === null || _item$props3 === void 0 ? void 0 : _item$props3.router, layoutTarget);
|
|
195
|
+
} else {
|
|
196
|
+
setTimeout(() => {
|
|
197
|
+
// 路由变更,且不再demo文档中
|
|
198
|
+
if (!window.location.href.includes('~demos/prolayout')) {
|
|
199
|
+
linkRef.current.click();
|
|
200
|
+
}
|
|
201
|
+
}, 100);
|
|
202
|
+
}
|
|
187
203
|
}
|
|
188
204
|
},
|
|
189
205
|
style: {
|
|
190
206
|
height: dataSource.sideMenu ? 'auto' : `calc(100vh - ${(dataSource === null || dataSource === void 0 ? void 0 : dataSource.height) || 0}px)`,
|
|
191
207
|
color: 'red'
|
|
192
208
|
}
|
|
193
|
-
})
|
|
209
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(Link, {
|
|
210
|
+
to: router,
|
|
211
|
+
ref: linkRef
|
|
212
|
+
})]
|
|
194
213
|
});
|
|
195
214
|
};
|
|
196
215
|
var _default = exports.default = OpenMenu;
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
.pro-layout-open-menu {
|
|
2
2
|
color: #fff;
|
|
3
3
|
|
|
4
|
-
.@{ant-prefix}-menu-root > .@{ant-prefix}-menu-submenu > .@{ant-prefix}-menu > .@{ant-prefix}-menu-item-only-child {
|
|
5
|
-
padding-left: 16px !important;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
4
|
.@{ant-prefix}-menu-root {
|
|
9
5
|
overflow-y: auto !important;
|
|
10
6
|
|
|
@@ -16,17 +12,12 @@
|
|
|
16
12
|
& > .@{ant-prefix}-menu-submenu {
|
|
17
13
|
.@{ant-prefix}-menu-sub {
|
|
18
14
|
background: #1a202d;
|
|
19
|
-
.@{ant-prefix}-menu-submenu.@{ant-prefix}-menu-submenu-inline{
|
|
20
|
-
.@{ant-prefix}-menu-submenu-title{
|
|
21
|
-
padding-left: 16px !important;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
15
|
}
|
|
25
16
|
|
|
26
17
|
& > .@{ant-prefix}-menu-sub > .@{ant-prefix}-menu-submenu > .@{ant-prefix}-menu-submenu-title,
|
|
27
18
|
& > .@{ant-prefix}-menu-item-only-child,
|
|
28
19
|
& > .@{ant-prefix}-menu-sub > .@{ant-prefix}-menu-item-only-child {
|
|
29
|
-
padding-left: 16px;
|
|
20
|
+
padding-left: 16px !important;
|
|
30
21
|
}
|
|
31
22
|
}
|
|
32
23
|
|
|
@@ -48,7 +39,7 @@
|
|
|
48
39
|
}
|
|
49
40
|
|
|
50
41
|
.@{ant-prefix}-menu-item {
|
|
51
|
-
padding-left:
|
|
42
|
+
padding-left: 30px !important;
|
|
52
43
|
|
|
53
44
|
&::after {
|
|
54
45
|
display: none;
|
|
@@ -101,7 +92,7 @@
|
|
|
101
92
|
height: auto !important;
|
|
102
93
|
min-height: 48px;
|
|
103
94
|
margin: 0;
|
|
104
|
-
padding:
|
|
95
|
+
padding: 12px 0;
|
|
105
96
|
line-height: initial !important;
|
|
106
97
|
white-space: pre-wrap;
|
|
107
98
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
@@ -10,6 +9,7 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
10
9
|
var _ahooks = require("ahooks");
|
|
11
10
|
var _OpenMenu = _interopRequireDefault(require("../OpenMenu"));
|
|
12
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
13
|
var SideMenu = props => {
|
|
14
14
|
var dataSource = props.dataSource,
|
|
15
15
|
onMenuClick = props.onMenuClick;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
@@ -9,6 +8,7 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
9
8
|
var _OpenMenu = _interopRequireDefault(require("./OpenMenu"));
|
|
10
9
|
var _FoldMenu = _interopRequireDefault(require("./FoldMenu"));
|
|
11
10
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
12
|
// 折叠后菜单
|
|
13
13
|
|
|
14
14
|
var Menu = props => {
|