@zat-design/sisyphus-react 3.14.0-beta.1 → 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/ProLayout/utils/index.js +8 -5
- 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/ProLayout/utils/index.js +8 -5
- 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/README.md
CHANGED
|
@@ -1,205 +1,70 @@
|
|
|
1
|
-
|
|
1
|
+
[西西弗组件库预览地址](https://procomponents.zhongan.tech)
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## 快速上手
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
西西弗基于 antd@4 版本开发
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
- **官方文档**: https://procomponents.zhongan.tech
|
|
9
|
-
- **许可证**: MIT
|
|
7
|
+
### 安装
|
|
10
8
|
|
|
11
|
-
|
|
9
|
+
npm 或 yarn 安装
|
|
12
10
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
- **开发语言**: TypeScript 4.9.5
|
|
17
|
-
- **构建工具**: Father Build + Dumi
|
|
18
|
-
- **测试框架**: Jest + React Testing Library
|
|
19
|
-
- **样式方案**: Less + CSS Modules
|
|
11
|
+
```
|
|
12
|
+
# npm
|
|
13
|
+
$ npm install @zat-design/sisyphus-react --save
|
|
20
14
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
- **提交规范**: Husky + Commitlint
|
|
25
|
-
- **包管理**: npm/yarn
|
|
26
|
-
- **CI/CD**: GitHub Actions
|
|
15
|
+
# yarn
|
|
16
|
+
$ yarn add @zat-design/sisyphus-react
|
|
17
|
+
```
|
|
27
18
|
|
|
28
|
-
###
|
|
29
|
-
- **状态管理**: React Hooks (ahooks 3.8.4)
|
|
30
|
-
- **拖拽排序**: @dnd-kit 系列
|
|
31
|
-
- **工具库**: lodash, moment, big.js
|
|
32
|
-
- **图标**: @ant-design/icons
|
|
33
|
-
- **水印**: @pansy/react-watermark
|
|
19
|
+
### 按需加载
|
|
34
20
|
|
|
35
|
-
|
|
21
|
+
采用 babel-plugin-import 方式
|
|
36
22
|
|
|
37
|
-
### 目录结构
|
|
38
23
|
```
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
│ ├── ProEditTable/ # 可编辑表格
|
|
49
|
-
│ ├── ProIcon/ # 图标组件
|
|
50
|
-
│ ├── ProWaterMark/ # 水印组件
|
|
51
|
-
│ ├── ProThemeTools/ # 主题工具
|
|
52
|
-
│ ├── locale/ # 国际化文件
|
|
53
|
-
│ ├── utils/ # 工具函数
|
|
54
|
-
│ └── index.ts # 主入口文件
|
|
55
|
-
├── docs/ # 文档目录
|
|
56
|
-
│ ├── 组件/ # 组件文档
|
|
57
|
-
│ ├── 文档/ # 使用文档
|
|
58
|
-
│ ├── 官方模板/ # 模板示例
|
|
59
|
-
│ ├── 登录组件/ # 登录组件文档
|
|
60
|
-
│ ├── 通用函数/ # 工具函数文档
|
|
61
|
-
│ └── 更新日志/ # 版本更新记录
|
|
62
|
-
├── tests/ # 测试文件
|
|
63
|
-
├── lib/ # ES5 构建输出
|
|
64
|
-
├── es/ # ES6 构建输出
|
|
65
|
-
└── dist/ # UMD 构建输出
|
|
24
|
+
[
|
|
25
|
+
'babel-plugin-import',
|
|
26
|
+
{
|
|
27
|
+
libraryName: '@zat-design/sisyphus-react',
|
|
28
|
+
camel2DashComponentName:false,
|
|
29
|
+
libraryDirectory: 'es',
|
|
30
|
+
style: false,
|
|
31
|
+
},
|
|
32
|
+
],
|
|
66
33
|
```
|
|
67
34
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
#### 1. 布局组件
|
|
71
|
-
- **ProLayout**: 页面布局框架
|
|
72
|
-
- **ProStep**: 步骤条组件
|
|
73
|
-
- **ProTabs**: 标签页组件
|
|
74
|
-
|
|
75
|
-
#### 2. 数据展示
|
|
76
|
-
- **ProTable**: 高级表格(支持搜索、分页、排序等)
|
|
77
|
-
- **ProTooltip**: 文字提示
|
|
78
|
-
- **ProViewer**: 文件预览器
|
|
79
|
-
|
|
80
|
-
#### 3. 数据录入
|
|
81
|
-
- **ProForm**: 高级表单(配置化表单生成)
|
|
82
|
-
- **ProEditTable**: 可编辑表格
|
|
83
|
-
- **ProDrawerForm**: 抽屉表单
|
|
84
|
-
- **ProEditLabel**: 可编辑标签
|
|
85
|
-
- **ProSelect**: 高级选择器
|
|
86
|
-
- **ProEnum**: 枚举选择器
|
|
87
|
-
- **ProUpload**: 文件上传
|
|
88
|
-
|
|
89
|
-
#### 4. 通用组件
|
|
90
|
-
- **ProIcon**: 图标组件
|
|
91
|
-
- **ProDownload**: 文件下载
|
|
92
|
-
- **ProWaterMark**: 水印组件
|
|
93
|
-
- **ProConfigProvider**: 全局配置
|
|
94
|
-
- **FormsProvider**: 表单提供者
|
|
95
|
-
- **ProThemeTools**: 主题定制工具
|
|
96
|
-
- **ProAction**: 操作按钮组
|
|
97
|
-
|
|
98
|
-
## 功能特性
|
|
99
|
-
|
|
100
|
-
### 核心特性
|
|
101
|
-
1. **配置化开发**: 通过 JSON 配置即可生成复杂的表单和表格
|
|
102
|
-
2. **类型安全**: 完整的 TypeScript 类型定义
|
|
103
|
-
3. **主题定制**: 支持动态主题切换和自定义主题
|
|
104
|
-
4. **国际化**: 支持中英文双语
|
|
105
|
-
5. **按需加载**: 支持 babel-plugin-import 按需引入
|
|
106
|
-
6. **响应式设计**: 适配不同屏幕尺寸
|
|
107
|
-
|
|
108
|
-
### 高级功能
|
|
109
|
-
1. **ProEnum**: 支持频繁枚举请求优化,提供缓存机制
|
|
110
|
-
2. **ProTable**: 内置搜索、分页、排序、导出等功能
|
|
111
|
-
3. **ProForm**: 支持动态表单项、联动校验、自定义组件
|
|
112
|
-
4. **ProEditTable**: 支持行内编辑、批量操作
|
|
113
|
-
5. **ProThemeTools**: 可视化主题编辑器
|
|
114
|
-
6. **ProWaterMark**: 自定义水印保护
|
|
115
|
-
|
|
116
|
-
## 构建配置
|
|
117
|
-
|
|
118
|
-
### 构建输出
|
|
119
|
-
- **lib/**: ES5 + CommonJS 格式,用于服务端渲染和旧版本兼容
|
|
120
|
-
- **es/**: ES6 + ES Modules 格式,用于现代构建工具的 tree-shaking
|
|
121
|
-
- **dist/**: UMD 格式,用于直接在浏览器中引用
|
|
122
|
-
|
|
123
|
-
### 构建脚本
|
|
124
|
-
```bash
|
|
125
|
-
# 完整构建
|
|
126
|
-
npm run build
|
|
127
|
-
|
|
128
|
-
# 分别构建
|
|
129
|
-
npm run build-lib # ES5 + CJS
|
|
130
|
-
npm run build-es # ES6 + ESM
|
|
131
|
-
npm run build-dist # UMD
|
|
132
|
-
|
|
133
|
-
# 开发调试
|
|
134
|
-
npm start # 启动文档开发服务器
|
|
135
|
-
|
|
136
|
-
# 代码检查
|
|
137
|
-
npm run lint # 运行所有检查
|
|
138
|
-
npm run tsc # TypeScript 类型检查
|
|
139
|
-
```
|
|
35
|
+
以下为在 umi 框架下配置按需加载,同时也配置 antd 的按需加载情况下,再配置一个 babel-plugin-import 时需要配置一个别名,可参考下面
|
|
140
36
|
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
### 版本发布
|
|
163
|
-
```bash
|
|
164
|
-
# Beta 版本发布
|
|
165
|
-
npm run release:beta
|
|
166
|
-
|
|
167
|
-
# 正式版本发布
|
|
168
|
-
npm run release
|
|
169
|
-
|
|
170
|
-
# 内网发布
|
|
171
|
-
npm publish --registry https://npm.zhonganinfo.com
|
|
37
|
+
```
|
|
38
|
+
extraBabelPlugins: [
|
|
39
|
+
[
|
|
40
|
+
'babel-plugin-import',
|
|
41
|
+
{
|
|
42
|
+
libraryName: 'antd',
|
|
43
|
+
libraryDirectory: 'es',
|
|
44
|
+
style: true,
|
|
45
|
+
},
|
|
46
|
+
],
|
|
47
|
+
[
|
|
48
|
+
'babel-plugin-import',
|
|
49
|
+
{
|
|
50
|
+
libraryName: '@zat-design/sisyphus-react',
|
|
51
|
+
camel2DashComponentName:false,
|
|
52
|
+
libraryDirectory: 'es',
|
|
53
|
+
style: false,
|
|
54
|
+
},
|
|
55
|
+
'@zat-design/sisyphus-react'
|
|
56
|
+
],
|
|
57
|
+
]
|
|
172
58
|
```
|
|
173
59
|
|
|
174
|
-
|
|
175
|
-
- **现代浏览器**: Chrome, Firefox, Safari, Edge (最新两个版本)
|
|
176
|
-
|
|
177
|
-
## 业务集成
|
|
60
|
+
### 使用
|
|
178
61
|
|
|
179
|
-
|
|
180
|
-
```bash
|
|
181
|
-
npm install @zat-design/sisyphus-react --save
|
|
182
|
-
```
|
|
62
|
+
1. 可通过 npm 包进行引用
|
|
183
63
|
|
|
184
|
-
### 按需加载配置
|
|
185
|
-
```javascript
|
|
186
|
-
// babel.config.js
|
|
187
|
-
[
|
|
188
|
-
'babel-plugin-import',
|
|
189
|
-
{
|
|
190
|
-
libraryName: '@zat-design/sisyphus-react',
|
|
191
|
-
camel2DashComponentName: false,
|
|
192
|
-
libraryDirectory: 'es',
|
|
193
|
-
style: false,
|
|
194
|
-
},
|
|
195
|
-
'@zat-design/sisyphus-react'
|
|
196
|
-
]
|
|
197
64
|
```
|
|
198
|
-
|
|
199
|
-
### 基础使用
|
|
200
|
-
```tsx
|
|
201
65
|
import React from 'react';
|
|
202
|
-
import {
|
|
66
|
+
import { render } from 'react-dom';
|
|
67
|
+
import { ProForm } from '@zat-design/sisyphus-react';
|
|
203
68
|
|
|
204
69
|
const App = () => {
|
|
205
70
|
return (
|
|
@@ -210,38 +75,43 @@ const App = () => {
|
|
|
210
75
|
label: '姓名',
|
|
211
76
|
name: 'name',
|
|
212
77
|
rules: [{ required: true, message: '请输入姓名!' }],
|
|
213
|
-
}
|
|
214
|
-
]}
|
|
78
|
+
}]}
|
|
215
79
|
/>
|
|
216
80
|
);
|
|
217
81
|
};
|
|
82
|
+
|
|
83
|
+
render(<App />, document.getElementById('root'));
|
|
218
84
|
```
|
|
219
85
|
|
|
220
|
-
|
|
86
|
+
2. 如组件无法满足业务场景使用,但大部分可复用可联系我们进行补充调整,也可以单独 copy 进行调整
|
|
221
87
|
|
|
222
|
-
###
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
88
|
+
### 组件库打包发布
|
|
89
|
+
|
|
90
|
+
1. build:types 生成类型文件
|
|
91
|
+
2. build:es 生产 es6 代码文件 module 指向该文件
|
|
92
|
+
3. build:lib 生产 es5 代码文件 main 指向该文件
|
|
93
|
+
4. release: "yarn build:types & yarn build:es && yarn build:lib && npm publish" 打包 3 个文件进行发布
|
|
94
|
+
5. 执行 yarn build 成功
|
|
95
|
+
6. 执行 yarn release
|
|
228
96
|
|
|
229
|
-
###
|
|
230
|
-
如果现有组件无法满足业务需求,可以:
|
|
231
|
-
1. 联系组件库维护团队进行功能扩展
|
|
232
|
-
2. 基于现有组件进行二次封装
|
|
233
|
-
3. 复制源码进行本地化修改
|
|
97
|
+
### 发布
|
|
234
98
|
|
|
235
|
-
|
|
99
|
+
npm publish --registry https://registry.npmjs.org --access=public
|
|
236
100
|
|
|
237
|
-
###
|
|
238
|
-
- 基于中安科技内部需求开发
|
|
239
|
-
- 遵循企业级组件库最佳实践
|
|
240
|
-
- 持续迭代优化,保持技术先进性
|
|
101
|
+
### 发布内网库
|
|
241
102
|
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
103
|
+
1. `package.json`里增加配置
|
|
104
|
+
```
|
|
105
|
+
"publishConfig": {
|
|
106
|
+
"registry": "https://npm.zhonganinfo.com"
|
|
107
|
+
},
|
|
108
|
+
```
|
|
109
|
+
2. 之后使用 `npm publish` 发布, 如果提示登录使用域账号登录
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
### 聚合 docs 下所有 Markdown 文件内容
|
|
113
|
+
|
|
114
|
+
```
|
|
115
|
+
node scripts/aggregateDocs.ts
|
|
116
|
+
```
|
|
246
117
|
|
|
247
|
-
这个组件库为企业级 React 应用提供了完整的 UI 组件解决方案,通过配置化的方式大大提升了开发效率,同时保持了良好的可维护性和扩展性。
|
package/babel.config.js
CHANGED
|
@@ -2,12 +2,12 @@ module.exports = {
|
|
|
2
2
|
presets: [
|
|
3
3
|
['@babel/preset-env', { loose: true }],
|
|
4
4
|
['@babel/preset-react', { runtime: 'automatic' }],
|
|
5
|
-
'@babel/preset-typescript'
|
|
5
|
+
'@babel/preset-typescript',
|
|
6
6
|
],
|
|
7
7
|
plugins: [
|
|
8
8
|
['@babel/plugin-proposal-decorators', { legacy: true }],
|
|
9
9
|
['@babel/plugin-proposal-class-properties', { loose: true }],
|
|
10
10
|
['@babel/plugin-transform-private-methods', { loose: true }],
|
|
11
11
|
['@babel/plugin-transform-private-property-in-object', { loose: true }],
|
|
12
|
-
]
|
|
12
|
+
],
|
|
13
13
|
};
|