@zat-design/sisyphus-react 4.0.0-beta.9 → 4.0.0
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/babel.config.js.backup +13 -0
- 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 +7 -2
- package/es/ProEditTable/components/RenderField/index.js +54 -29
- package/es/ProEditTable/components/RenderToolbar/index.js +10 -4
- package/es/ProEditTable/index.js +16 -5
- 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 +13 -9
- 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 +13 -3
- 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 +27 -32
- 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 +21 -4
- package/es/ProLayout/index.js +107 -14
- 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 +119 -75
- 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 +16 -10
- 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 -21
- 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 +22 -18
- 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 +23 -12
- 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 +30 -35
- 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 +21 -4
- package/lib/ProLayout/index.js +122 -21
- 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 +138 -93
- 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/package.json.backup-antd5 +159 -0
- 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
|
@@ -1,14 +1,19 @@
|
|
|
1
|
-
|
|
1
|
+
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; }
|
|
2
|
+
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; }
|
|
3
|
+
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; }
|
|
4
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
|
5
|
+
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); }
|
|
2
6
|
import { useContext } from 'react';
|
|
3
7
|
import { Popover, Tooltip } from 'antd';
|
|
4
8
|
import classnames from 'classnames';
|
|
5
|
-
import {
|
|
9
|
+
import { Link as RouterLink } from 'react-router-dom';
|
|
6
10
|
import { Icon } from "../../index";
|
|
7
11
|
import SideMenu from "../SideMenu";
|
|
8
12
|
import { LayoutContext } from "../../../../index";
|
|
9
13
|
import { getUrlParams, getPathNameKey, findMenuItemByKey } from "../../../../utils";
|
|
10
14
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
15
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
16
|
+
var Link = RouterLink;
|
|
12
17
|
var FoldMenu = props => {
|
|
13
18
|
var style = props.style,
|
|
14
19
|
dataSource = props.dataSource,
|
|
@@ -19,15 +24,17 @@ var FoldMenu = props => {
|
|
|
19
24
|
collapsed = dataSource.collapsed,
|
|
20
25
|
headerHeight = dataSource.headerHeight;
|
|
21
26
|
var pathNamePrefix = `/${window.location.pathname.split('/')[1]}`;
|
|
22
|
-
var history = useHistory();
|
|
23
27
|
var noticeCls = classnames({
|
|
24
28
|
'pro-layout-menu-tooltip': true,
|
|
25
29
|
'pro-layout-menu-tooltip-has-notice': notice,
|
|
26
30
|
'pro-layout-menu-tooltip-nav-open': collapsed
|
|
27
31
|
});
|
|
28
|
-
var
|
|
29
|
-
|
|
30
|
-
|
|
32
|
+
var _ref = useContext(LayoutContext) || {
|
|
33
|
+
selectedPath: '',
|
|
34
|
+
onSelected: () => {}
|
|
35
|
+
},
|
|
36
|
+
selectedPath = _ref.selectedPath,
|
|
37
|
+
onSelected = _ref.onSelected;
|
|
31
38
|
return /*#__PURE__*/_jsx("div", {
|
|
32
39
|
className: "pro-layout-menu-fold",
|
|
33
40
|
style: _objectSpread({}, style),
|
|
@@ -51,11 +58,12 @@ var FoldMenu = props => {
|
|
|
51
58
|
return null;
|
|
52
59
|
}
|
|
53
60
|
var selectedMenu = getUrlParams('activeMenu');
|
|
61
|
+
var pathToMatch = selectedPath || selectedMenu || window.location.pathname;
|
|
54
62
|
|
|
55
63
|
// 取第一级
|
|
56
64
|
var currentKeyIdPath = getPathNameKey({
|
|
57
65
|
menus,
|
|
58
|
-
pathName:
|
|
66
|
+
pathName: pathToMatch // 优先匹配上下文路径
|
|
59
67
|
}) || [];
|
|
60
68
|
var cls = classnames({
|
|
61
69
|
active: currentKeyIdPath.includes(id)
|
|
@@ -90,14 +98,10 @@ var FoldMenu = props => {
|
|
|
90
98
|
onMenuClick: onMenuClick
|
|
91
99
|
}),
|
|
92
100
|
color: "#fff",
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
body: {
|
|
98
|
-
marginTop: headerHeight - 48,
|
|
99
|
-
height: `calc(100vh - ${headerHeight + (notice ? 32 : 0)}px)`
|
|
100
|
-
}
|
|
101
|
+
overlayClassName: noticeCls,
|
|
102
|
+
overlayInnerStyle: {
|
|
103
|
+
marginTop: headerHeight - 48,
|
|
104
|
+
height: `calc(100vh - ${headerHeight + (notice ? 32 : 0)}px)`
|
|
101
105
|
},
|
|
102
106
|
placement: "rightTop",
|
|
103
107
|
children: /*#__PURE__*/_jsx("span", {
|
|
@@ -114,11 +118,6 @@ var FoldMenu = props => {
|
|
|
114
118
|
keyPath: menuKeyPath
|
|
115
119
|
});
|
|
116
120
|
}
|
|
117
|
-
|
|
118
|
-
// 导航到目标路径
|
|
119
|
-
if (toPath) {
|
|
120
|
-
history.push(toPath);
|
|
121
|
-
}
|
|
122
121
|
},
|
|
123
122
|
children: LiNode
|
|
124
123
|
})
|
|
@@ -139,16 +138,14 @@ var FoldMenu = props => {
|
|
|
139
138
|
keyPath: menuKeyPath
|
|
140
139
|
});
|
|
141
140
|
}
|
|
142
|
-
|
|
143
|
-
// 导航到目标路径
|
|
144
|
-
if (toPath) {
|
|
145
|
-
history.push(toPath);
|
|
146
|
-
}
|
|
147
141
|
onSelected({
|
|
148
142
|
selectedPath: toPath
|
|
149
143
|
});
|
|
150
144
|
},
|
|
151
|
-
children:
|
|
145
|
+
children: /*#__PURE__*/_jsx(Link, {
|
|
146
|
+
to: toPath,
|
|
147
|
+
children: LiNode
|
|
148
|
+
}, toPath)
|
|
152
149
|
})
|
|
153
150
|
}, toPath) : /*#__PURE__*/_jsx("span", {
|
|
154
151
|
onClick: () => {
|
|
@@ -164,13 +161,11 @@ var FoldMenu = props => {
|
|
|
164
161
|
keyPath: menuKeyPath
|
|
165
162
|
});
|
|
166
163
|
}
|
|
167
|
-
|
|
168
|
-
// 导航到目标路径
|
|
169
|
-
if (toPath) {
|
|
170
|
-
history.push(toPath);
|
|
171
|
-
}
|
|
172
164
|
},
|
|
173
|
-
children:
|
|
165
|
+
children: /*#__PURE__*/_jsx(Link, {
|
|
166
|
+
to: toPath,
|
|
167
|
+
children: LiNode
|
|
168
|
+
}, toPath)
|
|
174
169
|
});
|
|
175
170
|
})
|
|
176
171
|
})
|
|
@@ -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,17 +1,24 @@
|
|
|
1
|
-
|
|
1
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
|
+
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."); }
|
|
3
|
+
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); }
|
|
4
|
+
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; }
|
|
5
|
+
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; } }
|
|
6
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
2
7
|
import { useMemo, useRef, useContext } from 'react';
|
|
3
8
|
import { Menu } from 'antd';
|
|
4
9
|
import { useDeepCompareEffect, useSetState } from 'ahooks';
|
|
5
10
|
import { CaretDownOutlined } from '@ant-design/icons';
|
|
6
11
|
import classnames from 'classnames';
|
|
7
|
-
import {
|
|
12
|
+
import { Link as RouterLink } from 'react-router-dom';
|
|
8
13
|
import { cloneDeep } from 'lodash';
|
|
9
14
|
import { LayoutContext } from "../../../../index";
|
|
10
15
|
import { getIdsByPathName, findMenuItemByKey } from "../../../../utils";
|
|
16
|
+
import { isLeafMenuItem } from "../../../TabsManager/utils";
|
|
11
17
|
import { Icon } from "../../index";
|
|
12
18
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
19
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
14
20
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
21
|
+
var Link = RouterLink;
|
|
15
22
|
var OpenMenu = props => {
|
|
16
23
|
var _getIdsByPathName;
|
|
17
24
|
var className = props.className,
|
|
@@ -24,7 +31,6 @@ var OpenMenu = props => {
|
|
|
24
31
|
menus = _ref.menus,
|
|
25
32
|
sideMenu = _ref.sideMenu;
|
|
26
33
|
var linkRef = useRef(null);
|
|
27
|
-
var history = useHistory();
|
|
28
34
|
// 通过URL匹配对应的ID用于回显
|
|
29
35
|
var _useSetState = useSetState({
|
|
30
36
|
selectedKeys: [],
|
|
@@ -38,16 +44,19 @@ var OpenMenu = props => {
|
|
|
38
44
|
router = _useSetState2$.router,
|
|
39
45
|
setState = _useSetState2[1];
|
|
40
46
|
var query = new URLSearchParams(window.location.search);
|
|
41
|
-
var
|
|
42
|
-
|
|
43
|
-
|
|
47
|
+
var layoutContext = useContext(LayoutContext);
|
|
48
|
+
var layoutSelectedPath = layoutContext === null || layoutContext === void 0 ? void 0 : layoutContext.selectedPath;
|
|
49
|
+
var layoutOnSelected = layoutContext === null || layoutContext === void 0 ? void 0 : layoutContext.onSelected;
|
|
50
|
+
var layoutTarget = layoutContext === null || layoutContext === void 0 ? void 0 : layoutContext.target;
|
|
44
51
|
var cls = classnames({
|
|
45
52
|
'pro-layout-open-menu': true,
|
|
46
53
|
[`${className}`]: className
|
|
47
54
|
});
|
|
48
55
|
|
|
49
|
-
// 默认激活菜单优先取activeMenu
|
|
50
|
-
|
|
56
|
+
// 默认激活菜单优先取selectedPath或activeMenu,默认取pathName进行匹配
|
|
57
|
+
// 特殊处理:如果layoutSelectedPath是'##EMPTY##',表示有意清空选中状态
|
|
58
|
+
var preferredPath = query.get('activeMenu') || (layoutSelectedPath === '##EMPTY##' ? null : layoutSelectedPath) || window.location.pathname;
|
|
59
|
+
var selectKeyIdPath = preferredPath ? ((_getIdsByPathName = getIdsByPathName(menus, preferredPath)) === null || _getIdsByPathName === void 0 ? void 0 : _getIdsByPathName.map(item => String(item))) || [] : [];
|
|
51
60
|
var itemsTransform = useMemo(() => {
|
|
52
61
|
var result = cloneDeep(menus);
|
|
53
62
|
if (!Array.isArray(result) || !result.length) {
|
|
@@ -74,7 +83,7 @@ var OpenMenu = props => {
|
|
|
74
83
|
}) : /*#__PURE__*/_jsx("span", {
|
|
75
84
|
className: classnames({
|
|
76
85
|
'pro-layout-icon': true,
|
|
77
|
-
'pro-layout-icon-empty': isFirstMenu
|
|
86
|
+
'pro-layout-icon-empty': isFirstMenu
|
|
78
87
|
})
|
|
79
88
|
})
|
|
80
89
|
}), /*#__PURE__*/_jsx("h2", {
|
|
@@ -104,11 +113,14 @@ var OpenMenu = props => {
|
|
|
104
113
|
return result;
|
|
105
114
|
}, [dataSource]);
|
|
106
115
|
useDeepCompareEffect(() => {
|
|
107
|
-
if (Array.isArray(selectKeyIdPath)
|
|
108
|
-
|
|
109
|
-
selectedKeys: selectKeyIdPath
|
|
110
|
-
|
|
111
|
-
|
|
116
|
+
if (Array.isArray(selectKeyIdPath)) {
|
|
117
|
+
var newState = {
|
|
118
|
+
selectedKeys: selectKeyIdPath
|
|
119
|
+
};
|
|
120
|
+
if (selectKeyIdPath.length) {
|
|
121
|
+
newState.openKeys = selectKeyIdPath.slice(0, 2);
|
|
122
|
+
}
|
|
123
|
+
setState(newState);
|
|
112
124
|
}
|
|
113
125
|
}, [menus, selectKeyIdPath]);
|
|
114
126
|
|
|
@@ -121,10 +133,10 @@ var OpenMenu = props => {
|
|
|
121
133
|
});
|
|
122
134
|
}
|
|
123
135
|
}, [sideMenu]);
|
|
124
|
-
return /*#__PURE__*/
|
|
136
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
125
137
|
className: cls,
|
|
126
138
|
style: style,
|
|
127
|
-
children: /*#__PURE__*/_jsx(Menu, {
|
|
139
|
+
children: [/*#__PURE__*/_jsx(Menu, {
|
|
128
140
|
mode: "inline"
|
|
129
141
|
// @ts-ignore
|
|
130
142
|
,
|
|
@@ -140,7 +152,6 @@ var OpenMenu = props => {
|
|
|
140
152
|
});
|
|
141
153
|
},
|
|
142
154
|
onClick: _ref2 => {
|
|
143
|
-
var _item$props, _item$props2;
|
|
144
155
|
var item = _ref2.item,
|
|
145
156
|
keyPath = _ref2.keyPath,
|
|
146
157
|
key = _ref2.key,
|
|
@@ -162,30 +173,38 @@ var OpenMenu = props => {
|
|
|
162
173
|
keyPath: menuKeyPath
|
|
163
174
|
});
|
|
164
175
|
}
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
176
|
+
|
|
177
|
+
// 只有最后一级菜单(叶子节点)才设置选中状态和路径
|
|
178
|
+
if (menuItem && isLeafMenuItem(menuItem)) {
|
|
179
|
+
var _item$props, _item$props2;
|
|
180
|
+
setState({
|
|
181
|
+
selectedKeys: keyPath,
|
|
182
|
+
router: item === null || item === void 0 || (_item$props = item.props) === null || _item$props === void 0 ? void 0 : _item$props.router
|
|
183
|
+
});
|
|
184
|
+
layoutOnSelected === null || layoutOnSelected === void 0 || layoutOnSelected({
|
|
185
|
+
selectedPath: item === null || item === void 0 || (_item$props2 = item.props) === null || _item$props2 === void 0 ? void 0 : _item$props2.router
|
|
186
|
+
});
|
|
187
|
+
if (layoutTarget) {
|
|
188
|
+
var _item$props3;
|
|
189
|
+
window.open(item === null || item === void 0 || (_item$props3 = item.props) === null || _item$props3 === void 0 ? void 0 : _item$props3.router, layoutTarget);
|
|
190
|
+
} else {
|
|
191
|
+
setTimeout(() => {
|
|
192
|
+
// 路由变更,且不再demo文档中
|
|
193
|
+
if (!window.location.href.includes('~demos/prolayout')) {
|
|
194
|
+
linkRef.current.click();
|
|
195
|
+
}
|
|
196
|
+
}, 100);
|
|
197
|
+
}
|
|
182
198
|
}
|
|
183
199
|
},
|
|
184
200
|
style: {
|
|
185
201
|
height: dataSource.sideMenu ? 'auto' : `calc(100vh - ${(dataSource === null || dataSource === void 0 ? void 0 : dataSource.height) || 0}px)`,
|
|
186
202
|
color: 'red'
|
|
187
203
|
}
|
|
188
|
-
})
|
|
204
|
+
}), /*#__PURE__*/_jsx(Link, {
|
|
205
|
+
to: router,
|
|
206
|
+
ref: linkRef
|
|
207
|
+
})]
|
|
189
208
|
});
|
|
190
209
|
};
|
|
191
210
|
export 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,4 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
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; }
|
|
2
|
+
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; }
|
|
3
|
+
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; }
|
|
4
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
|
5
|
+
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); }
|
|
2
6
|
import { useLayoutEffect } from 'react';
|
|
3
7
|
import { Collapse, Descriptions, Space } from 'antd';
|
|
4
8
|
import { CaretRightOutlined } from '@ant-design/icons';
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
border-radius: 8px !important;
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
.@{ant-prefix}-collapse-
|
|
38
|
+
.@{ant-prefix}-collapse-title {
|
|
39
39
|
color: var(--zaui-text, #343434);
|
|
40
40
|
font-weight: 500;
|
|
41
41
|
font-size: var(--zaui-font-size-lg, 16px);
|
|
@@ -48,12 +48,12 @@
|
|
|
48
48
|
&.@{ant-prefix}-collapse-borderless
|
|
49
49
|
.@{ant-prefix}-collapse-item
|
|
50
50
|
> .@{ant-prefix}-collapse-content
|
|
51
|
-
> .@{ant-prefix}-collapse-
|
|
51
|
+
> .@{ant-prefix}-collapse-body {
|
|
52
52
|
padding: 0;
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
.@{ant-prefix}-collapse-
|
|
56
|
-
padding: 0;
|
|
55
|
+
.@{ant-prefix}-collapse-body {
|
|
56
|
+
padding: 0 !important;
|
|
57
57
|
|
|
58
58
|
.pro-collapse-content {
|
|
59
59
|
padding: var(--zaui-space-size-md, 16px);
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
padding: 0 !important;
|
|
73
73
|
background: var(--zaui-base-bg, #ffffff);
|
|
74
74
|
|
|
75
|
-
.@{ant-prefix}-collapse-
|
|
75
|
+
.@{ant-prefix}-collapse-title {
|
|
76
76
|
position: relative;
|
|
77
77
|
padding-left: 15px;
|
|
78
78
|
font-size: var(--zaui-font-size, 14px);
|
|
@@ -219,7 +219,7 @@
|
|
|
219
219
|
&:hover{
|
|
220
220
|
background: #fff !important;
|
|
221
221
|
}
|
|
222
|
-
.@{ant-prefix}-collapse-
|
|
222
|
+
.@{ant-prefix}-collapse-title {
|
|
223
223
|
&:before{
|
|
224
224
|
display: block;
|
|
225
225
|
}
|
|
@@ -233,7 +233,7 @@
|
|
|
233
233
|
}
|
|
234
234
|
}
|
|
235
235
|
.@{ant-prefix}-collapse-content{
|
|
236
|
-
.@{ant-prefix}-collapse-
|
|
236
|
+
.@{ant-prefix}-collapse-body{
|
|
237
237
|
.pro-collapse-content{
|
|
238
238
|
padding: var(--zaui-space-size-sm, 8px) 0 !important;
|
|
239
239
|
}
|
|
@@ -274,7 +274,7 @@
|
|
|
274
274
|
margin: 0 !important;
|
|
275
275
|
border-bottom: none !important;
|
|
276
276
|
|
|
277
|
-
.@{ant-prefix}-collapse-
|
|
277
|
+
.@{ant-prefix}-collapse-title {
|
|
278
278
|
font-size: var(--zaui-font-size, 14px);
|
|
279
279
|
font-weight: 500;
|
|
280
280
|
color: var(--zaui-text, #343434);
|
|
@@ -293,7 +293,7 @@
|
|
|
293
293
|
}
|
|
294
294
|
|
|
295
295
|
.@{ant-prefix}-collapse-content {
|
|
296
|
-
.@{ant-prefix}-collapse-
|
|
296
|
+
.@{ant-prefix}-collapse-body {
|
|
297
297
|
.pro-collapse-content {
|
|
298
298
|
padding: var(--zaui-space-size-md, 16px) !important;
|
|
299
299
|
background: var(--zaui-base-bg, #ffffff);
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
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; }
|
|
2
|
+
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; }
|
|
3
|
+
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; }
|
|
4
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
|
5
|
+
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); }
|
|
2
6
|
import { useSize } from 'ahooks';
|
|
3
7
|
import { Space } from 'antd';
|
|
4
8
|
import classnames from 'classnames';
|
|
@@ -10,7 +14,7 @@ var ProFooter = props => {
|
|
|
10
14
|
className = props.className,
|
|
11
15
|
children = props.children,
|
|
12
16
|
_props$zIndex = props.zIndex,
|
|
13
|
-
zIndex = _props$zIndex === void 0 ?
|
|
17
|
+
zIndex = _props$zIndex === void 0 ? 99 : _props$zIndex,
|
|
14
18
|
_props$sideDom = props.sideDom,
|
|
15
19
|
sideDom = _props$sideDom === void 0 ? '.pro-layout-sider-nav' : _props$sideDom,
|
|
16
20
|
_props$contentDom = props.contentDom,
|
|
@@ -1,7 +1,17 @@
|
|
|
1
|
-
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
-
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
|
-
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
4
1
|
var _excluded = ["width"];
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
+
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; }
|
|
8
|
+
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; }
|
|
9
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
10
|
+
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."); }
|
|
11
|
+
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); }
|
|
12
|
+
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; }
|
|
13
|
+
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; } }
|
|
14
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
5
15
|
/* eslint-disable react/no-array-index-key */
|
|
6
16
|
import { Space, Divider, Breadcrumb, Tooltip, Modal } from 'antd';
|
|
7
17
|
import React, { memo, useEffect, useState, useRef } from 'react';
|
|
@@ -281,7 +291,7 @@ var ProHeader = props => {
|
|
|
281
291
|
var actionsRender = () => {
|
|
282
292
|
if (Array.isArray(actionRender) && actionRender.length) {
|
|
283
293
|
return /*#__PURE__*/_jsx(Space, {
|
|
284
|
-
|
|
294
|
+
separator: /*#__PURE__*/_jsx(Divider, {
|
|
285
295
|
type: "vertical"
|
|
286
296
|
}),
|
|
287
297
|
children: actionRender.map((item, index) => {
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { TabContextMenuProps } from '../propTypes';
|
|
2
|
+
/**
|
|
3
|
+
* 右键菜单组件 - 兼容Antd 4.x和5.x
|
|
4
|
+
*/
|
|
5
|
+
declare function TabContextMenu({ tabId, children, closable, onClose, onCloseOthers, onCloseRight, onCloseAll, menuItems: customMenuItems, tabMenuClick, tab, tabs, }: TabContextMenuProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export default TabContextMenu;
|
|
7
|
+
export { TabContextMenu };
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
|
+
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."); }
|
|
3
|
+
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); }
|
|
4
|
+
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; }
|
|
5
|
+
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; } }
|
|
6
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
|
+
import { useState, useCallback } from 'react';
|
|
8
|
+
import { Dropdown } from 'antd';
|
|
9
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
|
+
/**
|
|
11
|
+
* 右键菜单组件 - 兼容Antd 4.x和5.x
|
|
12
|
+
*/
|
|
13
|
+
function TabContextMenu(_ref) {
|
|
14
|
+
var tabId = _ref.tabId,
|
|
15
|
+
children = _ref.children,
|
|
16
|
+
_ref$closable = _ref.closable,
|
|
17
|
+
closable = _ref$closable === void 0 ? true : _ref$closable,
|
|
18
|
+
onClose = _ref.onClose,
|
|
19
|
+
onCloseOthers = _ref.onCloseOthers,
|
|
20
|
+
onCloseRight = _ref.onCloseRight,
|
|
21
|
+
onCloseAll = _ref.onCloseAll,
|
|
22
|
+
customMenuItems = _ref.menuItems,
|
|
23
|
+
tabMenuClick = _ref.tabMenuClick,
|
|
24
|
+
tab = _ref.tab,
|
|
25
|
+
_ref$tabs = _ref.tabs,
|
|
26
|
+
tabs = _ref$tabs === void 0 ? [] : _ref$tabs;
|
|
27
|
+
var _useState = useState(false),
|
|
28
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
29
|
+
visible = _useState2[0],
|
|
30
|
+
setVisible = _useState2[1];
|
|
31
|
+
var handleMenuClick = useCallback(key => {
|
|
32
|
+
setVisible(false);
|
|
33
|
+
|
|
34
|
+
// 优先调用自定义回调
|
|
35
|
+
if (tabMenuClick && tab) {
|
|
36
|
+
tabMenuClick({
|
|
37
|
+
key,
|
|
38
|
+
tab,
|
|
39
|
+
tabs
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// 处理默认菜单项
|
|
44
|
+
switch (key) {
|
|
45
|
+
case 'close':
|
|
46
|
+
if (!closable) {
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
onClose(tabId);
|
|
50
|
+
break;
|
|
51
|
+
case 'closeOthers':
|
|
52
|
+
onCloseOthers(tabId);
|
|
53
|
+
break;
|
|
54
|
+
case 'closeRight':
|
|
55
|
+
onCloseRight(tabId);
|
|
56
|
+
break;
|
|
57
|
+
case 'closeAll':
|
|
58
|
+
onCloseAll();
|
|
59
|
+
break;
|
|
60
|
+
}
|
|
61
|
+
}, [tabId, closable, onClose, onCloseOthers, onCloseRight, onCloseAll, tabMenuClick, tab, tabs]);
|
|
62
|
+
|
|
63
|
+
// 默认右键菜单配置 - 统一使用items方式(antd 4.20+都支持)
|
|
64
|
+
var defaultMenuItems = [{
|
|
65
|
+
key: 'close',
|
|
66
|
+
label: '关闭',
|
|
67
|
+
disabled: !closable
|
|
68
|
+
}, {
|
|
69
|
+
key: 'closeOthers',
|
|
70
|
+
label: '关闭其他'
|
|
71
|
+
}, {
|
|
72
|
+
key: 'closeRight',
|
|
73
|
+
label: '关闭右侧标签页'
|
|
74
|
+
}, {
|
|
75
|
+
key: 'closeAll',
|
|
76
|
+
label: '关闭全部'
|
|
77
|
+
}];
|
|
78
|
+
|
|
79
|
+
// 合并自定义菜单项和默认菜单项
|
|
80
|
+
// 如果提供了自定义菜单项,则追加到默认菜单项后面;否则使用默认菜单项
|
|
81
|
+
var menuItems = customMenuItems && customMenuItems.length > 0 ? [...defaultMenuItems, {
|
|
82
|
+
type: 'divider'
|
|
83
|
+
}, ...customMenuItems] : defaultMenuItems;
|
|
84
|
+
return /*#__PURE__*/_jsx(Dropdown, {
|
|
85
|
+
menu: {
|
|
86
|
+
items: menuItems,
|
|
87
|
+
onClick: _ref2 => {
|
|
88
|
+
var key = _ref2.key;
|
|
89
|
+
return handleMenuClick(key);
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
trigger: ['contextMenu'],
|
|
93
|
+
open: visible,
|
|
94
|
+
onOpenChange: setVisible,
|
|
95
|
+
placement: "bottomLeft",
|
|
96
|
+
children: children
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
export default TabContextMenu;
|
|
100
|
+
export { TabContextMenu };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TabItem } from '../../../propTypes';
|
|
3
|
+
interface TabItemComponentProps {
|
|
4
|
+
tab: TabItem;
|
|
5
|
+
active: boolean;
|
|
6
|
+
onClick: () => void;
|
|
7
|
+
onClose: () => void;
|
|
8
|
+
onCloseOthers: () => void;
|
|
9
|
+
onCloseRight: () => void;
|
|
10
|
+
onCloseAll: () => void;
|
|
11
|
+
/** 所有标签页列表 */
|
|
12
|
+
tabsList?: TabItem[];
|
|
13
|
+
/** 自定义菜单项 */
|
|
14
|
+
menuItems?: import('antd').MenuProps['items'];
|
|
15
|
+
/** 自定义菜单项点击回调 */
|
|
16
|
+
tabMenuClick?: (params: {
|
|
17
|
+
key: string;
|
|
18
|
+
tab: TabItem;
|
|
19
|
+
tabs: TabItem[];
|
|
20
|
+
}) => void;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* 单个标签页组件
|
|
24
|
+
*/
|
|
25
|
+
declare const TabItemComponent: React.FC<TabItemComponentProps>;
|
|
26
|
+
export { TabItemComponent };
|