@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
package/es/style/theme/antd.less
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
@
|
|
2
|
-
@import (reference) '~antd/es/style/themes/index.less';
|
|
3
|
-
@import './index';
|
|
1
|
+
@import './base';
|
|
4
2
|
|
|
5
3
|
@zat-disabled-color: #bcbcbc;
|
|
6
4
|
|
|
@@ -71,6 +69,7 @@
|
|
|
71
69
|
}
|
|
72
70
|
}
|
|
73
71
|
|
|
72
|
+
|
|
74
73
|
.@{ant-prefix}-form-item-explain-error {
|
|
75
74
|
.set-text-size();
|
|
76
75
|
}
|
|
@@ -88,7 +87,7 @@
|
|
|
88
87
|
}
|
|
89
88
|
|
|
90
89
|
.@{ant-prefix}-form-item {
|
|
91
|
-
margin-bottom: calc(var(--zaui-space-size-md; 16px) * var(--zaui-size; 1))
|
|
90
|
+
margin-bottom: calc(var(--zaui-space-size-md; 16px) * var(--zaui-size; 1));
|
|
92
91
|
}
|
|
93
92
|
}
|
|
94
93
|
|
|
@@ -104,6 +103,10 @@
|
|
|
104
103
|
|
|
105
104
|
// ant-table
|
|
106
105
|
.@{ant-prefix}-table {
|
|
106
|
+
|
|
107
|
+
.@{ant-prefix}-table-row.@{ant-prefix}-table-row-selected >.@{ant-prefix}-table-cell-row-hover{
|
|
108
|
+
background-color: #e6f4ff !important;
|
|
109
|
+
}
|
|
107
110
|
.@{ant-prefix}-empty-normal {
|
|
108
111
|
margin: calc(var(--zaui-space-size-lg; 32px) * var(--zaui-size; 1)) 0;
|
|
109
112
|
}
|
|
@@ -165,7 +168,7 @@
|
|
|
165
168
|
}
|
|
166
169
|
|
|
167
170
|
tr.@{ant-prefix}-table-row:hover td {
|
|
168
|
-
background-color: @zaui-table-hover-bg
|
|
171
|
+
background-color: @zaui-table-hover-bg;
|
|
169
172
|
}
|
|
170
173
|
|
|
171
174
|
& > tr > td {
|
|
@@ -303,7 +306,7 @@
|
|
|
303
306
|
}
|
|
304
307
|
|
|
305
308
|
.@{ant-prefix}-table-row:nth-child(odd) {
|
|
306
|
-
background-color: @zaui-table-strip-bg
|
|
309
|
+
background-color: @zaui-table-strip-bg;
|
|
307
310
|
|
|
308
311
|
& td {
|
|
309
312
|
background-color: @zaui-table-strip-bg !important;
|
|
@@ -334,6 +337,12 @@
|
|
|
334
337
|
}
|
|
335
338
|
}
|
|
336
339
|
|
|
340
|
+
&.@{ant-prefix}-table-tbody-virtual {
|
|
341
|
+
.@{ant-prefix}-table-row:nth-child(odd),.@{ant-prefix}-table-row:nth-child(even) {
|
|
342
|
+
background-color: transparent !important;
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
|
|
337
346
|
.@{ant-prefix}-table-row:nth-child(odd) {
|
|
338
347
|
background-color: @zaui-table-strip-bg;
|
|
339
348
|
|
|
@@ -342,6 +351,8 @@
|
|
|
342
351
|
}
|
|
343
352
|
}
|
|
344
353
|
}
|
|
354
|
+
|
|
355
|
+
|
|
345
356
|
}
|
|
346
357
|
}
|
|
347
358
|
|
|
@@ -412,7 +423,7 @@
|
|
|
412
423
|
&.@{ant-prefix}-btn-link[disabled]:hover,
|
|
413
424
|
&.@{ant-prefix}-btn-link[disabled]:focus,
|
|
414
425
|
&.@{ant-prefix}-btn-link[disabled]:active {
|
|
415
|
-
color: @zat-disabled-color;
|
|
426
|
+
color: @zat-disabled-color !important;
|
|
416
427
|
text-shadow: none;
|
|
417
428
|
background: none;
|
|
418
429
|
border-color: none;
|
|
@@ -421,7 +432,12 @@
|
|
|
421
432
|
}
|
|
422
433
|
|
|
423
434
|
&.@{ant-prefix}-btn-link {
|
|
424
|
-
.set-brand-color();
|
|
435
|
+
.set-brand-color() !important;
|
|
436
|
+
background: none !important;
|
|
437
|
+
box-shadow: none !important;
|
|
438
|
+
&:hover {
|
|
439
|
+
color: @zaui-brand !important;
|
|
440
|
+
}
|
|
425
441
|
}
|
|
426
442
|
}
|
|
427
443
|
|
|
@@ -656,35 +672,6 @@
|
|
|
656
672
|
width: 100%;
|
|
657
673
|
}
|
|
658
674
|
|
|
659
|
-
.@{ant-prefix}-input-textarea {
|
|
660
|
-
position: relative;
|
|
661
|
-
|
|
662
|
-
textarea.@{ant-prefix}-input {
|
|
663
|
-
padding-bottom: 20px;
|
|
664
|
-
}
|
|
665
|
-
|
|
666
|
-
&.@{ant-prefix}-input-textarea-show-count.@{ant-prefix}-input-textarea-in-form-item {
|
|
667
|
-
&::after {
|
|
668
|
-
background: transparent;
|
|
669
|
-
}
|
|
670
|
-
|
|
671
|
-
&.disabled {
|
|
672
|
-
&::after {
|
|
673
|
-
background: #f2f2f2;
|
|
674
|
-
}
|
|
675
|
-
}
|
|
676
|
-
|
|
677
|
-
&::after {
|
|
678
|
-
position: absolute;
|
|
679
|
-
right: 16px;
|
|
680
|
-
bottom: 1px;
|
|
681
|
-
width: calc(100% - 18px);
|
|
682
|
-
margin-bottom: 0;
|
|
683
|
-
text-align: right;
|
|
684
|
-
}
|
|
685
|
-
}
|
|
686
|
-
}
|
|
687
|
-
|
|
688
675
|
// 间隔
|
|
689
676
|
.@{ant-prefix}-space {
|
|
690
677
|
&.@{ant-prefix}-space-vertical {
|
|
@@ -725,6 +712,16 @@
|
|
|
725
712
|
|
|
726
713
|
// tooltip样式重载
|
|
727
714
|
.@{ant-prefix}-tooltip {
|
|
715
|
+
> .@{ant-prefix}-tooltip-arrow {
|
|
716
|
+
&::before,
|
|
717
|
+
&::after {
|
|
718
|
+
background: linear-gradient(
|
|
719
|
+
to right bottom,
|
|
720
|
+
rgba(255, 255, 255, 0.95),
|
|
721
|
+
rgba(255, 255, 255, 1)
|
|
722
|
+
);
|
|
723
|
+
}
|
|
724
|
+
}
|
|
728
725
|
> .@{ant-prefix}-tooltip-content {
|
|
729
726
|
> .@{ant-prefix}-tooltip-inner {
|
|
730
727
|
max-height: 360px;
|
|
@@ -736,24 +733,15 @@
|
|
|
736
733
|
0 9px 28px 8px rgba(0, 0, 0, 0.05);
|
|
737
734
|
&::selection {
|
|
738
735
|
color: inherit !important;
|
|
739
|
-
background: rgba(
|
|
736
|
+
background: rgba(0, 106, 255, 0.3) !important;
|
|
740
737
|
}
|
|
741
738
|
> div {
|
|
742
739
|
&::selection {
|
|
743
740
|
color: inherit !important;
|
|
744
|
-
background: rgba(
|
|
741
|
+
background: rgba(0, 106, 255, 0.3) !important;
|
|
745
742
|
}
|
|
746
743
|
}
|
|
747
744
|
}
|
|
748
|
-
> .@{ant-prefix}-tooltip-arrow {
|
|
749
|
-
> .@{ant-prefix}-tooltip-arrow-content {
|
|
750
|
-
--antd-arrow-background-color: linear-gradient(
|
|
751
|
-
to right bottom,
|
|
752
|
-
rgba(255, 255, 255, 0.95),
|
|
753
|
-
rgba(255, 255, 255, 1)
|
|
754
|
-
);
|
|
755
|
-
}
|
|
756
|
-
}
|
|
757
745
|
}
|
|
758
746
|
}
|
|
759
747
|
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
@ant-prefix: ant;
|
|
2
|
+
@import '../core/index.less';
|
|
3
|
+
@import './tokens.less';
|
|
4
|
+
|
|
5
|
+
/* 兼容IE11 默认会生成2个值,默认值,var值。IE11下读取默认值 */
|
|
6
|
+
:root {
|
|
7
|
+
--zaui-global-bg : #ffffff;
|
|
8
|
+
--zaui-base-bg : #ffffff;
|
|
9
|
+
--zaui-brand : #006aff;
|
|
10
|
+
--zaui-brand-hover : #3387ff;
|
|
11
|
+
--zaui-brand-active : #005ad9;
|
|
12
|
+
--zaui-brand-disabled : color-mix(in srgb, var(--zaui-brand) 70%, white);
|
|
13
|
+
--zaui-text : #343434;
|
|
14
|
+
--zaui-text-weak : #616161;
|
|
15
|
+
--zaui-aide-text : #909090;
|
|
16
|
+
--zaui-placeholder : #a0a0a0;
|
|
17
|
+
--zaui-link : var(--zaui-brand);
|
|
18
|
+
--zaui-link-light-active : var(--zaui-brand-active);
|
|
19
|
+
--zaui-line : #dcdcdc;
|
|
20
|
+
--zaui-dividing-line : #dcdcdc;
|
|
21
|
+
--zaui-area : #fafafa;
|
|
22
|
+
--zaui-shadow : rgba(56, 56, 56, 0.15);
|
|
23
|
+
--zaui-form-control-line : var(--zaui-line);
|
|
24
|
+
--zaui-form-control-line-hover : var(--zaui-brand-hover);
|
|
25
|
+
--zaui-form-control-line-active : var(--zaui-brand-active);
|
|
26
|
+
--zaui-list-item-active-bg : var(--zaui-brand);
|
|
27
|
+
--zaui-list-item-active-hover-bg : var(--zaui-brand);
|
|
28
|
+
--zaui-list-item-selected-bg : var(--zaui-brand);
|
|
29
|
+
--zaui-list-item-selected-hover-bg: var(--zaui-brand);
|
|
30
|
+
--zaui-disabled-bg : #f2f2f2;
|
|
31
|
+
--zaui-disabled-text : #333333;
|
|
32
|
+
--zaui-feedback-overlay-bg : rgba(0, 0, 0, 0.7);
|
|
33
|
+
--zaui-feedback-overlay-text : #343434;
|
|
34
|
+
--zaui-primary : var(--zaui-brand);
|
|
35
|
+
--zaui-primary-hover : var(--zaui-brand-hover);
|
|
36
|
+
--zaui-primary-active : var(--zaui-brand-active);
|
|
37
|
+
--zaui-danger-line : var(--zaui-line);
|
|
38
|
+
--zaui-danger-bg : #fff2f0;
|
|
39
|
+
--zaui-warning-line : var(--zaui-line);
|
|
40
|
+
--zaui-warning-bg : #fffbe6;
|
|
41
|
+
--zaui-info-line : var(--zaui-line);
|
|
42
|
+
--zaui-info-bg : #e6f7ff;
|
|
43
|
+
--zaui-success-line : var(--zaui-line);
|
|
44
|
+
--zaui-success-bg : #f6ffed;
|
|
45
|
+
--zaui-danger : #ff5050;
|
|
46
|
+
--zaui-warning : #ec9131;
|
|
47
|
+
--zaui-success : #00ae4d;
|
|
48
|
+
--zaui-menu-top-bg : #ffffff;
|
|
49
|
+
--zaui-menu-left-bg : #1a202d;
|
|
50
|
+
--zaui-menu-second-bg : #ffffff;
|
|
51
|
+
--zaui-form-align : left;
|
|
52
|
+
--zaui-table-header-bg : #f2f3f5;
|
|
53
|
+
--zaui-table-strip-bg : #fafafa;
|
|
54
|
+
--zaui-table-hover-bg : #fafafa;
|
|
55
|
+
--zaui-table-selected-bg : var(--zaui-table-hover-bg); // 默认同悬停
|
|
56
|
+
--zaui-table-selected-hover-bg : var(--zaui-table-hover-bg); // 默认同悬停
|
|
57
|
+
--zaui-table-nested-bg : #fafcfe;
|
|
58
|
+
--zaui-contract-bg : #fffaa1; // 对比背景色
|
|
59
|
+
--zaui-contract-bg-add : #d2fff4; // 新增对比背景色
|
|
60
|
+
--zaui-form-label-width : 130px; // 8个全角字符宽度
|
|
61
|
+
--zaui-border-radius : 8px;
|
|
62
|
+
--zaui-border-radius-card : 4px;
|
|
63
|
+
--zaui-font-size-title : 16px;
|
|
64
|
+
--zaui-font-size-card-title : var(--zaui-font-size-title);
|
|
65
|
+
--zaui-font-size : 14px;
|
|
66
|
+
--zaui-font-size-sm : 12px;
|
|
67
|
+
--zaui-font-size-md : var(--zaui-font-size);
|
|
68
|
+
--zaui-font-size-lg : 16px;
|
|
69
|
+
--zaui-font-size-xl : 18px;
|
|
70
|
+
--zaui-font-size-xxl : 20px;
|
|
71
|
+
--zaui-font-size-lg-title : 24px;
|
|
72
|
+
--zaui-height-border : var(--zaui-height-size-md);
|
|
73
|
+
--zaui-height-card : var(--zaui-height-size-lg);
|
|
74
|
+
--zaui-height-size-xs : 4px;
|
|
75
|
+
--zaui-height-size-sm : 8px;
|
|
76
|
+
--zaui-height-size-md : 16px;
|
|
77
|
+
--zaui-height-size-lg : 32px;
|
|
78
|
+
--zaui-height-size-xl : 64px;
|
|
79
|
+
--zaui-space-border : var(--zaui-space-size-md); // 兼容1.1.35一下版本 变量
|
|
80
|
+
--zaui-space-card : var(--zaui-space-size-lg);
|
|
81
|
+
--zaui-space-size-xs : 4px;
|
|
82
|
+
--zaui-space-size-sm : 8px;
|
|
83
|
+
--zaui-space-size-md : 16px;
|
|
84
|
+
--zaui-space-size-lg : 32px;
|
|
85
|
+
--zaui-space-size-xl : 64px;
|
|
86
|
+
|
|
87
|
+
--zaui-line-height-base: 1.5;
|
|
88
|
+
--zaui-size : 1;
|
|
89
|
+
--zaui-base-font-size : 0px;
|
|
90
|
+
}
|
|
@@ -1,89 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
@import './
|
|
3
|
-
|
|
4
|
-
/* 兼容IE11 默认会生成2个值,默认值,var值。IE11下读取默认值 */
|
|
5
|
-
:root {
|
|
6
|
-
--zaui-global-bg : #ffffff;
|
|
7
|
-
--zaui-base-bg : #ffffff;
|
|
8
|
-
--zaui-brand : #006aff;
|
|
9
|
-
--zaui-brand-hover : #3387ff;
|
|
10
|
-
--zaui-brand-active : #005ad9;
|
|
11
|
-
--zaui-brand-disabled : color-mix(in srgb, var(--zaui-brand) 70%, white);
|
|
12
|
-
--zaui-text : #343434;
|
|
13
|
-
--zaui-text-weak : #616161;
|
|
14
|
-
--zaui-aide-text : #909090;
|
|
15
|
-
--zaui-placeholder : #a0a0a0;
|
|
16
|
-
--zaui-link : var(--zaui-brand);
|
|
17
|
-
--zaui-link-light-active : var(--zaui-brand-active);
|
|
18
|
-
--zaui-line : #dcdcdc;
|
|
19
|
-
--zaui-dividing-line : #dcdcdc;
|
|
20
|
-
--zaui-area : #fafafa;
|
|
21
|
-
--zaui-shadow : rgba(56, 56, 56, 0.15);
|
|
22
|
-
--zaui-form-control-line : var(--zaui-line);
|
|
23
|
-
--zaui-form-control-line-hover : var(--zaui-brand-hover);
|
|
24
|
-
--zaui-form-control-line-active : var(--zaui-brand-active);
|
|
25
|
-
--zaui-list-item-active-bg : var(--zaui-brand);
|
|
26
|
-
--zaui-list-item-active-hover-bg : var(--zaui-brand);
|
|
27
|
-
--zaui-list-item-selected-bg : var(--zaui-brand);
|
|
28
|
-
--zaui-list-item-selected-hover-bg: var(--zaui-brand);
|
|
29
|
-
--zaui-disabled-bg : #f2f2f2;
|
|
30
|
-
--zaui-disabled-text : #333333;
|
|
31
|
-
--zaui-feedback-overlay-bg : rgba(0, 0, 0, 0.7);
|
|
32
|
-
--zaui-feedback-overlay-text : #343434;
|
|
33
|
-
--zaui-primary : var(--zaui-brand);
|
|
34
|
-
--zaui-primary-hover : var(--zaui-brand-hover);
|
|
35
|
-
--zaui-primary-active : var(--zaui-brand-active);
|
|
36
|
-
--zaui-danger-line : var(--zaui-line);
|
|
37
|
-
--zaui-danger-bg : #fff2f0;
|
|
38
|
-
--zaui-warning-line : var(--zaui-line);
|
|
39
|
-
--zaui-warning-bg : #fffbe6;
|
|
40
|
-
--zaui-info-line : var(--zaui-line);
|
|
41
|
-
--zaui-info-bg : #e6f7ff;
|
|
42
|
-
--zaui-success-line : var(--zaui-line);
|
|
43
|
-
--zaui-success-bg : #f6ffed;
|
|
44
|
-
--zaui-danger : #ff5050;
|
|
45
|
-
--zaui-warning : #ec9131;
|
|
46
|
-
--zaui-success : #00ae4d;
|
|
47
|
-
--zaui-menu-top-bg : #ffffff;
|
|
48
|
-
--zaui-menu-left-bg : #1a202d;
|
|
49
|
-
--zaui-menu-second-bg : #ffffff;
|
|
50
|
-
--zaui-form-align : left;
|
|
51
|
-
--zaui-table-header-bg : #f2f3f5;
|
|
52
|
-
--zaui-table-strip-bg : #fafafa;
|
|
53
|
-
--zaui-table-hover-bg : #fafafa;
|
|
54
|
-
--zaui-table-selected-bg : var(--zaui-table-hover-bg); // 默认同悬停
|
|
55
|
-
--zaui-table-selected-hover-bg : var(--zaui-table-hover-bg); // 默认同悬停
|
|
56
|
-
--zaui-table-nested-bg : #fafcfe;
|
|
57
|
-
--zaui-contract-bg : #fffaa1; // 对比背景色
|
|
58
|
-
--zaui-contract-bg-add : #d2fff4; // 新增对比背景色
|
|
59
|
-
--zaui-form-label-width : 130px; // 8个全角字符宽度
|
|
60
|
-
--zaui-border-radius : 8px;
|
|
61
|
-
--zaui-border-radius-card : 4px;
|
|
62
|
-
--zaui-font-size-title : 16px;
|
|
63
|
-
--zaui-font-size-card-title : var(--zaui-font-size-title);
|
|
64
|
-
--zaui-font-size : 14px;
|
|
65
|
-
--zaui-font-size-sm : 12px;
|
|
66
|
-
--zaui-font-size-md : var(--zaui-font-size);
|
|
67
|
-
--zaui-font-size-lg : 16px;
|
|
68
|
-
--zaui-font-size-xl : 18px;
|
|
69
|
-
--zaui-font-size-xxl : 20px;
|
|
70
|
-
--zaui-font-size-lg-title : 24px;
|
|
71
|
-
--zaui-height-border : var(--zaui-height-size-md);
|
|
72
|
-
--zaui-height-card : var(--zaui-height-size-lg);
|
|
73
|
-
--zaui-height-size-xs : 4px;
|
|
74
|
-
--zaui-height-size-sm : 8px;
|
|
75
|
-
--zaui-height-size-md : 16px;
|
|
76
|
-
--zaui-height-size-lg : 32px;
|
|
77
|
-
--zaui-height-size-xl : 64px;
|
|
78
|
-
--zaui-space-border : var(--zaui-space-size-md); // 兼容1.1.35一下版本 变量
|
|
79
|
-
--zaui-space-card : var(--zaui-space-size-lg);
|
|
80
|
-
--zaui-space-size-xs : 4px;
|
|
81
|
-
--zaui-space-size-sm : 8px;
|
|
82
|
-
--zaui-space-size-md : 16px;
|
|
83
|
-
--zaui-space-size-lg : 32px;
|
|
84
|
-
--zaui-space-size-xl : 64px;
|
|
85
|
-
|
|
86
|
-
--zaui-line-height-base: 1.5;
|
|
87
|
-
--zaui-size : 1;
|
|
88
|
-
--zaui-base-font-size : 0px;
|
|
89
|
-
}
|
|
1
|
+
// 引用基础主题文件,避免重复
|
|
2
|
+
@import './base.less';
|
package/es/utils/index.d.ts
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
export declare const customEqualForFunction: (value: any, other: any) => boolean;
|
|
2
|
+
/**
|
|
3
|
+
* 兼容 React17/18 的 startTransition。
|
|
4
|
+
* - React18+: 使用原生 startTransition
|
|
5
|
+
* - React17 : 直接执行回调
|
|
6
|
+
*/
|
|
7
|
+
export declare function compatStartTransition(cb: () => void): void;
|
|
1
8
|
/**
|
|
2
9
|
* 判断一个值是否是空值
|
|
3
10
|
* 空值 或者 仅包含空值的数组视为空
|
package/es/utils/index.js
CHANGED
|
@@ -1,7 +1,43 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
2
|
-
import { useEffect, useState } from 'react';
|
|
2
|
+
import React, { useEffect, useState } from 'react';
|
|
3
|
+
import { isFunction } from 'lodash';
|
|
3
4
|
var EMPTY_VALUE = [undefined, null, ''];
|
|
4
5
|
|
|
6
|
+
// 自定义深比对 如果两边都是函数类型则认为相等
|
|
7
|
+
// 对于 React 元素,不直接认为相等,而是让 lodash 继续进行深度比较
|
|
8
|
+
export var customEqualForFunction = (value, other) => {
|
|
9
|
+
// 只有当两边都是函数时才认为相等
|
|
10
|
+
if (isFunction(value) && isFunction(other)) {
|
|
11
|
+
return true;
|
|
12
|
+
}
|
|
13
|
+
// 对于 React 元素,返回 undefined 让 isEqualWith 继续使用默认比较逻辑
|
|
14
|
+
// 这样会比较 React 元素的 type、props 等属性
|
|
15
|
+
if ( /*#__PURE__*/React.isValidElement(value) && /*#__PURE__*/React.isValidElement(other)) {
|
|
16
|
+
// 比较 React 元素的类型和关键 props
|
|
17
|
+
if (value.type !== other.type) {
|
|
18
|
+
return false;
|
|
19
|
+
}
|
|
20
|
+
// 对于相同类型的 React 元素,返回 undefined 让 isEqualWith 继续深度比较 props
|
|
21
|
+
return undefined;
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* 兼容 React17/18 的 startTransition。
|
|
27
|
+
* - React18+: 使用原生 startTransition
|
|
28
|
+
* - React17 : 直接执行回调
|
|
29
|
+
*/
|
|
30
|
+
export function compatStartTransition(cb) {
|
|
31
|
+
var maybeStartTransition = React.startTransition;
|
|
32
|
+
if (typeof maybeStartTransition === 'function') {
|
|
33
|
+
// React 18+
|
|
34
|
+
maybeStartTransition(cb);
|
|
35
|
+
} else {
|
|
36
|
+
// React 17 及以下
|
|
37
|
+
cb();
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
5
41
|
/**
|
|
6
42
|
* 判断一个值是否是空值
|
|
7
43
|
* 空值 或者 仅包含空值的数组视为空
|
|
@@ -11,5 +11,8 @@ export declare const FormsContext: React.Context<Forms>;
|
|
|
11
11
|
export declare const useForms: () => Forms;
|
|
12
12
|
/** 获取所有表单实例 */
|
|
13
13
|
export declare const useContextForms: () => Forms;
|
|
14
|
-
|
|
14
|
+
interface FormsProviderProps {
|
|
15
|
+
children?: React.ReactNode;
|
|
16
|
+
}
|
|
17
|
+
declare const FormsProvider: React.FC<FormsProviderProps>;
|
|
15
18
|
export default FormsProvider;
|
|
@@ -6,15 +6,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
require("./index.less");
|
|
8
8
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
9
|
-
/*
|
|
10
|
-
* @Author: za-xuwenli xuwenli@zhongan.io
|
|
11
|
-
* @Date: 2025-02-17 11:49:02
|
|
12
|
-
* @LastEditors: za-xuwenli xuwenli@zhongan.io
|
|
13
|
-
* @LastEditTime: 2025-05-29 13:55:34
|
|
14
|
-
* @FilePath: /zat-wjs-pro-product-web/src/components/CheckModalContent/index.tsx
|
|
15
|
-
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
|
16
|
-
*/
|
|
17
|
-
|
|
18
9
|
var CheckModalContent = props => {
|
|
19
10
|
var _ref = props !== null && props !== void 0 ? props : {},
|
|
20
11
|
errorTitle = _ref.errorTitle,
|
package/lib/ProAction/index.js
CHANGED
|
@@ -6,15 +6,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
8
|
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
9
|
-
require("antd/es/popconfirm/style");
|
|
10
|
-
var _popconfirm = _interopRequireDefault(require("antd/es/popconfirm"));
|
|
11
9
|
var _regeneratorRuntime2 = _interopRequireDefault(require("@babel/runtime/helpers/regeneratorRuntime"));
|
|
12
10
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
13
|
-
require("antd/es/form/style");
|
|
14
|
-
var _form = _interopRequireDefault(require("antd/es/form"));
|
|
15
11
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
16
12
|
var _react = _interopRequireDefault(require("react"));
|
|
17
13
|
var _ahooks = require("ahooks");
|
|
14
|
+
var _antd = require("antd");
|
|
18
15
|
var _lodash = require("lodash");
|
|
19
16
|
var _CheckModalContent = _interopRequireDefault(require("./components/CheckModalContent"));
|
|
20
17
|
var _index = require("../index");
|
|
@@ -25,7 +22,7 @@ var ProAction = props => {
|
|
|
25
22
|
var _config$, _config$2, _locale$ProAction2, _config$index;
|
|
26
23
|
var children = props.children,
|
|
27
24
|
config = props.config;
|
|
28
|
-
var _Form$useForm =
|
|
25
|
+
var _Form$useForm = _antd.Form.useForm(),
|
|
29
26
|
_Form$useForm2 = (0, _slicedToArray2.default)(_Form$useForm, 1),
|
|
30
27
|
form = _Form$useForm2[0];
|
|
31
28
|
var _useSetState = (0, _ahooks.useSetState)({
|
|
@@ -196,7 +193,7 @@ var ProAction = props => {
|
|
|
196
193
|
return TargetComponent;
|
|
197
194
|
};
|
|
198
195
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
199
|
-
children: [((_config$ = config[0]) === null || _config$ === void 0 ? void 0 : _config$.mode) === 'confirm' ? /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
196
|
+
children: [((_config$ = config[0]) === null || _config$ === void 0 ? void 0 : _config$.mode) === 'confirm' ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.Popconfirm, {
|
|
200
197
|
onConfirm: () => onActionRun(0, []),
|
|
201
198
|
title: ((_config$2 = config[0]) === null || _config$2 === void 0 ? void 0 : _config$2.title) || (_locale.default === null || _locale.default === void 0 || (_locale$ProAction2 = _locale.default.ProAction) === null || _locale$ProAction2 === void 0 ? void 0 : _locale$ProAction2.defaultTitle),
|
|
202
199
|
children: children
|
package/lib/ProAction/index.less
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { FC } from 'react';
|
|
2
2
|
import { FormInstance } from 'antd';
|
|
3
|
-
import '
|
|
3
|
+
import 'dayjs/locale/zh-cn';
|
|
4
4
|
import type { PropSelectType } from '../ProSelect/propsType';
|
|
5
5
|
import type { ProModalSelectType } from '../ProForm/components/combination/ProModalSelect/propsType';
|
|
6
6
|
import type { ProCascaderType } from '../ProForm/components/combination/ProCascader/propsType';
|
|
@@ -21,14 +21,31 @@ interface ConfigContext {
|
|
|
21
21
|
export declare const ProConfigContext: React.Context<ConfigContext>;
|
|
22
22
|
export declare function useProConfig(): ConfigContext;
|
|
23
23
|
export declare function useProConfig(name: keyof ConfigContext['state']): ConfigContext['state'][keyof ConfigContext['state']];
|
|
24
|
-
type
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
type Actions = {
|
|
25
|
+
type: 'setFormRef';
|
|
26
|
+
name: string;
|
|
27
|
+
value: FormInstance;
|
|
28
|
+
} | {
|
|
29
|
+
type: 'deleteFormRef';
|
|
30
|
+
name: string;
|
|
31
|
+
} | {
|
|
32
|
+
type: 'set';
|
|
33
|
+
payload: ProConfigState;
|
|
34
|
+
} | {
|
|
35
|
+
type: 'setProEnum';
|
|
36
|
+
payload: Record<string, any>;
|
|
37
|
+
} | {
|
|
38
|
+
type: 'setProEnumDic';
|
|
39
|
+
key: string;
|
|
27
40
|
payload: any;
|
|
28
|
-
}
|
|
41
|
+
} | {
|
|
42
|
+
type: 'setWithLocal';
|
|
43
|
+
payload: ProConfigState;
|
|
44
|
+
};
|
|
29
45
|
export declare const ProConfigProvider: FC<{
|
|
30
46
|
value?: ProConfigState;
|
|
31
47
|
locale?: string;
|
|
32
48
|
onSuccess?: (data: any, params: any) => void;
|
|
49
|
+
children?: React.ReactNode;
|
|
33
50
|
}>;
|
|
34
51
|
export default ProConfigProvider;
|
|
@@ -7,18 +7,18 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
});
|
|
8
8
|
exports.default = exports.ProConfigProvider = exports.ProConfigContext = void 0;
|
|
9
9
|
exports.useProConfig = useProConfig;
|
|
10
|
-
require("antd/es/config-provider/style");
|
|
11
|
-
var _configProvider = _interopRequireDefault(require("antd/es/config-provider"));
|
|
12
10
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
13
11
|
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
14
12
|
var _react = _interopRequireWildcard(require("react"));
|
|
13
|
+
var _antd = require("antd");
|
|
15
14
|
var _zh_CN = _interopRequireDefault(require("antd/es/locale/zh_CN"));
|
|
16
15
|
var _en_US = _interopRequireDefault(require("antd/es/locale/en_US"));
|
|
17
|
-
require("
|
|
16
|
+
require("dayjs/locale/zh-cn");
|
|
18
17
|
var _merge = _interopRequireDefault(require("lodash/merge"));
|
|
19
18
|
var _useEnumRequest = _interopRequireDefault(require("../ProEnum/hooks/useEnumRequest"));
|
|
20
19
|
var _useFrequentEnumRequest = _interopRequireDefault(require("../ProEnum/hooks/useFrequentEnumRequest"));
|
|
21
20
|
var _locale = require("../locale");
|
|
21
|
+
var _ThemeContext = require("../ProThemeTools/context/ThemeContext");
|
|
22
22
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
23
23
|
var initialState = {
|
|
24
24
|
ProEnum: {
|
|
@@ -46,25 +46,34 @@ var ProConfigContext = exports.ProConfigContext = /*#__PURE__*/_react.default.cr
|
|
|
46
46
|
|
|
47
47
|
// eslint-disable-next-line no-redeclare
|
|
48
48
|
function useProConfig(name) {
|
|
49
|
-
var
|
|
50
|
-
|
|
49
|
+
var _useContext = (0, _react.useContext)(ProConfigContext),
|
|
50
|
+
state = _useContext.state,
|
|
51
|
+
dispatch = _useContext.dispatch;
|
|
52
|
+
if (name) {
|
|
53
|
+
return state[name];
|
|
54
|
+
}
|
|
55
|
+
return {
|
|
56
|
+
state,
|
|
57
|
+
dispatch
|
|
58
|
+
};
|
|
51
59
|
}
|
|
52
|
-
var antdLangMap = {
|
|
53
|
-
'zh-CN': _zh_CN.default,
|
|
54
|
-
// zh-CN 中文
|
|
55
|
-
'en-US': _en_US.default // en-US
|
|
56
|
-
};
|
|
57
60
|
var reducer = (state, action) => {
|
|
58
61
|
var _state$ProEnum;
|
|
59
62
|
switch (action.type) {
|
|
63
|
+
case 'setFormRef':
|
|
64
|
+
return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, state), {}, {
|
|
65
|
+
forms: (0, _objectSpread2.default)((0, _objectSpread2.default)({}, state.forms), {}, {
|
|
66
|
+
[action.name]: action.value
|
|
67
|
+
})
|
|
68
|
+
});
|
|
69
|
+
case 'deleteFormRef':
|
|
70
|
+
return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, state), {}, {
|
|
71
|
+
forms: (0, _objectSpread2.default)((0, _objectSpread2.default)({}, state.forms), {}, {
|
|
72
|
+
[action.name]: undefined
|
|
73
|
+
})
|
|
74
|
+
});
|
|
60
75
|
case 'set':
|
|
61
76
|
return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, state), action.payload);
|
|
62
|
-
// 设置的值会被存入localStorage
|
|
63
|
-
case 'setWithLocal':
|
|
64
|
-
{
|
|
65
|
-
var _state = (0, _merge.default)({}, state, action.payload);
|
|
66
|
-
return _state;
|
|
67
|
-
}
|
|
68
77
|
case 'setProEnum':
|
|
69
78
|
return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, state), {}, {
|
|
70
79
|
ProEnum: (0, _objectSpread2.default)((0, _objectSpread2.default)({}, state.ProEnum), action.payload)
|
|
@@ -75,10 +84,29 @@ var reducer = (state, action) => {
|
|
|
75
84
|
dics: (0, _objectSpread2.default)((0, _objectSpread2.default)({}, ((_state$ProEnum = state.ProEnum) === null || _state$ProEnum === void 0 ? void 0 : _state$ProEnum.dataSource) || {}), action.payload)
|
|
76
85
|
})
|
|
77
86
|
});
|
|
87
|
+
case 'setWithLocal':
|
|
88
|
+
// 本地配置合并
|
|
89
|
+
localStorage.setItem('localConfig', JSON.stringify(action.payload));
|
|
90
|
+
return (0, _objectSpread2.default)({}, state);
|
|
78
91
|
default:
|
|
79
92
|
return (0, _objectSpread2.default)({}, state);
|
|
80
93
|
}
|
|
81
94
|
};
|
|
95
|
+
|
|
96
|
+
// 内部组件,用于监听主题变化并应用到 ConfigProvider
|
|
97
|
+
var ThemeAwareConfigProvider = _ref => {
|
|
98
|
+
var locale = _ref.locale,
|
|
99
|
+
children = _ref.children;
|
|
100
|
+
var _useTheme = (0, _ThemeContext.useTheme)(),
|
|
101
|
+
themeState = _useTheme.state;
|
|
102
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.ConfigProvider, {
|
|
103
|
+
locale: locale,
|
|
104
|
+
theme: themeState.antdConfig,
|
|
105
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
106
|
+
children: children
|
|
107
|
+
})
|
|
108
|
+
});
|
|
109
|
+
};
|
|
82
110
|
var ProConfigProvider = props => {
|
|
83
111
|
var _props$value, _props$value2, _props$value3, _props$value4;
|
|
84
112
|
var _useReducer = (0, _react.useReducer)(reducer, initialState),
|
|
@@ -102,28 +130,32 @@ var ProConfigProvider = props => {
|
|
|
102
130
|
// 如果是用户切换了语言那么优先使用用户切换的,否则从缓存中取用户语言,在取默认值
|
|
103
131
|
var lang = (state === null || state === void 0 ? void 0 : state.locale) || cacheLang || (props === null || props === void 0 ? void 0 : props.locale);
|
|
104
132
|
(0, _react.useEffect)(() => {
|
|
105
|
-
|
|
133
|
+
(0, _locale.setLanguage)(lang);
|
|
106
134
|
}, [lang]);
|
|
107
135
|
(0, _react.useEffect)(() => {
|
|
108
136
|
if (enumRes !== null && enumRes !== void 0 && enumRes.data) {
|
|
109
137
|
(props === null || props === void 0 ? void 0 : props.onSuccess) && (props === null || props === void 0 ? void 0 : props.onSuccess(enumRes === null || enumRes === void 0 ? void 0 : enumRes.data, enumRes === null || enumRes === void 0 ? void 0 : enumRes.params));
|
|
110
138
|
}
|
|
111
139
|
}, [enumRes === null || enumRes === void 0 ? void 0 : enumRes.loading]);
|
|
112
|
-
|
|
140
|
+
var antdLangMap = {
|
|
141
|
+
'zh-CN': _zh_CN.default,
|
|
142
|
+
// zh-CN 中文
|
|
143
|
+
'en-US': _en_US.default // en-US
|
|
144
|
+
};
|
|
113
145
|
// 处理频繁枚举的成功回调
|
|
114
146
|
(0, _react.useEffect)(() => {
|
|
115
147
|
if (frequentEnumRes !== null && frequentEnumRes !== void 0 && frequentEnumRes.data) {
|
|
116
148
|
(props === null || props === void 0 ? void 0 : props.onSuccess) && (props === null || props === void 0 ? void 0 : props.onSuccess(frequentEnumRes === null || frequentEnumRes === void 0 ? void 0 : frequentEnumRes.data, frequentEnumRes === null || frequentEnumRes === void 0 ? void 0 : frequentEnumRes.params));
|
|
117
149
|
}
|
|
118
150
|
}, [frequentEnumRes === null || frequentEnumRes === void 0 ? void 0 : frequentEnumRes.loading]);
|
|
119
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
151
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ThemeContext.ThemeProvider, {
|
|
152
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(ProConfigContext.Provider, {
|
|
153
|
+
value: {
|
|
154
|
+
state: (0, _merge.default)(state, props.value),
|
|
155
|
+
dispatch
|
|
156
|
+
},
|
|
157
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(ThemeAwareConfigProvider, {
|
|
158
|
+
locale: antdLangMap[lang],
|
|
127
159
|
children: props.children
|
|
128
160
|
})
|
|
129
161
|
})
|