@zat-design/sisyphus-react 3.14.0-beta.2 → 4.0.0-beta.10
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 +77 -207
- package/babel.config.js +2 -2
- package/dist/index.esm.css +1 -1
- package/dist/less.esm.css +1 -1
- package/es/FormsProvider/index.d.ts +4 -1
- package/es/ProAction/components/CheckModalContent/index.js +0 -9
- package/es/ProAction/index.js +3 -6
- package/es/ProAction/index.less +0 -2
- package/es/ProConfigProvider/index.d.ts +22 -5
- package/es/ProConfigProvider/index.js +58 -26
- package/es/ProDownload/index.js +2 -3
- package/es/ProDownload/style/index.less +0 -2
- package/es/ProDownload/utils.js +3 -4
- package/es/ProDrawerForm/components/ProDrawer/index.js +13 -17
- package/es/ProDrawerForm/components/ProModal/index.js +12 -20
- package/es/ProDrawerForm/index.d.ts +2 -1
- package/es/ProDrawerForm/index.js +35 -33
- package/es/ProDrawerForm/propsType.d.ts +7 -18
- package/es/ProDrawerForm/style/index.less +6 -14
- package/es/ProEditLabel/components/RenderProForm.js +2 -3
- package/es/ProEditLabel/index.js +10 -15
- package/es/ProEditLabel/propsType.d.ts +1 -6
- package/es/ProEditLabel/style/index.less +2 -3
- package/es/ProEditTable/components/ActionButton/index.js +5 -8
- package/es/ProEditTable/components/RcTable/BaseTable.js +70 -53
- package/es/ProEditTable/components/RcTable/DraggableTable.js +70 -49
- package/es/ProEditTable/components/RcTable/index.d.ts +0 -2
- package/es/ProEditTable/components/RcTable/index.js +1 -3
- package/es/ProEditTable/components/RenderField/ListChangedWrapper.js +9 -12
- package/es/ProEditTable/components/RenderField/index.d.ts +3 -2
- package/es/ProEditTable/components/RenderField/index.js +401 -241
- package/es/ProEditTable/components/RenderToolbar/index.js +5 -5
- package/es/ProEditTable/components/Summary/index.js +5 -8
- package/es/ProEditTable/components/Validator/index.js +3 -6
- package/es/ProEditTable/index.js +99 -103
- package/es/ProEditTable/propsType.d.ts +7 -7
- package/es/ProEditTable/style/index.less +12 -12
- package/es/ProEditTable/utils/config.js +6 -7
- package/es/ProEditTable/utils/index.js +21 -17
- package/es/ProEditTable/utils/useEditTableError.js +12 -4
- package/es/ProEditTable/utils/useShouldUpdateForTable.d.ts +15 -0
- package/es/ProEditTable/utils/useShouldUpdateForTable.js +132 -0
- package/es/ProEnum/hooks/useEnum.js +5 -0
- package/es/ProEnum/hooks/useEnumRequest.js +3 -3
- package/es/ProEnum/index.js +10 -17
- package/es/ProEnum/style/index.less +0 -2
- package/es/ProEnum/utils/index.d.ts +1 -0
- package/es/ProEnum/utils/index.js +3 -7
- package/es/ProForm/components/Container.d.ts +1 -0
- package/es/ProForm/components/Container.js +2 -3
- package/es/ProForm/components/FormFooter/index.js +18 -19
- package/es/ProForm/components/FormFooter/propsType.d.ts +2 -0
- package/es/ProForm/components/base/Checkbox/index.js +3 -4
- package/es/ProForm/components/base/DatePicker/index.d.ts +1 -3
- package/es/ProForm/components/base/DatePicker/index.js +7 -7
- package/es/ProForm/components/base/DatePicker/useDateLimit.d.ts +3 -0
- package/es/ProForm/components/base/DatePicker/useDateLimit.js +11 -0
- package/es/ProForm/components/base/Input/index.js +10 -8
- package/es/ProForm/components/base/InputNumber/index.js +3 -6
- package/es/ProForm/components/base/Radio/index.js +3 -4
- package/es/ProForm/components/base/RangePicker/index.js +7 -6
- package/es/ProForm/components/base/RangePicker/useDateRange.d.ts +5 -5
- package/es/ProForm/components/base/Select/index.js +2 -3
- package/es/ProForm/components/base/Switch/index.js +2 -3
- package/es/ProForm/components/base/SwitchCheckbox/index.js +2 -3
- package/es/ProForm/components/base/SwitchCheckbox/style/index.less +0 -2
- package/es/ProForm/components/base/TextArea/index.js +3 -4
- package/es/ProForm/components/base/TextArea/index.less +10 -2
- package/es/ProForm/components/base/TimePicker/index.d.ts +1 -2
- package/es/ProForm/components/base/TimePicker/index.js +6 -7
- package/es/ProForm/components/base/TimePicker/style/index.less +3 -3
- package/es/ProForm/components/combination/Container/style/index.less +0 -2
- package/es/ProForm/components/combination/FormList/components/ActionButton.js +15 -13
- package/es/ProForm/components/combination/FormList/components/BlockFields.js +5 -8
- package/es/ProForm/components/combination/FormList/components/Empty.js +2 -3
- package/es/ProForm/components/combination/FormList/components/LineFields.js +2 -3
- package/es/ProForm/components/combination/FormList/components/ToolbarButton.js +5 -8
- package/es/ProForm/components/combination/FormList/index.js +2 -3
- package/es/ProForm/components/combination/FormList/style/index.less +36 -2
- package/es/ProForm/components/combination/Group/component/AddonWrapper/index.d.ts +1 -0
- package/es/ProForm/components/combination/Group/component/ComRender.js +0 -1
- package/es/ProForm/components/combination/Group/index.js +3 -4
- package/es/ProForm/components/combination/Group/style/index.less +7 -87
- package/es/ProForm/components/combination/Group/utils.d.ts +1 -1
- package/es/ProForm/components/combination/Group/utils.js +4 -5
- package/es/ProForm/components/combination/ProCascader/index.js +13 -15
- package/es/ProForm/components/combination/ProCascader/propsType.d.ts +1 -1
- package/es/ProForm/components/combination/ProCascader/style/index.less +0 -2
- package/es/ProForm/components/combination/ProModalSelect/index.d.ts +1 -1
- package/es/ProForm/components/combination/ProModalSelect/index.js +24 -39
- package/es/ProForm/components/combination/ProModalSelect/style/index.less +11 -15
- package/es/ProForm/components/combination/ProNumberRange/index.d.ts +3 -2
- package/es/ProForm/components/combination/ProNumberRange/index.js +21 -21
- package/es/ProForm/components/combination/ProNumberRange/style/index.less +3 -54
- package/es/ProForm/components/combination/ProRangeLimit/index.d.ts +2 -23
- package/es/ProForm/components/combination/ProRangeLimit/index.js +42 -25
- package/es/ProForm/components/combination/ProRangeLimit/propsType.d.ts +23 -0
- package/es/ProForm/components/combination/ProTimeLimit/hooks/useControlled.d.ts +3 -2
- package/es/ProForm/components/combination/ProTimeLimit/hooks/useControlled.js +14 -2
- package/es/ProForm/components/combination/ProTimeLimit/index.d.ts +5 -6
- package/es/ProForm/components/combination/ProTimeLimit/index.js +23 -20
- package/es/ProForm/components/combination/ProTimeLimit/style/index.less +64 -6
- package/es/ProForm/components/index.d.ts +2 -9
- package/es/ProForm/components/index.js +1 -11
- package/es/ProForm/components/render/ChangedWrapper.js +8 -9
- package/es/ProForm/components/render/ConfirmWrapper.js +7 -7
- package/es/ProForm/components/render/Render.js +29 -30
- package/es/ProForm/components/render/RenderFields.d.ts +1 -0
- package/es/ProForm/components/render/RenderFields.js +6 -3
- package/es/ProForm/components/render/propsType.d.ts +3 -6
- package/es/ProForm/index.d.ts +2 -2
- package/es/ProForm/index.js +14 -42
- package/es/ProForm/propsType.d.ts +3 -0
- package/es/ProForm/style/index.less +4 -16
- package/es/ProForm/utils/index.d.ts +15 -1
- package/es/ProForm/utils/index.js +66 -15
- package/es/ProForm/utils/useDeepCompareMemo.js +4 -4
- package/es/ProForm/utils/useForm.js +27 -22
- package/es/ProForm/utils/useShouldUpdate.d.ts +1 -0
- package/es/ProForm/utils/useShouldUpdate.js +103 -17
- package/es/ProIcon/index.js +10 -13
- package/es/ProIcon/style/index.less +0 -2
- package/es/ProLayout/components/Layout/Header/index.js +1 -1
- package/es/ProLayout/components/Layout/Menu/FoldMenu/index.js +3 -6
- package/es/ProLayout/components/Layout/Menu/FoldMenu/style/index.less +40 -39
- package/es/ProLayout/components/Layout/Menu/OpenMenu/index.js +2 -3
- package/es/ProLayout/components/Layout/Menu/OpenMenu/style/index.less +0 -3
- package/es/ProLayout/components/Layout/Menu/SideMenu/style/index.less +7 -5
- package/es/ProLayout/components/Layout/Menu/index.js +1 -1
- package/es/ProLayout/components/Layout/Menu/style/index.less +0 -2
- package/es/ProLayout/components/Layout/Notice/style/index.less +0 -2
- package/es/ProLayout/components/ProCollapse/index.js +29 -44
- package/es/ProLayout/components/ProCollapse/style/index.less +5 -4
- package/es/ProLayout/components/ProFooter/index.js +2 -3
- package/es/ProLayout/components/ProFooter/style/index.less +0 -2
- package/es/ProLayout/components/ProHeader/components/Copy/index.js +2 -3
- package/es/ProLayout/components/ProHeader/components/ProBackBtn/index.js +2 -3
- package/es/ProLayout/components/ProHeader/components/ProBackBtn/style/index.less +7 -9
- package/es/ProLayout/components/ProHeader/index.js +43 -45
- package/es/ProLayout/components/ProHeader/style/index.less +0 -2
- package/es/ProLayout/components/TabsManager/components/TabContextMenu.js +2 -3
- package/es/ProLayout/components/TabsManager/hooks/useTabsState.js +0 -2
- package/es/ProLayout/index.js +80 -41
- package/es/ProLayout/style/index.less +2 -3
- package/es/ProSelect/components/AdaptiveTooltip.js +2 -3
- package/es/ProSelect/index.js +7 -15
- package/es/ProSelect/index.less +0 -2
- package/es/ProSelect/propsType.d.ts +1 -1
- package/es/ProStep/components/Anchor/index.js +2 -3
- package/es/ProStep/components/Item/index.js +1 -0
- package/es/ProStep/components/Step/index.js +1 -0
- package/es/ProStep/style/index.less +2 -4
- package/es/ProTable/components/FormatColumn/index.js +33 -31
- package/es/ProTable/components/RcTable/components/BaseTable/index.d.ts +0 -1
- package/es/ProTable/components/RcTable/components/BaseTable/index.js +2 -4
- package/es/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/index.js +17 -13
- package/es/ProTable/components/RcTable/components/DraggableTable/index.d.ts +0 -1
- package/es/ProTable/components/RcTable/components/DraggableTable/index.js +2 -4
- package/es/ProTable/components/RenderColumn/index.d.ts +1 -1
- package/es/ProTable/components/RenderColumn/index.js +15 -18
- package/es/ProTable/components/RenderSummary/index.js +4 -5
- package/es/ProTable/components/RenderTableHeader/index.js +3 -4
- package/es/ProTable/components/RenderTabs/index.js +3 -6
- package/es/ProTable/components/TableResizable/index.js +2 -1
- package/es/ProTable/components/TooltipTitle/index.js +2 -3
- package/es/ProTable/hooks/useAntdTable.js +4 -7
- package/es/ProTable/index.d.ts +0 -7
- package/es/ProTable/index.js +11 -14
- package/es/ProTable/propsType.d.ts +2 -3
- package/es/ProTable/style/index.less +4 -6
- package/es/ProTabs/components/Card/index.js +5 -10
- package/es/ProTabs/index.js +2 -3
- package/es/ProTabs/style/index.less +0 -2
- package/es/ProThemeTools/component/ProTools/index.js +18 -22
- package/es/ProThemeTools/context/ThemeContext.d.ts +31 -0
- package/es/ProThemeTools/context/ThemeContext.js +136 -0
- package/es/ProThemeTools/index.d.ts +4 -8
- package/es/ProThemeTools/index.js +80 -49
- package/es/ProThemeTools/style/index.less +1 -3
- package/es/ProThemeTools/utils/index.d.ts +16 -6
- package/es/ProThemeTools/utils/index.js +30 -24
- package/es/ProTooltip/index.js +14 -9
- package/es/ProTooltip/style/index.less +0 -2
- package/es/ProTree/components/AdaptiveTooltip.js +2 -3
- package/es/ProTree/components/List.js +3 -4
- package/es/ProTree/components/ProTree.js +5 -12
- package/es/ProTree/components/ProTreeSelect/index.js +28 -26
- package/es/ProTree/components/ProTreeSelect/style/index.less +0 -2
- package/es/ProTree/components/Tree.js +6 -13
- package/es/ProTree/index.js +0 -7
- package/es/ProTree/propsType.d.ts +1 -1
- package/es/ProTree/style/index.less +8 -6
- package/es/ProTreeModal/components/Cascader.js +3 -4
- package/es/ProTreeModal/components/List.js +11 -17
- package/es/ProTreeModal/components/SortableItem.js +2 -3
- package/es/ProTreeModal/components/Tree.js +3 -4
- package/es/ProTreeModal/components/Trigger.js +6 -11
- package/es/ProTreeModal/index.d.ts +0 -1
- package/es/ProTreeModal/index.js +10 -20
- package/es/ProTreeModal/style/index.less +12 -3
- package/es/ProUpload/components/ButtonRender.js +4 -7
- package/es/ProUpload/components/DragRender.js +2 -3
- package/es/ProUpload/components/FileItem.d.ts +0 -1
- package/es/ProUpload/components/FileItem.js +15 -21
- package/es/ProUpload/components/ImageRender.js +8 -17
- package/es/ProUpload/index.js +3 -4
- package/es/ProUpload/style/index.less +171 -12
- package/es/ProViewer/index.js +28 -35
- package/es/ProViewer/propsType.js +3 -0
- package/es/ProViewer/style/index.less +0 -2
- package/es/ProWaterMark/index.js +2 -3
- package/es/ProWaterMark/propsType.d.ts +5 -24
- package/es/global.less +2 -1
- package/es/index.d.ts +3 -3
- package/es/index.js +5 -5
- package/es/locale/en_US.js +1 -1
- package/es/locale/index.d.ts +2 -0
- package/es/locale/index.js +13 -2
- package/es/locale/zh_CN.js +1 -1
- package/es/style/components.less +0 -3
- package/es/style/index.less +1 -1
- package/es/style/theme/antd.less +36 -48
- package/es/style/theme/base.less +90 -0
- package/es/style/theme/index.less +2 -89
- package/es/utils/index.d.ts +7 -0
- package/es/utils/index.js +37 -1
- package/lib/FormsProvider/index.d.ts +4 -1
- package/lib/ProAction/components/CheckModalContent/index.js +0 -9
- package/lib/ProAction/index.js +3 -6
- package/lib/ProAction/index.less +0 -2
- package/lib/ProConfigProvider/index.d.ts +22 -5
- package/lib/ProConfigProvider/index.js +58 -26
- package/lib/ProDownload/index.js +2 -3
- package/lib/ProDownload/style/index.less +0 -2
- package/lib/ProDownload/utils.js +3 -4
- package/lib/ProDrawerForm/components/ProDrawer/index.js +13 -17
- package/lib/ProDrawerForm/components/ProModal/index.js +12 -20
- package/lib/ProDrawerForm/index.d.ts +2 -1
- package/lib/ProDrawerForm/index.js +35 -33
- package/lib/ProDrawerForm/propsType.d.ts +7 -18
- package/lib/ProDrawerForm/style/index.less +6 -14
- package/lib/ProEditLabel/components/RenderProForm.js +2 -3
- package/lib/ProEditLabel/index.js +10 -15
- package/lib/ProEditLabel/propsType.d.ts +1 -6
- package/lib/ProEditLabel/style/index.less +2 -3
- package/lib/ProEditTable/components/ActionButton/index.js +5 -8
- package/lib/ProEditTable/components/RcTable/BaseTable.js +69 -52
- package/lib/ProEditTable/components/RcTable/DraggableTable.js +69 -48
- package/lib/ProEditTable/components/RcTable/index.d.ts +0 -2
- package/lib/ProEditTable/components/RcTable/index.js +1 -8
- package/lib/ProEditTable/components/RenderField/ListChangedWrapper.js +9 -12
- package/lib/ProEditTable/components/RenderField/index.d.ts +3 -2
- package/lib/ProEditTable/components/RenderField/index.js +401 -241
- package/lib/ProEditTable/components/RenderToolbar/index.js +5 -5
- package/lib/ProEditTable/components/Summary/index.js +5 -9
- package/lib/ProEditTable/components/Validator/index.js +3 -7
- package/lib/ProEditTable/index.js +96 -100
- package/lib/ProEditTable/propsType.d.ts +7 -7
- package/lib/ProEditTable/style/index.less +12 -12
- package/lib/ProEditTable/utils/config.js +6 -7
- package/lib/ProEditTable/utils/index.js +20 -16
- package/lib/ProEditTable/utils/useEditTableError.js +12 -4
- package/lib/ProEditTable/utils/useShouldUpdateForTable.d.ts +15 -0
- package/lib/ProEditTable/utils/useShouldUpdateForTable.js +139 -0
- package/lib/ProEnum/hooks/useEnum.js +5 -0
- package/lib/ProEnum/hooks/useEnumRequest.js +2 -2
- package/lib/ProEnum/index.js +10 -17
- package/lib/ProEnum/style/index.less +0 -2
- package/lib/ProEnum/utils/index.d.ts +1 -0
- package/lib/ProEnum/utils/index.js +4 -7
- package/lib/ProForm/components/Container.d.ts +1 -0
- package/lib/ProForm/components/Container.js +2 -3
- package/lib/ProForm/components/FormFooter/index.js +18 -19
- package/lib/ProForm/components/FormFooter/propsType.d.ts +2 -0
- package/lib/ProForm/components/base/Checkbox/index.js +3 -4
- package/lib/ProForm/components/base/DatePicker/index.d.ts +1 -3
- package/lib/ProForm/components/base/DatePicker/index.js +7 -7
- package/lib/ProForm/components/base/DatePicker/useDateLimit.d.ts +3 -0
- package/lib/ProForm/components/base/DatePicker/useDateLimit.js +19 -0
- package/lib/ProForm/components/base/Input/index.js +10 -8
- package/lib/ProForm/components/base/InputNumber/index.js +3 -6
- package/lib/ProForm/components/base/Radio/index.js +3 -4
- package/lib/ProForm/components/base/RangePicker/index.js +6 -6
- package/lib/ProForm/components/base/RangePicker/useDateRange.d.ts +5 -5
- package/lib/ProForm/components/base/Select/index.js +2 -3
- package/lib/ProForm/components/base/Switch/index.js +2 -3
- package/lib/ProForm/components/base/SwitchCheckbox/index.js +2 -3
- package/lib/ProForm/components/base/SwitchCheckbox/style/index.less +0 -2
- package/lib/ProForm/components/base/TextArea/index.js +3 -4
- package/lib/ProForm/components/base/TextArea/index.less +10 -2
- package/lib/ProForm/components/base/TimePicker/index.d.ts +1 -2
- package/lib/ProForm/components/base/TimePicker/index.js +6 -7
- package/lib/ProForm/components/base/TimePicker/style/index.less +3 -3
- package/lib/ProForm/components/combination/Container/style/index.less +0 -2
- package/lib/ProForm/components/combination/FormList/components/ActionButton.js +15 -13
- package/lib/ProForm/components/combination/FormList/components/BlockFields.js +6 -9
- package/lib/ProForm/components/combination/FormList/components/Empty.js +2 -3
- package/lib/ProForm/components/combination/FormList/components/LineFields.js +2 -3
- package/lib/ProForm/components/combination/FormList/components/ToolbarButton.js +4 -7
- package/lib/ProForm/components/combination/FormList/index.js +2 -3
- package/lib/ProForm/components/combination/FormList/style/index.less +36 -2
- package/lib/ProForm/components/combination/Group/component/AddonWrapper/index.d.ts +1 -0
- package/lib/ProForm/components/combination/Group/component/ComRender.js +0 -1
- package/lib/ProForm/components/combination/Group/index.js +3 -4
- package/lib/ProForm/components/combination/Group/style/index.less +7 -87
- package/lib/ProForm/components/combination/Group/utils.d.ts +1 -1
- package/lib/ProForm/components/combination/Group/utils.js +4 -5
- package/lib/ProForm/components/combination/ProCascader/index.js +12 -14
- package/lib/ProForm/components/combination/ProCascader/propsType.d.ts +1 -1
- package/lib/ProForm/components/combination/ProCascader/style/index.less +0 -2
- package/lib/ProForm/components/combination/ProModalSelect/index.d.ts +1 -1
- package/lib/ProForm/components/combination/ProModalSelect/index.js +24 -39
- package/lib/ProForm/components/combination/ProModalSelect/style/index.less +11 -15
- package/lib/ProForm/components/combination/ProNumberRange/index.d.ts +3 -2
- package/lib/ProForm/components/combination/ProNumberRange/index.js +20 -20
- package/lib/ProForm/components/combination/ProNumberRange/style/index.less +3 -54
- package/lib/ProForm/components/combination/ProRangeLimit/index.d.ts +2 -23
- package/lib/ProForm/components/combination/ProRangeLimit/index.js +42 -25
- package/lib/ProForm/components/combination/ProRangeLimit/propsType.d.ts +23 -0
- package/lib/ProForm/components/combination/ProTimeLimit/hooks/useControlled.d.ts +3 -2
- package/lib/ProForm/components/combination/ProTimeLimit/hooks/useControlled.js +14 -2
- package/lib/ProForm/components/combination/ProTimeLimit/index.d.ts +5 -6
- package/lib/ProForm/components/combination/ProTimeLimit/index.js +23 -20
- package/lib/ProForm/components/combination/ProTimeLimit/style/index.less +64 -6
- package/lib/ProForm/components/index.d.ts +2 -9
- package/lib/ProForm/components/index.js +1 -63
- package/lib/ProForm/components/render/ChangedWrapper.js +8 -9
- package/lib/ProForm/components/render/ConfirmWrapper.js +7 -7
- package/lib/ProForm/components/render/Render.js +29 -30
- package/lib/ProForm/components/render/RenderFields.d.ts +1 -0
- package/lib/ProForm/components/render/RenderFields.js +6 -3
- package/lib/ProForm/components/render/propsType.d.ts +3 -6
- package/lib/ProForm/index.d.ts +2 -2
- package/lib/ProForm/index.js +13 -42
- package/lib/ProForm/propsType.d.ts +3 -0
- package/lib/ProForm/style/index.less +4 -16
- package/lib/ProForm/utils/index.d.ts +15 -1
- package/lib/ProForm/utils/index.js +69 -17
- package/lib/ProForm/utils/useDeepCompareMemo.js +4 -4
- package/lib/ProForm/utils/useForm.js +26 -21
- package/lib/ProForm/utils/useShouldUpdate.d.ts +1 -0
- package/lib/ProForm/utils/useShouldUpdate.js +101 -15
- package/lib/ProIcon/index.js +10 -13
- package/lib/ProIcon/style/index.less +0 -2
- package/lib/ProLayout/components/Layout/Header/index.js +1 -1
- package/lib/ProLayout/components/Layout/Menu/FoldMenu/index.js +3 -6
- package/lib/ProLayout/components/Layout/Menu/FoldMenu/style/index.less +40 -39
- package/lib/ProLayout/components/Layout/Menu/OpenMenu/index.js +2 -3
- package/lib/ProLayout/components/Layout/Menu/OpenMenu/style/index.less +0 -3
- package/lib/ProLayout/components/Layout/Menu/SideMenu/style/index.less +7 -5
- package/lib/ProLayout/components/Layout/Menu/index.js +1 -1
- package/lib/ProLayout/components/Layout/Menu/style/index.less +0 -2
- package/lib/ProLayout/components/Layout/Notice/style/index.less +0 -2
- package/lib/ProLayout/components/ProCollapse/index.js +29 -44
- package/lib/ProLayout/components/ProCollapse/style/index.less +5 -4
- package/lib/ProLayout/components/ProFooter/index.js +2 -3
- package/lib/ProLayout/components/ProFooter/style/index.less +0 -2
- package/lib/ProLayout/components/ProHeader/components/Copy/index.js +2 -3
- package/lib/ProLayout/components/ProHeader/components/ProBackBtn/index.js +2 -3
- package/lib/ProLayout/components/ProHeader/components/ProBackBtn/style/index.less +7 -9
- package/lib/ProLayout/components/ProHeader/index.js +44 -47
- package/lib/ProLayout/components/ProHeader/style/index.less +0 -2
- package/lib/ProLayout/components/TabsManager/components/TabContextMenu.js +2 -3
- package/lib/ProLayout/components/TabsManager/hooks/useTabsState.js +0 -2
- package/lib/ProLayout/index.js +79 -40
- package/lib/ProLayout/style/index.less +2 -3
- package/lib/ProSelect/components/AdaptiveTooltip.js +2 -3
- package/lib/ProSelect/index.js +7 -15
- package/lib/ProSelect/index.less +0 -2
- package/lib/ProSelect/propsType.d.ts +1 -1
- package/lib/ProStep/components/Anchor/index.js +2 -3
- package/lib/ProStep/components/Item/index.js +1 -1
- package/lib/ProStep/components/Step/index.js +1 -0
- package/lib/ProStep/style/index.less +2 -4
- package/lib/ProTable/components/FormatColumn/index.js +33 -31
- package/lib/ProTable/components/RcTable/components/BaseTable/index.d.ts +0 -1
- package/lib/ProTable/components/RcTable/components/BaseTable/index.js +2 -4
- package/lib/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/index.js +16 -13
- package/lib/ProTable/components/RcTable/components/DraggableTable/index.d.ts +0 -1
- package/lib/ProTable/components/RcTable/components/DraggableTable/index.js +2 -4
- package/lib/ProTable/components/RenderColumn/index.d.ts +1 -1
- package/lib/ProTable/components/RenderColumn/index.js +15 -18
- package/lib/ProTable/components/RenderSummary/index.js +4 -6
- package/lib/ProTable/components/RenderTableHeader/index.js +3 -5
- package/lib/ProTable/components/RenderTabs/index.js +3 -6
- package/lib/ProTable/components/TableResizable/index.js +2 -1
- package/lib/ProTable/components/TooltipTitle/index.js +2 -3
- package/lib/ProTable/hooks/useAntdTable.js +4 -7
- package/lib/ProTable/index.d.ts +0 -7
- package/lib/ProTable/index.js +10 -13
- package/lib/ProTable/propsType.d.ts +2 -3
- package/lib/ProTable/style/index.less +4 -6
- package/lib/ProTabs/components/Card/index.js +5 -11
- package/lib/ProTabs/index.js +2 -3
- package/lib/ProTabs/style/index.less +0 -2
- package/lib/ProThemeTools/component/ProTools/index.js +18 -22
- package/lib/ProThemeTools/context/ThemeContext.d.ts +31 -0
- package/lib/ProThemeTools/context/ThemeContext.js +145 -0
- package/lib/ProThemeTools/index.d.ts +4 -8
- package/lib/ProThemeTools/index.js +88 -48
- package/lib/ProThemeTools/style/index.less +1 -3
- package/lib/ProThemeTools/utils/index.d.ts +16 -6
- package/lib/ProThemeTools/utils/index.js +34 -27
- package/lib/ProTooltip/index.js +14 -9
- package/lib/ProTooltip/style/index.less +0 -2
- package/lib/ProTree/components/AdaptiveTooltip.js +2 -4
- package/lib/ProTree/components/List.js +3 -4
- package/lib/ProTree/components/ProTree.js +5 -12
- package/lib/ProTree/components/ProTreeSelect/index.js +28 -26
- package/lib/ProTree/components/ProTreeSelect/style/index.less +0 -2
- package/lib/ProTree/components/Tree.js +6 -13
- package/lib/ProTree/index.js +0 -8
- package/lib/ProTree/propsType.d.ts +1 -1
- package/lib/ProTree/style/index.less +8 -6
- package/lib/ProTreeModal/components/Cascader.js +3 -4
- package/lib/ProTreeModal/components/List.js +11 -17
- package/lib/ProTreeModal/components/SortableItem.js +2 -3
- package/lib/ProTreeModal/components/Tree.js +3 -4
- package/lib/ProTreeModal/components/Trigger.js +6 -11
- package/lib/ProTreeModal/index.d.ts +0 -1
- package/lib/ProTreeModal/index.js +10 -20
- package/lib/ProTreeModal/style/index.less +12 -3
- package/lib/ProUpload/components/ButtonRender.js +4 -7
- package/lib/ProUpload/components/DragRender.js +2 -3
- package/lib/ProUpload/components/FileItem.d.ts +0 -1
- package/lib/ProUpload/components/FileItem.js +15 -21
- package/lib/ProUpload/components/ImageRender.js +8 -17
- package/lib/ProUpload/index.js +3 -4
- package/lib/ProUpload/style/index.less +171 -12
- package/lib/ProViewer/index.js +30 -36
- package/lib/ProViewer/propsType.js +3 -1
- package/lib/ProViewer/style/index.less +0 -2
- package/lib/ProWaterMark/index.js +3 -4
- package/lib/ProWaterMark/propsType.d.ts +5 -24
- package/lib/global.less +2 -1
- package/lib/index.d.ts +3 -3
- package/lib/index.js +34 -21
- package/lib/locale/en_US.js +1 -1
- package/lib/locale/index.d.ts +2 -0
- package/lib/locale/index.js +14 -3
- package/lib/locale/zh_CN.js +1 -1
- package/lib/style/components.less +0 -3
- package/lib/style/index.less +1 -1
- package/lib/style/theme/antd.less +36 -48
- package/lib/style/theme/base.less +90 -0
- package/lib/style/theme/index.less +2 -89
- package/lib/utils/index.d.ts +7 -0
- package/lib/utils/index.js +41 -2
- package/package.json +37 -25
- package/es/ProEditTable/components/RcTable/VirtualTable.d.ts +0 -3
- package/es/ProEditTable/components/RcTable/VirtualTable.js +0 -9
- package/es/ProForm/components/combination/ProCombination/index.d.ts +0 -6
- package/es/ProForm/components/combination/ProCombination/index.js +0 -208
- package/es/ProForm/components/combination/ProCombination/propsType.d.ts +0 -68
- package/es/ProForm/components/combination/ProCombination/style/index.less +0 -18
- package/es/ProForm/components/old/EnumSelect/hooks/useRequestList.d.ts +0 -33
- package/es/ProForm/components/old/EnumSelect/hooks/useRequestList.js +0 -110
- package/es/ProForm/components/old/EnumSelect/index.d.ts +0 -4
- package/es/ProForm/components/old/EnumSelect/index.js +0 -265
- package/es/ProForm/components/old/EnumSelect/interface.d.ts +0 -29
- package/es/ProForm/components/old/EnumSelect/interface.js +0 -1
- package/es/ProForm/components/old/EnumSelect/style/index.less +0 -113
- package/es/ProForm/components/old/InputRange/index.d.ts +0 -16
- package/es/ProForm/components/old/InputRange/index.js +0 -101
- package/es/ProForm/components/old/InputWithSuffix/index.d.ts +0 -3
- package/es/ProForm/components/old/InputWithSuffix/index.js +0 -47
- package/es/ProForm/components/old/InputWithSuffix/propsTypes.d.ts +0 -11
- package/es/ProForm/components/old/InputWithSuffix/propsTypes.js +0 -1
- package/es/ProForm/components/old/ProAddress/index.d.ts +0 -27
- package/es/ProForm/components/old/ProAddress/index.js +0 -276
- package/es/ProForm/components/old/ProAddress/propsTypes.d.ts +0 -16
- package/es/ProForm/components/old/ProAddress/propsTypes.js +0 -1
- package/es/ProForm/components/old/ProCertNo/index.d.ts +0 -14
- package/es/ProForm/components/old/ProCertNo/index.js +0 -66
- package/es/ProForm/components/old/ProCertNo/propsType.d.ts +0 -18
- package/es/ProForm/components/old/ProCertNo/propsType.js +0 -1
- package/es/ProForm/components/old/ProCertValidity/index.d.ts +0 -9
- package/es/ProForm/components/old/ProCertValidity/index.js +0 -186
- package/es/ProForm/components/old/ProCertValidity/propsType.d.ts +0 -19
- package/es/ProForm/components/old/ProCertValidity/propsType.js +0 -1
- package/es/ProForm/components/old/ProRangeBox/index.d.ts +0 -2
- package/es/ProForm/components/old/ProRangeBox/index.js +0 -98
- package/es/ProForm/components/old/ProRangeBox/propsType.d.ts +0 -3
- package/es/ProForm/components/old/ProRangeBox/propsType.js +0 -1
- package/es/ProUpload/style/fileItem.less +0 -159
- package/es/old/ProCertValidity/index.d.ts +0 -9
- package/es/old/ProCertValidity/index.js +0 -186
- package/es/old/ProCertValidity/propsType.d.ts +0 -19
- package/es/old/ProCertValidity/propsType.js +0 -1
- package/es/old/ProEditableTable/index.d.ts +0 -4
- package/es/old/ProEditableTable/index.js +0 -594
- package/es/old/ProEditableTable/propsType.d.ts +0 -68
- package/es/old/ProEditableTable/propsType.js +0 -1
- package/es/old/ProEditableTable/style/index.less +0 -75
- package/es/old/ProEditableTable/utils.d.ts +0 -29
- package/es/old/ProEditableTable/utils.js +0 -321
- package/lib/ProEditTable/components/RcTable/VirtualTable.d.ts +0 -3
- package/lib/ProEditTable/components/RcTable/VirtualTable.js +0 -14
- package/lib/ProForm/components/combination/ProCombination/index.d.ts +0 -6
- package/lib/ProForm/components/combination/ProCombination/index.js +0 -217
- package/lib/ProForm/components/combination/ProCombination/propsType.d.ts +0 -68
- package/lib/ProForm/components/combination/ProCombination/style/index.less +0 -18
- package/lib/ProForm/components/old/EnumSelect/hooks/useRequestList.d.ts +0 -33
- package/lib/ProForm/components/old/EnumSelect/hooks/useRequestList.js +0 -117
- package/lib/ProForm/components/old/EnumSelect/index.d.ts +0 -4
- package/lib/ProForm/components/old/EnumSelect/index.js +0 -271
- package/lib/ProForm/components/old/EnumSelect/interface.d.ts +0 -29
- package/lib/ProForm/components/old/EnumSelect/interface.js +0 -5
- package/lib/ProForm/components/old/EnumSelect/style/index.less +0 -113
- package/lib/ProForm/components/old/InputRange/index.d.ts +0 -16
- package/lib/ProForm/components/old/InputRange/index.js +0 -108
- package/lib/ProForm/components/old/InputWithSuffix/index.d.ts +0 -3
- package/lib/ProForm/components/old/InputWithSuffix/index.js +0 -53
- package/lib/ProForm/components/old/InputWithSuffix/propsTypes.d.ts +0 -11
- package/lib/ProForm/components/old/InputWithSuffix/propsTypes.js +0 -5
- package/lib/ProForm/components/old/ProAddress/index.d.ts +0 -27
- package/lib/ProForm/components/old/ProAddress/index.js +0 -284
- package/lib/ProForm/components/old/ProAddress/propsTypes.d.ts +0 -16
- package/lib/ProForm/components/old/ProAddress/propsTypes.js +0 -5
- package/lib/ProForm/components/old/ProCertNo/index.d.ts +0 -14
- package/lib/ProForm/components/old/ProCertNo/index.js +0 -72
- package/lib/ProForm/components/old/ProCertNo/propsType.d.ts +0 -18
- package/lib/ProForm/components/old/ProCertNo/propsType.js +0 -5
- package/lib/ProForm/components/old/ProCertValidity/index.d.ts +0 -9
- package/lib/ProForm/components/old/ProCertValidity/index.js +0 -192
- package/lib/ProForm/components/old/ProCertValidity/propsType.d.ts +0 -19
- package/lib/ProForm/components/old/ProCertValidity/propsType.js +0 -5
- package/lib/ProForm/components/old/ProRangeBox/index.d.ts +0 -2
- package/lib/ProForm/components/old/ProRangeBox/index.js +0 -105
- package/lib/ProForm/components/old/ProRangeBox/propsType.d.ts +0 -3
- package/lib/ProForm/components/old/ProRangeBox/propsType.js +0 -5
- package/lib/ProUpload/style/fileItem.less +0 -159
- package/lib/old/ProCertValidity/index.d.ts +0 -9
- package/lib/old/ProCertValidity/index.js +0 -192
- package/lib/old/ProCertValidity/propsType.d.ts +0 -19
- package/lib/old/ProCertValidity/propsType.js +0 -5
- package/lib/old/ProEditableTable/index.d.ts +0 -4
- package/lib/old/ProEditableTable/index.js +0 -598
- package/lib/old/ProEditableTable/propsType.d.ts +0 -68
- package/lib/old/ProEditableTable/propsType.js +0 -5
- package/lib/old/ProEditableTable/style/index.less +0 -75
- package/lib/old/ProEditableTable/utils.d.ts +0 -29
- package/lib/old/ProEditableTable/utils.js +0 -329
- /package/es/ProForm/components/combination/{ProCombination → ProRangeLimit}/propsType.js +0 -0
- /package/lib/ProForm/components/combination/{ProCombination → ProRangeLimit}/propsType.js +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { ReactNode } from 'react';
|
|
2
|
-
import type { ModalProps, DrawerProps, FormInstance } from 'antd';
|
|
2
|
+
import type { ModalProps, DrawerProps, FormInstance, ModalFuncProps } from 'antd';
|
|
3
3
|
import type { ProFormType } from '../ProForm/propsType';
|
|
4
4
|
/**
|
|
5
5
|
* 抽屉尺寸类型定义
|
|
@@ -11,17 +11,11 @@ export type DrawerSizeType = DrawerSizePropsType;
|
|
|
11
11
|
*/
|
|
12
12
|
export type ShowTypePropsType = 'Modal' | 'Drawer';
|
|
13
13
|
export type ShowType = ShowTypePropsType;
|
|
14
|
-
|
|
15
|
-
* 为了保持向后兼容,保留原有接口名称
|
|
16
|
-
* @deprecated ProDrawerFormType
|
|
17
|
-
*/
|
|
18
|
-
export interface ProDrawerFormPropsType {
|
|
14
|
+
export interface ProDrawerFormType {
|
|
19
15
|
/** @name 内部form实例 */
|
|
20
16
|
form?: FormInstance<any>;
|
|
21
17
|
/** @name 自定义className */
|
|
22
18
|
className?: string;
|
|
23
|
-
/** @name 控制显示隐藏(兼容旧版API) */
|
|
24
|
-
visible?: ModalProps['open'] | DrawerProps['open'];
|
|
25
19
|
/** @name 控制显示隐藏 */
|
|
26
20
|
open: ModalProps['open'] | DrawerProps['open'];
|
|
27
21
|
/** @name 标题 */
|
|
@@ -33,7 +27,7 @@ export interface ProDrawerFormPropsType {
|
|
|
33
27
|
/** @name 是否查看模式 */
|
|
34
28
|
isView?: boolean | undefined;
|
|
35
29
|
/** @name 宽度 */
|
|
36
|
-
width?:
|
|
30
|
+
width?: string | number;
|
|
37
31
|
/** @name 取消按钮文字 */
|
|
38
32
|
cancelText?: ModalProps['cancelText'];
|
|
39
33
|
/** @name 确认按钮文字 */
|
|
@@ -62,7 +56,7 @@ export interface ProDrawerFormPropsType {
|
|
|
62
56
|
* @name 关闭时二次确认弹框的属性
|
|
63
57
|
* @description 只对Drawer的类型有效
|
|
64
58
|
*/
|
|
65
|
-
isConfirmCloseModalProps?:
|
|
59
|
+
isConfirmCloseModalProps?: Omit<ModalFuncProps, 'content' | 'onOk' | 'onCancel'>;
|
|
66
60
|
/**
|
|
67
61
|
* @name 底部默认取消按钮事件
|
|
68
62
|
* @returns 返回Promise或布尔值可控制弹窗关闭行为
|
|
@@ -90,14 +84,12 @@ export interface ProDrawerFormPropsType {
|
|
|
90
84
|
proFormProps?: Omit<ProFormType, 'form'>;
|
|
91
85
|
/**
|
|
92
86
|
* @name 弹框的属性
|
|
93
|
-
* @description 不支持'visible',请使用全局的visible/open
|
|
94
87
|
*/
|
|
95
|
-
modalProps?:
|
|
88
|
+
modalProps?: ModalProps;
|
|
96
89
|
/**
|
|
97
90
|
* @name 抽屉的属性
|
|
98
|
-
* @description 不支持'visible',请使用全局的visible/open
|
|
99
91
|
*/
|
|
100
|
-
drawerProps?:
|
|
92
|
+
drawerProps?: DrawerProps;
|
|
101
93
|
/**
|
|
102
94
|
* @name 关闭时弹框或者抽屉是否清空formValues
|
|
103
95
|
*/
|
|
@@ -107,7 +99,4 @@ export interface ProDrawerFormPropsType {
|
|
|
107
99
|
/** @name z轴层级 */
|
|
108
100
|
zIndex?: number;
|
|
109
101
|
}
|
|
110
|
-
|
|
111
|
-
* 抽屉表单属性类型定义
|
|
112
|
-
*/
|
|
113
|
-
export type ProDrawerFormType = ProDrawerFormPropsType;
|
|
102
|
+
export type ProDrawerFormPropsType = ProDrawerFormType;
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
@root-entry-name: 'default';
|
|
2
|
-
@import (reference) '~antd/es/style/themes/index.less';
|
|
3
1
|
|
|
4
2
|
.pro-drawer {
|
|
5
3
|
.original-value-tooltip {
|
|
@@ -112,18 +110,13 @@
|
|
|
112
110
|
.pro-modal {
|
|
113
111
|
.@{ant-prefix}-modal-close {
|
|
114
112
|
.@{ant-prefix}-modal-close-x {
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
&:hover {
|
|
119
|
-
fill: var(--zaui-brand, #006aff);
|
|
120
|
-
}
|
|
121
|
-
}
|
|
113
|
+
display: flex;
|
|
114
|
+
align-items: center;
|
|
115
|
+
justify-content: center;
|
|
122
116
|
}
|
|
123
117
|
}
|
|
124
118
|
|
|
125
119
|
.@{ant-prefix}-modal-header {
|
|
126
|
-
padding: var(--zaui-space-size-md, 16px);
|
|
127
120
|
border-bottom: none;
|
|
128
121
|
|
|
129
122
|
.@{ant-prefix}-modal-title {
|
|
@@ -132,11 +125,11 @@
|
|
|
132
125
|
}
|
|
133
126
|
|
|
134
127
|
.@{ant-prefix}-modal-footer {
|
|
135
|
-
padding: var(--zaui-space-size-md, 16px);
|
|
136
128
|
border-top: none;
|
|
137
129
|
|
|
138
130
|
.pro-modal-footer {
|
|
139
131
|
display: flex;
|
|
132
|
+
align-items: center;
|
|
140
133
|
justify-content: space-between;
|
|
141
134
|
}
|
|
142
135
|
}
|
|
@@ -144,9 +137,9 @@
|
|
|
144
137
|
.@{ant-prefix}-modal-content {
|
|
145
138
|
.@{ant-prefix}-modal-body {
|
|
146
139
|
max-height: 450px;
|
|
147
|
-
padding: 0 var(--zaui-space-size-md, 16px);
|
|
148
140
|
padding-top: 0;
|
|
149
|
-
overflow:
|
|
141
|
+
overflow-x: hidden;
|
|
142
|
+
overflow-y: auto;
|
|
150
143
|
}
|
|
151
144
|
}
|
|
152
145
|
}
|
|
@@ -173,6 +166,5 @@
|
|
|
173
166
|
.@{ant-prefix}-modal-footer {
|
|
174
167
|
position: relative;
|
|
175
168
|
z-index: 1;
|
|
176
|
-
box-shadow: 3px 2px 12px 0px var(--zaui-shadow, rgba(56, 56, 56, 0.15));
|
|
177
169
|
}
|
|
178
170
|
}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import "antd/es/space/style";
|
|
2
|
-
import _Space from "antd/es/space";
|
|
3
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
4
2
|
import { useEffect } from 'react';
|
|
5
3
|
import { omit } from 'lodash';
|
|
6
4
|
import { InfoCircleOutlined } from '@ant-design/icons';
|
|
5
|
+
import { Space } from 'antd';
|
|
7
6
|
import { ProForm } from "../../index";
|
|
8
7
|
import { matchFormValue } from "../utils";
|
|
9
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -58,7 +57,7 @@ var RenderProForm = props => {
|
|
|
58
57
|
children: primitiveProps === null || primitiveProps === void 0 ? void 0 : primitiveProps.title
|
|
59
58
|
}), (primitiveProps === null || primitiveProps === void 0 ? void 0 : primitiveProps.tip) && !((_props7 = _props) !== null && _props7 !== void 0 && _props7.isView) && /*#__PURE__*/_jsx("div", {
|
|
60
59
|
className: "pro-edit-label-tip",
|
|
61
|
-
children: /*#__PURE__*/_jsxs(
|
|
60
|
+
children: /*#__PURE__*/_jsxs(Space, {
|
|
62
61
|
align: "start",
|
|
63
62
|
children: [/*#__PURE__*/_jsx(InfoCircleOutlined, {}), primitiveProps === null || primitiveProps === void 0 ? void 0 : primitiveProps.tip]
|
|
64
63
|
})
|
package/es/ProEditLabel/index.js
CHANGED
|
@@ -1,18 +1,11 @@
|
|
|
1
|
-
import "antd/es/popconfirm/style";
|
|
2
|
-
import _Popconfirm from "antd/es/popconfirm";
|
|
3
|
-
import "antd/es/input/style";
|
|
4
|
-
import _Input from "antd/es/input";
|
|
5
|
-
import "antd/es/space/style";
|
|
6
|
-
import _Space from "antd/es/space";
|
|
7
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
8
2
|
import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
|
|
9
3
|
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
10
|
-
import "antd/es/form/style";
|
|
11
|
-
import _Form from "antd/es/form";
|
|
12
4
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
13
5
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
14
6
|
var _excluded = ["open", "disabled", "onOpenChange", "onFinish", "onConfirm", "trigger", "mode", "className", "size", "popupProps", "style", "viewEmpty", "children", "form"];
|
|
15
7
|
import { EditOutlined } from '@ant-design/icons';
|
|
8
|
+
import { Input, Popconfirm, Form, Space } from 'antd';
|
|
16
9
|
import { useToggle, useSetState } from 'ahooks';
|
|
17
10
|
import classnames from 'classnames';
|
|
18
11
|
import React, { useEffect, useRef } from 'react';
|
|
@@ -56,10 +49,10 @@ var ProEditLabel = _ref => {
|
|
|
56
49
|
_useToggle2 = _slicedToArray(_useToggle, 2),
|
|
57
50
|
status = _useToggle2[0],
|
|
58
51
|
toggleStatus = _useToggle2[1].toggle;
|
|
59
|
-
var _Form$useForm =
|
|
52
|
+
var _Form$useForm = Form.useForm(OriginForm),
|
|
60
53
|
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
61
54
|
form = _Form$useForm2[0];
|
|
62
|
-
var _Form$useForm3 =
|
|
55
|
+
var _Form$useForm3 = Form.useForm(),
|
|
63
56
|
_Form$useForm4 = _slicedToArray(_Form$useForm3, 1),
|
|
64
57
|
viewForm = _Form$useForm4[0];
|
|
65
58
|
var inputRef = useRef(null);
|
|
@@ -222,7 +215,7 @@ var ProEditLabel = _ref => {
|
|
|
222
215
|
var TextNode = /*#__PURE__*/_jsx("div", {
|
|
223
216
|
className: cls,
|
|
224
217
|
style: style,
|
|
225
|
-
children: /*#__PURE__*/_jsxs(
|
|
218
|
+
children: /*#__PURE__*/_jsxs(Space, {
|
|
226
219
|
align: "start",
|
|
227
220
|
children: [mode === 'current' ? props.value : /*#__PURE__*/_jsx(RenderProForm, _objectSpread({
|
|
228
221
|
value: confirmValue,
|
|
@@ -245,7 +238,7 @@ var ProEditLabel = _ref => {
|
|
|
245
238
|
// 当前页编辑模式
|
|
246
239
|
if (mode === 'current') {
|
|
247
240
|
if (status) {
|
|
248
|
-
return /*#__PURE__*/_jsx(
|
|
241
|
+
return /*#__PURE__*/_jsx(Input, _objectSpread(_objectSpread({
|
|
249
242
|
ref: inputRef,
|
|
250
243
|
size: size,
|
|
251
244
|
onBlur: e => {
|
|
@@ -271,10 +264,12 @@ var ProEditLabel = _ref => {
|
|
|
271
264
|
}
|
|
272
265
|
return TextNode;
|
|
273
266
|
};
|
|
274
|
-
return /*#__PURE__*/_jsx(
|
|
275
|
-
|
|
267
|
+
return /*#__PURE__*/_jsx(Popconfirm, _objectSpread(_objectSpread({
|
|
268
|
+
classNames: {
|
|
269
|
+
root: 'pro-edit-label-popconfirm'
|
|
270
|
+
},
|
|
276
271
|
icon: null,
|
|
277
|
-
|
|
272
|
+
destroyOnHidden: true,
|
|
278
273
|
title: /*#__PURE__*/_jsx(RenderProForm, _objectSpread({
|
|
279
274
|
form: form,
|
|
280
275
|
value: confirmValue,
|
|
@@ -84,11 +84,6 @@ export interface PopupType {
|
|
|
84
84
|
[key: string]: any;
|
|
85
85
|
}
|
|
86
86
|
export interface LabelType extends InputProps {
|
|
87
|
-
/**
|
|
88
|
-
* @description 是否可见
|
|
89
|
-
* @default false
|
|
90
|
-
*/
|
|
91
|
-
visible?: boolean;
|
|
92
87
|
/**
|
|
93
88
|
* @description 是否打开
|
|
94
89
|
* @default false
|
|
@@ -98,7 +93,7 @@ export interface LabelType extends InputProps {
|
|
|
98
93
|
* @description 可见性变化回调
|
|
99
94
|
* @default -
|
|
100
95
|
*/
|
|
101
|
-
|
|
96
|
+
onOpenChange?: (open: boolean) => void;
|
|
102
97
|
/**
|
|
103
98
|
* @description 值变化回调
|
|
104
99
|
* @default -
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
@root-entry-name: 'default';
|
|
2
|
-
@import (reference) '~antd/es/style/themes/index.less';
|
|
3
1
|
|
|
4
2
|
.pro-edit-label {
|
|
5
3
|
display: inline-block;
|
|
@@ -69,12 +67,13 @@
|
|
|
69
67
|
|
|
70
68
|
.pro-edit-label-popconfirm {
|
|
71
69
|
z-index: 1001 !important;
|
|
70
|
+
|
|
72
71
|
|
|
73
72
|
.@{ant-prefix}-popover-inner-content {
|
|
74
73
|
width: 100%;
|
|
75
74
|
}
|
|
76
75
|
|
|
77
|
-
.@{ant-prefix}-
|
|
76
|
+
.@{ant-prefix}-popconfirm-message {
|
|
78
77
|
display: block;
|
|
79
78
|
}
|
|
80
79
|
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
import "antd/es/popconfirm/style";
|
|
2
|
-
import _Popconfirm from "antd/es/popconfirm";
|
|
3
|
-
import "antd/es/button/style";
|
|
4
|
-
import _Button from "antd/es/button";
|
|
5
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
6
2
|
import React from 'react';
|
|
3
|
+
import { Button, Popconfirm } from 'antd';
|
|
7
4
|
import { isFunction, omit } from 'lodash';
|
|
8
5
|
import { iconMap } from "../../utils/config";
|
|
9
6
|
import locale from "../../../locale";
|
|
@@ -108,7 +105,7 @@ var ActionButton = _ref => {
|
|
|
108
105
|
var isDisabled = !selectedRowKeys.length && btnConfig.type === 'mulDelete' || editingKeys.length || (delBtnProps === null || delBtnProps === void 0 ? void 0 : delBtnProps.disabled);
|
|
109
106
|
return _isEditing && getShow(btnConfig.show) ? /*#__PURE__*/_jsx(_Fragment, {
|
|
110
107
|
children: ['delete', 'mulDelete'].includes(btnConfig.type) ? /*#__PURE__*/_jsx(_Fragment, {
|
|
111
|
-
children: btnConfig !== null && btnConfig !== void 0 && btnConfig.needConfirm ? /*#__PURE__*/_jsx(
|
|
108
|
+
children: btnConfig !== null && btnConfig !== void 0 && btnConfig.needConfirm ? /*#__PURE__*/_jsx(Popconfirm, {
|
|
112
109
|
placement: "topRight",
|
|
113
110
|
title: deleteMsgMap[btnConfig.type],
|
|
114
111
|
onConfirm: () => {
|
|
@@ -128,7 +125,7 @@ var ActionButton = _ref => {
|
|
|
128
125
|
record,
|
|
129
126
|
index,
|
|
130
127
|
disabled: isDisabled
|
|
131
|
-
}))) : /*#__PURE__*/_jsx(
|
|
128
|
+
}))) : /*#__PURE__*/_jsx(Button, _objectSpread(_objectSpread({}, omit(delBtnProps, ['buttonProps', 'isEditable', 'onEvent'])), {}, {
|
|
132
129
|
disabled: isDisabled,
|
|
133
130
|
type: "link",
|
|
134
131
|
children: btnConfig.label
|
|
@@ -148,7 +145,7 @@ var ActionButton = _ref => {
|
|
|
148
145
|
selectedRows
|
|
149
146
|
});
|
|
150
147
|
}
|
|
151
|
-
}))) : /*#__PURE__*/_jsx(
|
|
148
|
+
}))) : /*#__PURE__*/_jsx(Button, _objectSpread(_objectSpread({}, omit(delBtnProps, ['buttonProps', 'isEditable', 'onEvent'])), {}, {
|
|
152
149
|
disabled: isDisabled,
|
|
153
150
|
type: "link",
|
|
154
151
|
onClick: () => {
|
|
@@ -168,7 +165,7 @@ var ActionButton = _ref => {
|
|
|
168
165
|
children: /*#__PURE__*/React.isValidElement(btnConfig.label) ? ( /*#__PURE__*/React.cloneElement(btnConfig.label, _objectSpread(_objectSpread({}, omit(actionBtnProps, ['buttonProps', 'isEditable', 'onEvent'])), {}, {
|
|
169
166
|
record,
|
|
170
167
|
index
|
|
171
|
-
}))) : /*#__PURE__*/_jsx(
|
|
168
|
+
}))) : /*#__PURE__*/_jsx(Button, _objectSpread(_objectSpread({
|
|
172
169
|
className: "action-button"
|
|
173
170
|
}, omit(actionBtnProps, ['buttonProps', 'isEditable', 'onEvent'])), {}, {
|
|
174
171
|
type: "link",
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import "antd/es/table/style";
|
|
2
|
-
import _Table from "antd/es/table";
|
|
3
|
-
import "antd/es/badge/style";
|
|
4
|
-
import _Badge from "antd/es/badge";
|
|
5
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
6
2
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
7
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
8
4
|
var _excluded = ["tableProps"];
|
|
9
|
-
import { memo } from 'react';
|
|
5
|
+
import { memo, useCallback } from 'react';
|
|
6
|
+
import { Badge, Table } from 'antd';
|
|
7
|
+
import { isFunction, isNumber } from 'lodash';
|
|
10
8
|
import useEditTableError from "../../utils/useEditTableError";
|
|
11
9
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
10
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -15,7 +13,8 @@ var BaseTable = _ref => {
|
|
|
15
13
|
var _value$;
|
|
16
14
|
var tableProps = _ref.tableProps,
|
|
17
15
|
resetProps = _objectWithoutProperties(_ref, _excluded);
|
|
18
|
-
var
|
|
16
|
+
var rowKey = tableProps.rowKey,
|
|
17
|
+
value = tableProps.value,
|
|
19
18
|
headerRender = tableProps.headerRender,
|
|
20
19
|
tableRef = tableProps.tableRef,
|
|
21
20
|
className = tableProps.className,
|
|
@@ -41,56 +40,74 @@ var BaseTable = _ref => {
|
|
|
41
40
|
}),
|
|
42
41
|
_useEditTableError2 = _slicedToArray(_useEditTableError, 1),
|
|
43
42
|
errorLength = _useEditTableError2[0];
|
|
43
|
+
var getScroll = useCallback(() => {
|
|
44
|
+
if (scroll !== null && scroll !== void 0 && scroll.x && scroll !== null && scroll !== void 0 && scroll.y) {
|
|
45
|
+
return {
|
|
46
|
+
x: scroll === null || scroll === void 0 ? void 0 : scroll.x,
|
|
47
|
+
y: Number(scroll === null || scroll === void 0 ? void 0 : scroll.y)
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
if (scroll !== null && scroll !== void 0 && scroll.x && !isNumber(scroll === null || scroll === void 0 ? void 0 : scroll.y)) {
|
|
51
|
+
return {
|
|
52
|
+
x: scroll === null || scroll === void 0 ? void 0 : scroll.x
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
if (scroll !== null && scroll !== void 0 && scroll.y && !(scroll !== null && scroll !== void 0 && scroll.x)) {
|
|
56
|
+
return {
|
|
57
|
+
y: Number(scroll === null || scroll === void 0 ? void 0 : scroll.y)
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
return null;
|
|
61
|
+
}, [scroll]);
|
|
62
|
+
var nextTableProps = _objectSpread(_objectSpread({
|
|
63
|
+
className,
|
|
64
|
+
columns,
|
|
65
|
+
rowClassName,
|
|
66
|
+
dataSource: value !== null && value !== void 0 && (_value$ = value[0]) !== null && _value$ !== void 0 && _value$.rowKey ? value : [],
|
|
67
|
+
rowSelection: renderRowSelection(),
|
|
68
|
+
onRow: () => ({
|
|
69
|
+
disabled: disabled || virtualKey && !!editingKeys.length,
|
|
70
|
+
'data-hide': isHideCheckBox,
|
|
71
|
+
'data-row-draggable': rowDraggable,
|
|
72
|
+
onClick: () => {}
|
|
73
|
+
})
|
|
74
|
+
}, resetProps), {}, {
|
|
75
|
+
rowKey: rowKey || 'rowKey',
|
|
76
|
+
summary,
|
|
77
|
+
pagination: pagination ? _objectSpread(_objectSpread({
|
|
78
|
+
showSizeChanger: true,
|
|
79
|
+
pageSizeOptions: [5, 10, 20, 50],
|
|
80
|
+
showQuickJumper: true,
|
|
81
|
+
total: value === null || value === void 0 ? void 0 : value.length,
|
|
82
|
+
showTotal: total => {
|
|
83
|
+
var _locale$ProEditTable;
|
|
84
|
+
if (!total) return;
|
|
85
|
+
return formatMessage(locale === null || locale === void 0 || (_locale$ProEditTable = locale.ProEditTable) === null || _locale$ProEditTable === void 0 ? void 0 : _locale$ProEditTable.total, {
|
|
86
|
+
total
|
|
87
|
+
});
|
|
88
|
+
},
|
|
89
|
+
itemRender: (index, type, originalElement) => {
|
|
90
|
+
return type === 'page' && page.pageNum === index && errorLength ? /*#__PURE__*/_jsxs("div", {
|
|
91
|
+
className: "pro-edit-table-pagination-item-badge",
|
|
92
|
+
children: [/*#__PURE__*/_jsx(Badge, {
|
|
93
|
+
count: errorLength
|
|
94
|
+
}), originalElement]
|
|
95
|
+
}) : originalElement;
|
|
96
|
+
},
|
|
97
|
+
onChange: handlePageChange
|
|
98
|
+
}, pagination), {}, {
|
|
99
|
+
current: page.pageNum,
|
|
100
|
+
pageSize: page.pageSize
|
|
101
|
+
}) : false,
|
|
102
|
+
scroll: getScroll()
|
|
103
|
+
});
|
|
44
104
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
45
105
|
children: [headerRender ? /*#__PURE__*/_jsx("div", {
|
|
46
106
|
className: "pro-edit-table-header",
|
|
47
|
-
children:
|
|
48
|
-
}) : null, /*#__PURE__*/_jsx(
|
|
49
|
-
ref: tableRef
|
|
50
|
-
|
|
51
|
-
dataSource: value !== null && value !== void 0 && (_value$ = value[0]) !== null && _value$ !== void 0 && _value$.rowKey ? value : undefined,
|
|
52
|
-
columns: columns,
|
|
53
|
-
rowSelection: renderRowSelection(),
|
|
54
|
-
rowClassName: rowClassName,
|
|
55
|
-
onRow: () => ({
|
|
56
|
-
disabled: disabled || virtualKey && !!editingKeys.length,
|
|
57
|
-
'data-hide': isHideCheckBox,
|
|
58
|
-
'data-row-draggable': rowDraggable,
|
|
59
|
-
onClick: () => {}
|
|
60
|
-
})
|
|
61
|
-
}, resetProps), {}, {
|
|
62
|
-
pagination: pagination ? _objectSpread(_objectSpread({
|
|
63
|
-
showSizeChanger: true,
|
|
64
|
-
pageSizeOptions: [5, 10, 20, 50],
|
|
65
|
-
showQuickJumper: true,
|
|
66
|
-
total: value === null || value === void 0 ? void 0 : value.length,
|
|
67
|
-
showTotal: total => {
|
|
68
|
-
var _locale$ProEditTable;
|
|
69
|
-
if (!total) return;
|
|
70
|
-
return formatMessage(locale === null || locale === void 0 || (_locale$ProEditTable = locale.ProEditTable) === null || _locale$ProEditTable === void 0 ? void 0 : _locale$ProEditTable.total, {
|
|
71
|
-
total
|
|
72
|
-
});
|
|
73
|
-
},
|
|
74
|
-
itemRender: (index, type, originalElement) => {
|
|
75
|
-
return type === 'page' && page.pageNum === index && errorLength ? /*#__PURE__*/_jsxs("div", {
|
|
76
|
-
className: "pro-edit-table-pagination-item-badge",
|
|
77
|
-
children: [/*#__PURE__*/_jsx(_Badge, {
|
|
78
|
-
count: errorLength
|
|
79
|
-
}), originalElement]
|
|
80
|
-
}) : originalElement;
|
|
81
|
-
},
|
|
82
|
-
onChange: handlePageChange
|
|
83
|
-
}, pagination), {}, {
|
|
84
|
-
current: page.pageNum,
|
|
85
|
-
pageSize: page.pageSize
|
|
86
|
-
}) : false,
|
|
87
|
-
rowKey: "rowKey",
|
|
88
|
-
scroll: {
|
|
89
|
-
x: scroll === null || scroll === void 0 ? void 0 : scroll.x,
|
|
90
|
-
y: value !== null && value !== void 0 && value.length ? scroll === null || scroll === void 0 ? void 0 : scroll.y : undefined
|
|
91
|
-
},
|
|
92
|
-
summary: summary
|
|
93
|
-
}))]
|
|
107
|
+
children: isFunction(headerRender) ? headerRender() : headerRender
|
|
108
|
+
}) : null, /*#__PURE__*/_jsx(Table, _objectSpread({
|
|
109
|
+
ref: tableRef
|
|
110
|
+
}, nextTableProps))]
|
|
94
111
|
});
|
|
95
112
|
};
|
|
96
113
|
export default /*#__PURE__*/memo(BaseTable);
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import "antd/es/table/style";
|
|
2
|
-
import _Table from "antd/es/table";
|
|
3
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
4
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
5
3
|
var _excluded = ["disabled", "children"],
|
|
6
4
|
_excluded2 = ["tableProps", "draggableProps"];
|
|
7
|
-
import
|
|
5
|
+
import { Table } from 'antd';
|
|
6
|
+
import React, { memo, useCallback } from 'react';
|
|
8
7
|
import { DndContext } from '@dnd-kit/core';
|
|
8
|
+
import { isNumber } from 'lodash';
|
|
9
9
|
import { arrayMove, useSortable, SortableContext, verticalListSortingStrategy } from '@dnd-kit/sortable';
|
|
10
10
|
import { CSS } from '@dnd-kit/utilities';
|
|
11
11
|
import ProIcon from "../../../ProIcon";
|
|
@@ -38,8 +38,9 @@ var Row = props => {
|
|
|
38
38
|
ref: setNodeRef,
|
|
39
39
|
style: style
|
|
40
40
|
}, attributes), {}, {
|
|
41
|
-
children: React.Children.map(children, child => {
|
|
42
|
-
|
|
41
|
+
children: React.Children.map(children, (child, index) => {
|
|
42
|
+
// 在第一列(通常是rowSelection列)显示拖拽图标
|
|
43
|
+
if (index === 0 && !disabled) {
|
|
43
44
|
var _restProps$dataRowD;
|
|
44
45
|
var _ref = (child === null || child === void 0 ? void 0 : child.props) || {},
|
|
45
46
|
render = _ref.render,
|
|
@@ -48,7 +49,7 @@ var Row = props => {
|
|
|
48
49
|
var isDrag = restProps['data-row-draggable'] ? (_restProps$dataRowD = restProps['data-row-draggable']) === null || _restProps$dataRowD === void 0 ? void 0 : _restProps$dataRowD.call(restProps, record) : true;
|
|
49
50
|
return /*#__PURE__*/React.cloneElement(child, {
|
|
50
51
|
children: /*#__PURE__*/_jsxs("span", {
|
|
51
|
-
className: `drag-wrapper${props['data-hide'] ? ' no-check' : ''}`,
|
|
52
|
+
className: `pro-edit-table-drag-wrapper${props['data-hide'] ? ' no-check' : ''}`,
|
|
52
53
|
children: [isDrag ? /*#__PURE__*/_jsx(ProIcon, _objectSpread({
|
|
53
54
|
className: "drag-icon",
|
|
54
55
|
style: {
|
|
@@ -60,7 +61,8 @@ var Row = props => {
|
|
|
60
61
|
}, listeners)) : /*#__PURE__*/_jsx(ProIcon, {
|
|
61
62
|
size: 20
|
|
62
63
|
}), props['data-hide'] ? null : render === null || render === void 0 ? void 0 : render(null, record, renderIndex)]
|
|
63
|
-
})
|
|
64
|
+
}),
|
|
65
|
+
className: 'pro-edit-table-drag-wrapper-cell'
|
|
64
66
|
});
|
|
65
67
|
}
|
|
66
68
|
return child;
|
|
@@ -105,7 +107,8 @@ var DraggableTable = _ref3 => {
|
|
|
105
107
|
var tableProps = _ref3.tableProps,
|
|
106
108
|
draggableProps = _ref3.draggableProps,
|
|
107
109
|
resetProps = _objectWithoutProperties(_ref3, _excluded2);
|
|
108
|
-
var
|
|
110
|
+
var rowKey = tableProps.rowKey,
|
|
111
|
+
value = tableProps.value,
|
|
109
112
|
headerRender = tableProps.headerRender,
|
|
110
113
|
tableRef = tableProps.tableRef,
|
|
111
114
|
className = tableProps.className,
|
|
@@ -128,6 +131,62 @@ var DraggableTable = _ref3 => {
|
|
|
128
131
|
onDrag = draggableProps.onDrag,
|
|
129
132
|
draggable = draggableProps.draggable,
|
|
130
133
|
onDragEnd = draggableProps.onDragEnd;
|
|
134
|
+
var getScroll = useCallback(() => {
|
|
135
|
+
if (scroll !== null && scroll !== void 0 && scroll.x && scroll !== null && scroll !== void 0 && scroll.y) {
|
|
136
|
+
return {
|
|
137
|
+
x: scroll === null || scroll === void 0 ? void 0 : scroll.x,
|
|
138
|
+
y: Number(scroll === null || scroll === void 0 ? void 0 : scroll.y)
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
if (scroll !== null && scroll !== void 0 && scroll.x && !isNumber(scroll === null || scroll === void 0 ? void 0 : scroll.y)) {
|
|
142
|
+
return {
|
|
143
|
+
x: scroll === null || scroll === void 0 ? void 0 : scroll.x
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
if (scroll !== null && scroll !== void 0 && scroll.y && !(scroll !== null && scroll !== void 0 && scroll.x)) {
|
|
147
|
+
return {
|
|
148
|
+
y: Number(scroll === null || scroll === void 0 ? void 0 : scroll.y)
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
return null;
|
|
152
|
+
}, [scroll]);
|
|
153
|
+
var nextTableProps = _objectSpread(_objectSpread({
|
|
154
|
+
className,
|
|
155
|
+
columns,
|
|
156
|
+
rowClassName,
|
|
157
|
+
rowSelection: renderRowSelection(),
|
|
158
|
+
components: {
|
|
159
|
+
body: {
|
|
160
|
+
row: Row
|
|
161
|
+
}
|
|
162
|
+
},
|
|
163
|
+
onRow: () => ({
|
|
164
|
+
disabled: disabled || virtualKey && !!editingKeys.length,
|
|
165
|
+
'data-hide': isHideCheckBox,
|
|
166
|
+
'data-row-draggable': rowDraggable,
|
|
167
|
+
onClick: () => {}
|
|
168
|
+
}),
|
|
169
|
+
dataSource: value !== null && value !== void 0 && (_value$2 = value[0]) !== null && _value$2 !== void 0 && _value$2.rowKey ? value : []
|
|
170
|
+
}, resetProps), {}, {
|
|
171
|
+
rowKey: rowKey || 'rowKey',
|
|
172
|
+
pagination: pagination ? _objectSpread({
|
|
173
|
+
current: page.pageNum,
|
|
174
|
+
pageSize: page.pageSize,
|
|
175
|
+
showSizeChanger: false,
|
|
176
|
+
showQuickJumper: true,
|
|
177
|
+
total: value === null || value === void 0 ? void 0 : value.length,
|
|
178
|
+
showTotal: total => {
|
|
179
|
+
var _locale$ProEditTable;
|
|
180
|
+
if (!total) return;
|
|
181
|
+
return formatMessage(locale === null || locale === void 0 || (_locale$ProEditTable = locale.ProEditTable) === null || _locale$ProEditTable === void 0 ? void 0 : _locale$ProEditTable.total, {
|
|
182
|
+
total
|
|
183
|
+
});
|
|
184
|
+
},
|
|
185
|
+
onChange: handlePageChange
|
|
186
|
+
}, pagination) : false,
|
|
187
|
+
scroll: getScroll(),
|
|
188
|
+
summary
|
|
189
|
+
});
|
|
131
190
|
return /*#__PURE__*/_jsxs(DndWrapper, {
|
|
132
191
|
value: value,
|
|
133
192
|
onChange: onChange,
|
|
@@ -138,47 +197,9 @@ var DraggableTable = _ref3 => {
|
|
|
138
197
|
children: [headerRender ? /*#__PURE__*/_jsx("div", {
|
|
139
198
|
className: "pro-edit-table-header",
|
|
140
199
|
children: typeof headerRender === 'function' ? headerRender() : headerRender
|
|
141
|
-
}) : null, /*#__PURE__*/_jsx(
|
|
142
|
-
ref: tableRef
|
|
143
|
-
|
|
144
|
-
dataSource: value !== null && value !== void 0 && (_value$2 = value[0]) !== null && _value$2 !== void 0 && _value$2.rowKey ? value : undefined,
|
|
145
|
-
columns: columns,
|
|
146
|
-
rowSelection: renderRowSelection(),
|
|
147
|
-
rowClassName: rowClassName,
|
|
148
|
-
components: {
|
|
149
|
-
body: {
|
|
150
|
-
row: Row
|
|
151
|
-
}
|
|
152
|
-
},
|
|
153
|
-
onRow: () => ({
|
|
154
|
-
disabled: disabled || virtualKey && !!editingKeys.length,
|
|
155
|
-
'data-hide': isHideCheckBox,
|
|
156
|
-
'data-row-draggable': rowDraggable,
|
|
157
|
-
onClick: () => {}
|
|
158
|
-
})
|
|
159
|
-
}, resetProps), {}, {
|
|
160
|
-
pagination: pagination ? _objectSpread({
|
|
161
|
-
current: page.pageNum,
|
|
162
|
-
pageSize: page.pageSize,
|
|
163
|
-
showSizeChanger: false,
|
|
164
|
-
showQuickJumper: true,
|
|
165
|
-
total: value === null || value === void 0 ? void 0 : value.length,
|
|
166
|
-
showTotal: total => {
|
|
167
|
-
var _locale$ProEditTable;
|
|
168
|
-
if (!total) return;
|
|
169
|
-
return formatMessage(locale === null || locale === void 0 || (_locale$ProEditTable = locale.ProEditTable) === null || _locale$ProEditTable === void 0 ? void 0 : _locale$ProEditTable.total, {
|
|
170
|
-
total
|
|
171
|
-
});
|
|
172
|
-
},
|
|
173
|
-
onChange: handlePageChange
|
|
174
|
-
}, pagination) : false,
|
|
175
|
-
rowKey: "rowKey",
|
|
176
|
-
scroll: {
|
|
177
|
-
x: scroll === null || scroll === void 0 ? void 0 : scroll.x,
|
|
178
|
-
y: value !== null && value !== void 0 && value.length ? scroll === null || scroll === void 0 ? void 0 : scroll.y : undefined
|
|
179
|
-
},
|
|
180
|
-
summary: summary
|
|
181
|
-
}))]
|
|
200
|
+
}) : null, /*#__PURE__*/_jsx(Table, _objectSpread({
|
|
201
|
+
ref: tableRef
|
|
202
|
+
}, nextTableProps))]
|
|
182
203
|
});
|
|
183
204
|
};
|
|
184
205
|
export default /*#__PURE__*/memo(DraggableTable);
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
/** 基础表格 */
|
|
2
2
|
export { default as BaseTable } from "./BaseTable";
|
|
3
3
|
/** 拖拽表格 */
|
|
4
|
-
export { default as DraggableTable } from "./DraggableTable";
|
|
5
|
-
/** 虚拟列表表格, 暂时移除 */
|
|
6
|
-
export { default as VirtualTable } from "./VirtualTable";
|
|
4
|
+
export { default as DraggableTable } from "./DraggableTable";
|