@ant-design/pro-components 3.1.3-0 → 3.1.4-0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/pro-components.min.js +1 -1
- package/es/card/components/Actions/index.js +1 -4
- package/es/card/components/Actions/style.js +1 -0
- package/es/card/components/Card/index.js +23 -15
- package/es/card/components/Card/style.js +34 -8
- package/es/card/components/CheckCard/Group.js +1 -3
- package/es/card/components/CheckCard/index.js +0 -1
- package/es/card/components/CheckCard/style.js +1 -0
- package/es/card/components/Divider/index.d.ts +1 -1
- package/es/card/components/Divider/index.js +2 -2
- package/es/card/components/Divider/style.d.ts +4 -1
- package/es/card/components/Divider/style.js +6 -38
- package/es/card/components/Loading/style.js +1 -0
- package/es/card/components/Operation/style.js +1 -0
- package/es/card/components/Statistic/index.js +1 -1
- package/es/card/components/Statistic/style.js +1 -0
- package/es/card/components/StatisticCard/style.js +1 -0
- package/es/card/typing.d.ts +2 -6
- package/es/descriptions/index.d.ts +3 -5
- package/es/descriptions/index.js +6 -6
- package/es/descriptions/useFetchData.js +0 -1
- package/es/field/AllProField.js +0 -4
- package/es/field/PureProField.js +0 -5
- package/es/field/components/Checkbox/index.js +2 -5
- package/es/field/components/DatePicker/index.d.ts +1 -1
- package/es/field/components/DigitRange/index.js +1 -0
- package/es/field/components/Options/index.js +0 -3
- package/es/field/components/Percent/util.d.ts +1 -1
- package/es/field/components/RangePicker/index.d.ts +1 -1
- package/es/field/components/Select/SearchSelect/index.js +0 -1
- package/es/field/components/Switch/index.js +0 -1
- package/es/field/components/Text/index.js +4 -1
- package/es/form/BaseForm/BaseForm.js +0 -3
- package/es/form/BaseForm/LightWrapper/index.d.ts +2 -1
- package/es/form/BaseForm/LightWrapper/style.js +2 -0
- package/es/form/components/Captcha/index.js +0 -3
- package/es/form/components/Checkbox/index.js +5 -1
- package/es/form/components/DatePicker/index.js +0 -2
- package/es/form/components/FieldSet/index.js +16 -6
- package/es/form/components/FormItem/Group/style.js +1 -0
- package/es/form/components/FormItem/index.js +9 -7
- package/es/form/components/FormItem/warpField.js +3 -15
- package/es/form/components/List/index.d.ts +1 -1
- package/es/form/components/List/index.js +0 -2
- package/es/form/components/List/style.js +1 -0
- package/es/form/components/Radio/index.js +5 -4
- package/es/form/components/SchemaForm/index.js +0 -1
- package/es/form/components/SchemaForm/layoutType/StepsForm.js +0 -1
- package/es/form/components/Select/index.js +0 -1
- package/es/form/components/Text/index.js +0 -3
- package/es/form/components/UploadButton/index.js +4 -2
- package/es/form/components/UploadDragger/index.js +0 -1
- package/es/form/helpers/grid.js +1 -5
- package/es/form/layouts/DrawerForm/index.js +1 -5
- package/es/form/layouts/DrawerForm/style.js +1 -0
- package/es/form/layouts/LightFilter/index.js +0 -1
- package/es/form/layouts/LightFilter/style.js +1 -0
- package/es/form/layouts/LoginForm/style.js +1 -0
- package/es/form/layouts/LoginFormPage/style.js +1 -0
- package/es/form/layouts/ModalForm/index.js +1 -4
- package/es/form/layouts/ProForm/index.d.ts +1 -1
- package/es/form/layouts/QueryFilter/index.js +0 -1
- package/es/form/layouts/QueryFilter/style.js +1 -0
- package/es/form/layouts/StepsForm/StepForm.js +0 -1
- package/es/form/layouts/StepsForm/index.js +3 -12
- package/es/form/layouts/StepsForm/style.js +1 -0
- package/es/layout/ProLayout.js +1 -6
- package/es/layout/components/AppsLogoComponents/style/index.js +4 -0
- package/es/layout/components/CollapsedIcon/style.js +1 -0
- package/es/layout/components/FooterToolbar/index.js +0 -3
- package/es/layout/components/GlobalFooter/style.js +1 -0
- package/es/layout/components/GlobalHeader/ActionsContent.js +0 -1
- package/es/layout/components/GridContent/style.js +1 -0
- package/es/layout/components/Header/index.js +1 -3
- package/es/layout/components/PageContainer/index.js +0 -1
- package/es/layout/components/PageContainer/style/index.js +4 -0
- package/es/layout/components/SettingDrawer/BlockCheckbox.js +0 -1
- package/es/layout/components/SettingDrawer/index.js +0 -1
- package/es/layout/components/SettingDrawer/style/index.js +4 -0
- package/es/layout/components/SiderMenu/BaseMenu.js +2 -6
- package/es/layout/components/SiderMenu/SiderMenu.js +1 -3
- package/es/layout/components/SiderMenu/index.js +0 -1
- package/es/layout/components/TopNavHeader/index.js +1 -2
- package/es/layout/components/TopNavHeader/style.js +1 -0
- package/es/layout/style/index.js +4 -0
- package/es/layout/utils/getMenuData.js +0 -1
- package/es/list/Item.d.ts +1 -4
- package/es/list/Item.js +75 -104
- package/es/list/ListView.d.ts +6 -4
- package/es/list/ListView.js +41 -53
- package/es/list/ProListBase.d.ts +74 -0
- package/es/list/ProListBase.js +350 -0
- package/es/list/constants.d.ts +2 -2
- package/es/list/constants.js +2 -5
- package/es/list/index.d.ts +23 -13
- package/es/list/index.js +78 -41
- package/es/list/style/index.d.ts +0 -1
- package/es/list/style/index.js +215 -86
- package/es/provider/index.js +0 -3
- package/es/provider/useStyle/index.d.ts +1 -21
- package/es/provider/useStyle/index.js +7 -5
- package/es/skeleton/components/Descriptions/index.js +1 -4
- package/es/skeleton/components/List/index.js +1 -4
- package/es/table/Store/Provide.js +0 -2
- package/es/table/Table.js +5 -14
- package/es/table/components/Alert/style.js +1 -0
- package/es/table/components/ColumnSetting/index.js +0 -1
- package/es/table/components/ColumnSetting/style.js +1 -0
- package/es/table/components/DragSortTable/style.js +1 -0
- package/es/table/components/EditableTable/index.js +0 -1
- package/es/table/components/ListToolBar/index.d.ts +1 -1
- package/es/table/components/ListToolBar/index.js +4 -10
- package/es/table/components/ListToolBar/style.js +2 -1
- package/es/table/components/ToolBar/index.d.ts +1 -1
- package/es/table/style/index.js +4 -0
- package/es/table/typing.d.ts +10 -5
- package/es/table/useFetchData.js +0 -3
- package/es/table/utils/cellRenderToFromItem.js +1 -3
- package/es/table/utils/index.js +0 -1
- package/es/utils/components/DropdownFooter/style.js +1 -0
- package/es/utils/components/FieldLabel/index.js +1 -1
- package/es/utils/components/FieldLabel/style.js +15 -6
- package/es/utils/components/InlineErrorFormItem/style.js +1 -0
- package/es/utils/components/LabelIconTip/index.d.ts +3 -4
- package/es/utils/components/LabelIconTip/style.js +1 -0
- package/es/utils/genCopyable/index.d.ts +6 -0
- package/es/utils/genCopyable/index.js +28 -8
- package/es/utils/hooks/useDebounceValue/index.js +1 -3
- package/es/utils/hooks/useDeepCompareEffect/index.js +0 -2
- package/es/utils/index.d.ts +2 -1
- package/es/utils/isDeepEqualReact/index.js +0 -8
- package/es/utils/merge/index.js +0 -3
- package/es/utils/nanoid/index.d.ts +1 -3
- package/es/utils/nanoid/index.js +2 -10
- package/es/utils/proFieldParsingText/index.js +1 -3
- package/es/utils/typing.d.ts +2 -1
- package/es/utils/useEditableArray/index.js +1 -1
- package/es/utils/useEditableMap/index.js +1 -1
- package/guidelines/overview-components.md +1 -1
- package/lib/card/components/Actions/index.js +1 -4
- package/lib/card/components/Actions/style.js +1 -0
- package/lib/card/components/Card/index.js +23 -15
- package/lib/card/components/Card/style.js +34 -8
- package/lib/card/components/CheckCard/Group.js +1 -3
- package/lib/card/components/CheckCard/index.js +0 -1
- package/lib/card/components/CheckCard/style.js +1 -0
- package/lib/card/components/Divider/index.d.ts +1 -1
- package/lib/card/components/Divider/index.js +2 -2
- package/lib/card/components/Divider/style.d.ts +4 -1
- package/lib/card/components/Divider/style.js +5 -38
- package/lib/card/components/Loading/style.js +1 -0
- package/lib/card/components/Operation/style.js +1 -0
- package/lib/card/components/Statistic/index.js +1 -1
- package/lib/card/components/Statistic/style.js +1 -0
- package/lib/card/components/StatisticCard/style.js +1 -0
- package/lib/card/typing.d.ts +2 -6
- package/lib/descriptions/index.d.ts +3 -5
- package/lib/descriptions/index.js +6 -6
- package/lib/descriptions/useFetchData.js +0 -1
- package/lib/field/AllProField.js +0 -4
- package/lib/field/PureProField.js +0 -5
- package/lib/field/components/Checkbox/index.js +2 -5
- package/lib/field/components/DatePicker/index.d.ts +1 -1
- package/lib/field/components/DigitRange/index.js +1 -0
- package/lib/field/components/Options/index.js +0 -3
- package/lib/field/components/Percent/util.d.ts +1 -1
- package/lib/field/components/RangePicker/index.d.ts +1 -1
- package/lib/field/components/Select/SearchSelect/index.js +0 -1
- package/lib/field/components/Switch/index.js +0 -1
- package/lib/field/components/Text/index.js +4 -1
- package/lib/form/BaseForm/BaseForm.js +0 -4
- package/lib/form/BaseForm/LightWrapper/index.d.ts +2 -1
- package/lib/form/BaseForm/LightWrapper/style.js +2 -0
- package/lib/form/components/Captcha/index.js +0 -3
- package/lib/form/components/Checkbox/index.js +5 -1
- package/lib/form/components/DatePicker/index.js +0 -2
- package/lib/form/components/FieldSet/index.js +16 -6
- package/lib/form/components/FormItem/Group/style.js +1 -0
- package/lib/form/components/FormItem/index.js +9 -7
- package/lib/form/components/FormItem/warpField.js +3 -15
- package/lib/form/components/List/index.d.ts +1 -1
- package/lib/form/components/List/index.js +0 -2
- package/lib/form/components/List/style.js +1 -0
- package/lib/form/components/Radio/index.js +5 -4
- package/lib/form/components/SchemaForm/index.js +0 -1
- package/lib/form/components/SchemaForm/layoutType/StepsForm.js +0 -1
- package/lib/form/components/Select/index.js +0 -1
- package/lib/form/components/Text/index.js +0 -3
- package/lib/form/components/UploadButton/index.js +4 -2
- package/lib/form/components/UploadDragger/index.js +0 -1
- package/lib/form/helpers/grid.js +1 -5
- package/lib/form/layouts/DrawerForm/index.js +1 -5
- package/lib/form/layouts/DrawerForm/style.js +1 -0
- package/lib/form/layouts/LightFilter/index.js +0 -1
- package/lib/form/layouts/LightFilter/style.js +1 -0
- package/lib/form/layouts/LoginForm/style.js +1 -0
- package/lib/form/layouts/LoginFormPage/style.js +1 -0
- package/lib/form/layouts/ModalForm/index.js +1 -4
- package/lib/form/layouts/ProForm/index.d.ts +1 -1
- package/lib/form/layouts/QueryFilter/index.js +0 -2
- package/lib/form/layouts/QueryFilter/style.js +1 -0
- package/lib/form/layouts/StepsForm/StepForm.js +0 -1
- package/lib/form/layouts/StepsForm/index.js +3 -12
- package/lib/form/layouts/StepsForm/style.js +1 -0
- package/lib/layout/ProLayout.js +1 -6
- package/lib/layout/components/AppsLogoComponents/style/index.js +4 -0
- package/lib/layout/components/CollapsedIcon/style.js +1 -0
- package/lib/layout/components/FooterToolbar/index.js +0 -4
- package/lib/layout/components/GlobalFooter/style.js +1 -0
- package/lib/layout/components/GlobalHeader/ActionsContent.js +0 -1
- package/lib/layout/components/GridContent/style.js +1 -0
- package/lib/layout/components/Header/index.js +1 -3
- package/lib/layout/components/PageContainer/index.js +0 -1
- package/lib/layout/components/PageContainer/style/index.js +4 -0
- package/lib/layout/components/SettingDrawer/BlockCheckbox.js +0 -1
- package/lib/layout/components/SettingDrawer/index.js +0 -1
- package/lib/layout/components/SettingDrawer/style/index.js +4 -0
- package/lib/layout/components/SiderMenu/BaseMenu.js +2 -6
- package/lib/layout/components/SiderMenu/SiderMenu.js +1 -3
- package/lib/layout/components/SiderMenu/index.js +0 -1
- package/lib/layout/components/TopNavHeader/index.js +1 -2
- package/lib/layout/components/TopNavHeader/style.js +1 -0
- package/lib/layout/style/index.js +4 -0
- package/lib/layout/utils/getMenuData.js +0 -1
- package/lib/list/Item.d.ts +1 -4
- package/lib/list/Item.js +74 -103
- package/lib/list/ListView.d.ts +6 -4
- package/lib/list/ListView.js +40 -52
- package/lib/list/ProListBase.d.ts +74 -0
- package/lib/list/ProListBase.js +357 -0
- package/lib/list/constants.d.ts +2 -2
- package/lib/list/constants.js +2 -5
- package/lib/list/index.d.ts +23 -13
- package/lib/list/index.js +77 -40
- package/lib/list/style/index.d.ts +0 -1
- package/lib/list/style/index.js +214 -86
- package/lib/provider/index.js +0 -3
- package/lib/provider/useStyle/index.d.ts +1 -21
- package/lib/provider/useStyle/index.js +7 -5
- package/lib/skeleton/components/Descriptions/index.js +1 -4
- package/lib/skeleton/components/List/index.js +1 -4
- package/lib/table/Store/Provide.js +0 -2
- package/lib/table/Table.js +5 -14
- package/lib/table/components/Alert/style.js +1 -0
- package/lib/table/components/ColumnSetting/index.js +0 -1
- package/lib/table/components/ColumnSetting/style.js +1 -0
- package/lib/table/components/DragSortTable/style.js +1 -0
- package/lib/table/components/EditableTable/index.js +0 -1
- package/lib/table/components/ListToolBar/index.d.ts +1 -1
- package/lib/table/components/ListToolBar/index.js +4 -10
- package/lib/table/components/ListToolBar/style.js +2 -1
- package/lib/table/components/ToolBar/index.d.ts +1 -1
- package/lib/table/style/index.js +4 -0
- package/lib/table/typing.d.ts +10 -5
- package/lib/table/useFetchData.js +0 -3
- package/lib/table/utils/cellRenderToFromItem.js +1 -3
- package/lib/table/utils/index.js +0 -1
- package/lib/utils/components/DropdownFooter/style.js +1 -0
- package/lib/utils/components/FieldLabel/index.js +1 -1
- package/lib/utils/components/FieldLabel/style.js +15 -6
- package/lib/utils/components/InlineErrorFormItem/style.js +1 -0
- package/lib/utils/components/LabelIconTip/index.d.ts +3 -4
- package/lib/utils/components/LabelIconTip/style.js +1 -0
- package/lib/utils/genCopyable/index.d.ts +6 -0
- package/lib/utils/genCopyable/index.js +28 -8
- package/lib/utils/hooks/useDebounceValue/index.js +1 -3
- package/lib/utils/hooks/useDeepCompareEffect/index.js +0 -2
- package/lib/utils/index.d.ts +2 -1
- package/lib/utils/isDeepEqualReact/index.js +0 -8
- package/lib/utils/merge/index.js +0 -3
- package/lib/utils/nanoid/index.d.ts +1 -3
- package/lib/utils/nanoid/index.js +2 -10
- package/lib/utils/proFieldParsingText/index.js +1 -3
- package/lib/utils/typing.d.ts +2 -1
- package/lib/utils/useEditableArray/index.js +0 -2
- package/lib/utils/useEditableMap/index.js +0 -2
- package/package.json +4 -5
package/lib/list/style/index.js
CHANGED
|
@@ -3,76 +3,189 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.techUiListActive = void 0;
|
|
7
6
|
exports.useStyle = useStyle;
|
|
8
7
|
var _cssinjs = require("@ant-design/cssinjs");
|
|
9
8
|
var _provider = require("../../provider");
|
|
10
|
-
const
|
|
9
|
+
const genTechUiListActiveKeyframes = token => new _cssinjs.Keyframes('techUiListActive', {
|
|
11
10
|
'0%': {
|
|
12
11
|
backgroundColor: 'unset'
|
|
13
12
|
},
|
|
14
13
|
'30%': {
|
|
15
|
-
background:
|
|
14
|
+
background: token.colorWarningBg ?? (0, _provider.setAlpha)(token.colorWarning, 0.15)
|
|
16
15
|
},
|
|
17
16
|
'100%': {
|
|
18
17
|
backgroundColor: 'unset'
|
|
19
18
|
}
|
|
20
19
|
});
|
|
21
20
|
const genProListStyle = token => {
|
|
21
|
+
const techUiListActive = genTechUiListActiveKeyframes(token);
|
|
22
22
|
return {
|
|
23
23
|
[token.componentCls]: {
|
|
24
|
+
boxSizing: 'border-box',
|
|
25
|
+
'*, *::before, *::after': {
|
|
26
|
+
boxSizing: 'border-box'
|
|
27
|
+
},
|
|
24
28
|
backgroundColor: 'transparent',
|
|
25
29
|
[`${token.proComponentsCls}-table-alert`]: {
|
|
26
|
-
marginBlockEnd:
|
|
30
|
+
marginBlockEnd: token.margin
|
|
31
|
+
},
|
|
32
|
+
[`${token.proComponentsCls}-list-item`]: {
|
|
33
|
+
display: 'flex',
|
|
34
|
+
flexDirection: 'column',
|
|
35
|
+
cursor: 'pointer',
|
|
36
|
+
flex: 1,
|
|
37
|
+
minWidth: 0,
|
|
38
|
+
padding: token.paddingXS,
|
|
39
|
+
alignItems: 'flex-start',
|
|
40
|
+
borderRadius: token.borderRadius,
|
|
41
|
+
listStyle: 'none',
|
|
42
|
+
'& > *:first-child': {
|
|
43
|
+
flex: 1,
|
|
44
|
+
minWidth: 0
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
'&-filled': {
|
|
48
|
+
backgroundColor: token.colorFillQuaternary,
|
|
49
|
+
borderRadius: token.borderRadius,
|
|
50
|
+
[`${token.componentCls}-toolbar`]: {
|
|
51
|
+
borderBlockEnd: `${token.lineWidth}px ${token.lineType} ${token.colorSplit}`
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
'&-outlined': {
|
|
55
|
+
border: `${token.lineWidth}px ${token.lineType} ${token.colorSplit}`,
|
|
56
|
+
borderRadius: token.borderRadius
|
|
57
|
+
},
|
|
58
|
+
'&-borderless': {
|
|
59
|
+
[`${token.componentCls}-toolbar`]: {
|
|
60
|
+
borderBlockEnd: 'none'
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
[`${token.proComponentsCls}-list-item-meta`]: {
|
|
64
|
+
display: 'flex',
|
|
65
|
+
flex: 1,
|
|
66
|
+
flexDirection: 'row',
|
|
67
|
+
alignItems: 'flex-start',
|
|
68
|
+
minWidth: 0,
|
|
69
|
+
gap: token.marginXS
|
|
70
|
+
},
|
|
71
|
+
[`${token.proComponentsCls}-list-item-meta-title`]: {
|
|
72
|
+
display: 'flex',
|
|
73
|
+
flexWrap: 'wrap',
|
|
74
|
+
alignItems: 'center',
|
|
75
|
+
gap: token.marginXS,
|
|
76
|
+
borderBlockEnd: 'none',
|
|
77
|
+
margin: 0,
|
|
78
|
+
minWidth: 0
|
|
79
|
+
},
|
|
80
|
+
'&-split': {
|
|
81
|
+
[`${token.componentCls}-row`]: {
|
|
82
|
+
borderBlockEnd: `${token.lineWidth}px ${token.lineType} ${token.colorSplit}`,
|
|
83
|
+
'&:last-child': {
|
|
84
|
+
borderBlockEnd: 'none'
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
[`${token.proComponentsCls}-list-item`]: {
|
|
88
|
+
borderRadius: 0,
|
|
89
|
+
borderBlockEnd: `${token.lineWidth}px ${token.lineType} ${token.colorSplit}`,
|
|
90
|
+
'&:last-child': {
|
|
91
|
+
borderBlockEnd: 'none'
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
'&-no-split': {
|
|
96
|
+
[`${token.componentCls}-row`]: {
|
|
97
|
+
borderBlockEnd: 'none'
|
|
98
|
+
},
|
|
99
|
+
[`${token.proComponentsCls}-list ${token.proComponentsCls}-list-item`]: {
|
|
100
|
+
borderBlockEnd: 'none'
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
[`${token.proComponentsCls}-list-item-action,
|
|
104
|
+
${token.proComponentsCls}-card-extra,
|
|
105
|
+
${token.proComponentsCls}-card-actions`]: {
|
|
106
|
+
display: 'flex',
|
|
107
|
+
alignItems: 'center',
|
|
108
|
+
gap: token.marginSM,
|
|
109
|
+
flexShrink: 0
|
|
27
110
|
},
|
|
28
111
|
'&-row': {
|
|
29
|
-
|
|
30
|
-
|
|
112
|
+
[`${token.proComponentsCls}-list-item-meta`]: {
|
|
113
|
+
display: 'flex',
|
|
114
|
+
flex: '1',
|
|
115
|
+
flexDirection: 'row',
|
|
116
|
+
alignItems: 'flex-start',
|
|
117
|
+
minWidth: 0
|
|
118
|
+
},
|
|
119
|
+
[`${token.proComponentsCls}-list-item-meta-content`]: {
|
|
120
|
+
flex: '1',
|
|
121
|
+
minWidth: 0,
|
|
122
|
+
display: 'flex',
|
|
123
|
+
flexDirection: 'column',
|
|
124
|
+
gap: token.marginXXS
|
|
125
|
+
},
|
|
126
|
+
[`${token.proComponentsCls}-list-item-meta-title`]: {
|
|
127
|
+
display: 'flex',
|
|
128
|
+
flexWrap: 'wrap',
|
|
129
|
+
alignItems: 'center',
|
|
130
|
+
gap: token.marginXS,
|
|
31
131
|
borderBlockEnd: 'none',
|
|
32
132
|
margin: 0
|
|
33
133
|
},
|
|
34
134
|
'&:last-child': {
|
|
35
135
|
borderBlockEnd: 'none',
|
|
36
|
-
[`${token.
|
|
136
|
+
[`${token.proComponentsCls}-list-item`]: {
|
|
37
137
|
borderBlockEnd: 'none'
|
|
38
138
|
}
|
|
39
139
|
},
|
|
40
140
|
'&:hover': {
|
|
41
|
-
backgroundColor:
|
|
141
|
+
backgroundColor: (0, _provider.setAlpha)(token.colorTextBase, 0.02),
|
|
42
142
|
transition: 'background-color 0.3s',
|
|
43
|
-
[`${token.
|
|
44
|
-
display: '
|
|
143
|
+
[`${token.proComponentsCls}-list-item-action`]: {
|
|
144
|
+
display: 'flex',
|
|
145
|
+
alignItems: 'center',
|
|
146
|
+
gap: token.marginSM,
|
|
147
|
+
flexShrink: 0
|
|
45
148
|
},
|
|
46
|
-
[`${token.
|
|
149
|
+
[`${token.proComponentsCls}-list-item-action-item`]: {
|
|
150
|
+
display: 'inline-flex',
|
|
151
|
+
alignItems: 'center'
|
|
152
|
+
},
|
|
153
|
+
[`${token.proComponentsCls}-list-item-extra`]: {
|
|
47
154
|
display: 'flex'
|
|
48
155
|
},
|
|
49
156
|
[`${token.componentCls}-row-extra`]: {
|
|
50
|
-
display: '
|
|
157
|
+
display: 'flex'
|
|
51
158
|
},
|
|
52
159
|
[`${token.componentCls}-row-subheader-actions`]: {
|
|
53
|
-
display: '
|
|
160
|
+
display: 'flex'
|
|
54
161
|
}
|
|
55
162
|
},
|
|
56
|
-
|
|
57
|
-
marginBlock:
|
|
163
|
+
[`&-card`]: {
|
|
164
|
+
marginBlock: 0,
|
|
58
165
|
marginInline: 0,
|
|
59
166
|
paddingBlock: 0,
|
|
60
|
-
paddingInline:
|
|
167
|
+
paddingInline: 0
|
|
168
|
+
},
|
|
169
|
+
'&-card-container': {
|
|
170
|
+
marginBlock: 0,
|
|
171
|
+
marginInline: 0,
|
|
172
|
+
paddingBlock: 0,
|
|
173
|
+
paddingInline: 0,
|
|
61
174
|
'&:hover': {
|
|
62
175
|
backgroundColor: 'transparent'
|
|
63
176
|
},
|
|
64
|
-
[`${token.
|
|
177
|
+
[`${token.proComponentsCls}-list-item-meta-title`]: {
|
|
65
178
|
flexShrink: 9,
|
|
66
179
|
marginBlock: 0,
|
|
67
180
|
marginInline: 0,
|
|
68
|
-
lineHeight:
|
|
181
|
+
lineHeight: 22
|
|
69
182
|
}
|
|
70
183
|
},
|
|
71
184
|
[`&${token.componentCls}-row-editable`]: {
|
|
72
|
-
[`${token.
|
|
185
|
+
[`${token.proComponentsCls}-list-item`]: {
|
|
73
186
|
'&-meta': {
|
|
74
187
|
'&-avatar,&-description,&-title': {
|
|
75
|
-
paddingBlock:
|
|
188
|
+
paddingBlock: token.paddingSM,
|
|
76
189
|
paddingInline: 0,
|
|
77
190
|
'&-editable': {
|
|
78
191
|
paddingBlock: 0
|
|
@@ -80,7 +193,12 @@ const genProListStyle = token => {
|
|
|
80
193
|
}
|
|
81
194
|
},
|
|
82
195
|
'&-action': {
|
|
83
|
-
display: '
|
|
196
|
+
display: 'flex',
|
|
197
|
+
alignItems: 'center',
|
|
198
|
+
gap: token.marginSM,
|
|
199
|
+
listStyle: 'none',
|
|
200
|
+
padding: 0,
|
|
201
|
+
margin: 0
|
|
84
202
|
}
|
|
85
203
|
}
|
|
86
204
|
},
|
|
@@ -102,18 +220,27 @@ const genProListStyle = token => {
|
|
|
102
220
|
[`&${token.componentCls}-row-type-top`]: {
|
|
103
221
|
backgroundImage: "url('https://gw.alipayobjects.com/zos/antfincdn/DehQfMbOJb/icon.svg')",
|
|
104
222
|
backgroundRepeat: 'no-repeat',
|
|
105
|
-
backgroundPosition: '
|
|
106
|
-
backgroundSize:
|
|
223
|
+
backgroundPosition: '0 0',
|
|
224
|
+
backgroundSize: `${token.fontSizeSM}px ${token.fontSizeSM}px`
|
|
107
225
|
},
|
|
108
226
|
'&-show-action-hover': {
|
|
109
|
-
[`${token.
|
|
227
|
+
[`${token.proComponentsCls}-list-item-action,
|
|
110
228
|
${token.proComponentsCls}-card-extra,
|
|
111
229
|
${token.proComponentsCls}-card-actions`]: {
|
|
112
|
-
display: '
|
|
230
|
+
display: 'none'
|
|
231
|
+
},
|
|
232
|
+
'&:hover': {
|
|
233
|
+
[`${token.proComponentsCls}-list-item-action,
|
|
234
|
+
${token.proComponentsCls}-card-extra,
|
|
235
|
+
${token.proComponentsCls}-card-actions`]: {
|
|
236
|
+
display: 'flex',
|
|
237
|
+
alignItems: 'center',
|
|
238
|
+
gap: token.marginSM
|
|
239
|
+
}
|
|
113
240
|
}
|
|
114
241
|
},
|
|
115
242
|
'&-show-extra-hover': {
|
|
116
|
-
[`${token.
|
|
243
|
+
[`${token.proComponentsCls}-list-item-extra`]: {
|
|
117
244
|
display: 'none'
|
|
118
245
|
}
|
|
119
246
|
},
|
|
@@ -124,29 +251,28 @@ const genProListStyle = token => {
|
|
|
124
251
|
display: 'flex',
|
|
125
252
|
alignItems: 'center',
|
|
126
253
|
justifyContent: 'space-between',
|
|
127
|
-
height:
|
|
128
|
-
paddingInline:
|
|
254
|
+
height: 44,
|
|
255
|
+
paddingInline: token.paddingLG,
|
|
129
256
|
paddingBlock: 0,
|
|
130
257
|
color: token.colorTextSecondary,
|
|
131
|
-
lineHeight:
|
|
132
|
-
background:
|
|
258
|
+
lineHeight: 44,
|
|
259
|
+
background: (0, _provider.setAlpha)(token.colorTextBase, 0.02),
|
|
133
260
|
'&-actions': {
|
|
134
261
|
display: 'none'
|
|
135
262
|
},
|
|
136
263
|
'&-actions *': {
|
|
137
|
-
marginInlineEnd:
|
|
264
|
+
marginInlineEnd: token.marginXS,
|
|
138
265
|
'&:last-child': {
|
|
139
266
|
marginInlineEnd: 0
|
|
140
267
|
}
|
|
141
268
|
}
|
|
142
269
|
},
|
|
143
270
|
'&-expand-icon': {
|
|
144
|
-
marginInlineEnd:
|
|
271
|
+
marginInlineEnd: token.marginXS,
|
|
145
272
|
display: 'flex',
|
|
146
|
-
fontSize:
|
|
273
|
+
fontSize: token.fontSizeSM,
|
|
147
274
|
cursor: 'pointer',
|
|
148
|
-
height:
|
|
149
|
-
marginRight: 4,
|
|
275
|
+
height: 24,
|
|
150
276
|
color: token.colorTextSecondary,
|
|
151
277
|
'> .anticon > svg': {
|
|
152
278
|
transition: '0.3s'
|
|
@@ -158,11 +284,12 @@ const genProListStyle = token => {
|
|
|
158
284
|
}
|
|
159
285
|
},
|
|
160
286
|
'&-title': {
|
|
161
|
-
|
|
162
|
-
|
|
287
|
+
flexShrink: 0,
|
|
288
|
+
marginInlineEnd: 0,
|
|
289
|
+
wordBreak: 'break-word',
|
|
163
290
|
cursor: 'pointer',
|
|
164
291
|
'&-editable': {
|
|
165
|
-
paddingBlock:
|
|
292
|
+
paddingBlock: token.paddingSM
|
|
166
293
|
},
|
|
167
294
|
'&:hover': {
|
|
168
295
|
color: token.colorPrimary
|
|
@@ -173,59 +300,64 @@ const genProListStyle = token => {
|
|
|
173
300
|
display: 'flex',
|
|
174
301
|
flex: '1',
|
|
175
302
|
flexDirection: 'column',
|
|
176
|
-
marginBlock: 0
|
|
177
|
-
marginInline: 32
|
|
303
|
+
marginBlock: 0
|
|
178
304
|
},
|
|
179
305
|
'&-subTitle': {
|
|
180
|
-
|
|
306
|
+
display: 'inline-flex',
|
|
307
|
+
flexWrap: 'wrap',
|
|
308
|
+
alignItems: 'center',
|
|
309
|
+
gap: token.marginXXS,
|
|
310
|
+
color: token.colorTextSecondary,
|
|
181
311
|
'&-editable': {
|
|
182
|
-
paddingBlock:
|
|
312
|
+
paddingBlock: token.paddingSM
|
|
183
313
|
}
|
|
184
314
|
},
|
|
185
315
|
'&-description': {
|
|
186
|
-
marginBlockStart:
|
|
187
|
-
wordBreak: 'break-all'
|
|
316
|
+
marginBlockStart: token.marginXXS,
|
|
317
|
+
wordBreak: 'break-all',
|
|
318
|
+
flexShrink: 0
|
|
188
319
|
},
|
|
189
320
|
'&-avatar': {
|
|
190
|
-
display: 'flex'
|
|
321
|
+
display: 'flex',
|
|
322
|
+
flexShrink: 0,
|
|
323
|
+
alignItems: 'flex-start'
|
|
191
324
|
},
|
|
192
325
|
'&-header': {
|
|
193
326
|
display: 'flex',
|
|
194
327
|
flex: '1',
|
|
328
|
+
alignItems: 'flex-start',
|
|
195
329
|
justifyContent: 'flex-start',
|
|
330
|
+
width: '100%',
|
|
331
|
+
minWidth: 0,
|
|
196
332
|
h4: {
|
|
197
333
|
margin: 0,
|
|
198
|
-
padding: 0
|
|
334
|
+
padding: 0,
|
|
335
|
+
display: 'flex',
|
|
336
|
+
flex: '1',
|
|
337
|
+
minWidth: 0
|
|
199
338
|
}
|
|
200
339
|
},
|
|
201
340
|
'&-header-container': {
|
|
202
341
|
display: 'flex',
|
|
342
|
+
flexDirection: 'row',
|
|
343
|
+
flexWrap: 'wrap',
|
|
203
344
|
alignItems: 'center',
|
|
204
|
-
|
|
345
|
+
gap: token.marginXS,
|
|
346
|
+
flex: '1',
|
|
347
|
+
minWidth: 0
|
|
205
348
|
},
|
|
206
349
|
'&-header-option': {
|
|
207
|
-
display: 'flex'
|
|
350
|
+
display: 'flex',
|
|
351
|
+
flexShrink: 0,
|
|
352
|
+
alignItems: 'center'
|
|
208
353
|
},
|
|
209
354
|
'&-checkbox': {
|
|
210
|
-
width:
|
|
211
|
-
marginInlineEnd:
|
|
355
|
+
width: 16,
|
|
356
|
+
marginInlineEnd: token.marginSM
|
|
212
357
|
},
|
|
213
|
-
|
|
358
|
+
[`${token.proComponentsCls}-list-vertical`]: {
|
|
214
359
|
[`${token.componentCls}-row`]: {
|
|
215
|
-
|
|
216
|
-
},
|
|
217
|
-
[`${token.antCls}-list ${token.antCls}-list-item`]: {
|
|
218
|
-
borderBlockEnd: 'none'
|
|
219
|
-
}
|
|
220
|
-
},
|
|
221
|
-
'&-bordered': {
|
|
222
|
-
[`${token.componentCls}-toolbar`]: {
|
|
223
|
-
borderBlockEnd: `1px solid ${token.colorSplit}`
|
|
224
|
-
}
|
|
225
|
-
},
|
|
226
|
-
[`${token.antCls}-list-vertical`]: {
|
|
227
|
-
[`${token.componentCls}-row`]: {
|
|
228
|
-
borderBlockEnd: '12px 18px 12px 24px'
|
|
360
|
+
marginBlockEnd: token.marginSM
|
|
229
361
|
},
|
|
230
362
|
'&-header-title': {
|
|
231
363
|
display: 'flex',
|
|
@@ -238,56 +370,52 @@ const genProListStyle = token => {
|
|
|
238
370
|
marginInline: 0
|
|
239
371
|
},
|
|
240
372
|
'&-subTitle': {
|
|
241
|
-
marginBlockStart:
|
|
373
|
+
marginBlockStart: token.marginXS
|
|
242
374
|
},
|
|
243
|
-
[`${token.
|
|
375
|
+
[`${token.proComponentsCls}-list-item-extra`]: {
|
|
244
376
|
display: 'flex',
|
|
245
377
|
alignItems: 'center',
|
|
246
|
-
marginInlineStart: '32px',
|
|
247
378
|
[`${token.componentCls}-row-description`]: {
|
|
248
|
-
marginBlockStart:
|
|
379
|
+
marginBlockStart: token.margin
|
|
249
380
|
}
|
|
250
381
|
},
|
|
251
|
-
[`${token.
|
|
382
|
+
[`${token.proComponentsCls}-list-bordered ${token.proComponentsCls}-list-item`]: {
|
|
252
383
|
paddingInline: 0
|
|
253
384
|
},
|
|
254
385
|
[`${token.componentCls}-row-show-extra-hover`]: {
|
|
255
|
-
[`${token.
|
|
386
|
+
[`${token.proComponentsCls}-list-item-extra `]: {
|
|
256
387
|
display: 'none'
|
|
257
388
|
}
|
|
258
389
|
}
|
|
259
390
|
},
|
|
260
|
-
[`${token.
|
|
391
|
+
[`${token.proComponentsCls}-list-pagination`]: {
|
|
261
392
|
marginBlockStart: token.margin,
|
|
262
393
|
marginBlockEnd: token.margin
|
|
263
394
|
},
|
|
264
|
-
[`${token.
|
|
395
|
+
[`${token.proComponentsCls}-list-list`]: {
|
|
265
396
|
'&-item': {
|
|
266
397
|
cursor: 'pointer',
|
|
267
|
-
paddingBlock:
|
|
268
|
-
paddingInline:
|
|
398
|
+
paddingBlock: token.paddingSM,
|
|
399
|
+
paddingInline: token.paddingSM
|
|
269
400
|
}
|
|
270
401
|
},
|
|
271
|
-
[`${token.
|
|
402
|
+
[`${token.proComponentsCls}-list-vertical ${token.proComponentsCls}-list-row`]: {
|
|
272
403
|
'&-header': {
|
|
273
404
|
paddingBlock: 0,
|
|
274
405
|
paddingInline: 0,
|
|
275
406
|
borderBlockEnd: 'none'
|
|
276
407
|
},
|
|
277
|
-
[`${token.
|
|
408
|
+
[`${token.proComponentsCls}-list-item`]: {
|
|
278
409
|
width: '100%',
|
|
279
|
-
paddingBlock:
|
|
280
|
-
paddingInlineStart:
|
|
281
|
-
paddingInlineEnd:
|
|
282
|
-
[`${token.
|
|
410
|
+
paddingBlock: token.paddingSM,
|
|
411
|
+
paddingInlineStart: token.paddingLG,
|
|
412
|
+
paddingInlineEnd: token.paddingMD,
|
|
413
|
+
[`${token.proComponentsCls}-list-item-meta-avatar`]: {
|
|
283
414
|
display: 'flex',
|
|
284
415
|
alignItems: 'center',
|
|
285
|
-
marginInlineEnd:
|
|
286
|
-
},
|
|
287
|
-
[`${token.antCls}-list-item-action-split`]: {
|
|
288
|
-
display: 'none'
|
|
416
|
+
marginInlineEnd: token.marginXS
|
|
289
417
|
},
|
|
290
|
-
[`${token.
|
|
418
|
+
[`${token.proComponentsCls}-list-item-meta-title`]: {
|
|
291
419
|
marginBlock: 0,
|
|
292
420
|
marginInline: 0
|
|
293
421
|
}
|
package/lib/provider/index.js
CHANGED
|
@@ -135,7 +135,6 @@ const CacheClean = () => {
|
|
|
135
135
|
// @ts-ignore
|
|
136
136
|
cache.clear();
|
|
137
137
|
};
|
|
138
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
139
138
|
}, []);
|
|
140
139
|
return null;
|
|
141
140
|
};
|
|
@@ -260,8 +259,6 @@ const ConfigProviderContainer = props => {
|
|
|
260
259
|
})
|
|
261
260
|
})
|
|
262
261
|
});
|
|
263
|
-
|
|
264
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
265
262
|
}, [restConfig, themeConfig, proConfigContextValue, autoClearCache, children]);
|
|
266
263
|
if (!autoClearCache) return configProviderDom;
|
|
267
264
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_swr.SWRConfig, {
|
|
@@ -19,27 +19,7 @@ export declare const setAlpha: (baseColor: string, alpha: number) => string;
|
|
|
19
19
|
*/
|
|
20
20
|
export declare const lighten: (baseColor: string, brightness: number) => string;
|
|
21
21
|
export type GenerateStyle<ComponentToken extends object = GlobalToken, ReturnType = CSSInterpolation> = (token: ComponentToken, ...rest: any[]) => ReturnType;
|
|
22
|
-
export declare const proTheme:
|
|
23
|
-
defaultSeed: import("antd/es/theme/internal").SeedToken;
|
|
24
|
-
useToken: () => {
|
|
25
|
-
theme: import("@ant-design/cssinjs").Theme<import("antd/es/theme/internal").SeedToken, import("antd/es/theme/internal").AliasToken>;
|
|
26
|
-
token: import("antd").GlobalToken;
|
|
27
|
-
hashId: string;
|
|
28
|
-
cssVar: import("antd").GlobalToken;
|
|
29
|
-
};
|
|
30
|
-
defaultAlgorithm: typeof import("antd/es/theme/themes/default").default;
|
|
31
|
-
darkAlgorithm: import("@ant-design/cssinjs").DerivativeFunc<import("antd/es/theme/internal").SeedToken, import("antd/es/theme/interface").MapToken>;
|
|
32
|
-
compactAlgorithm: import("@ant-design/cssinjs").DerivativeFunc<import("antd/es/theme/internal").SeedToken, import("antd/es/theme/interface").MapToken>;
|
|
33
|
-
getDesignToken: (config?: import("antd").ThemeConfig | undefined) => import("antd/es/theme/internal").AliasToken;
|
|
34
|
-
defaultConfig: {
|
|
35
|
-
token: import("antd/es/theme/internal").SeedToken;
|
|
36
|
-
override: {
|
|
37
|
-
override: import("antd/es/theme/internal").SeedToken;
|
|
38
|
-
};
|
|
39
|
-
hashed: boolean;
|
|
40
|
-
};
|
|
41
|
-
_internalContext: React.Context<import("antd/es/theme/context").DesignTokenProviderProps>;
|
|
42
|
-
};
|
|
22
|
+
export declare const proTheme: any;
|
|
43
23
|
export type UseStyleResult = {
|
|
44
24
|
wrapSSR: (node: React.ReactElement) => React.ReactElement;
|
|
45
25
|
hashId: string;
|
|
@@ -32,6 +32,7 @@ const lighten = (baseColor, brightness) => {
|
|
|
32
32
|
return instance.lighten(brightness).toHexString();
|
|
33
33
|
};
|
|
34
34
|
exports.lighten = lighten;
|
|
35
|
+
// 为了兼容 antd 类型,这里使用 any
|
|
35
36
|
const proTheme = exports.proTheme = _antd.theme;
|
|
36
37
|
const resetComponent = token => ({
|
|
37
38
|
boxSizing: 'border-box',
|
|
@@ -40,7 +41,10 @@ const resetComponent = token => ({
|
|
|
40
41
|
color: token.colorText,
|
|
41
42
|
fontSize: token.fontSize,
|
|
42
43
|
lineHeight: token.lineHeight,
|
|
43
|
-
listStyle: 'none'
|
|
44
|
+
listStyle: 'none',
|
|
45
|
+
'*, *::before, *::after': {
|
|
46
|
+
boxSizing: 'border-box'
|
|
47
|
+
}
|
|
44
48
|
});
|
|
45
49
|
exports.resetComponent = resetComponent;
|
|
46
50
|
const operationUnit = token => ({
|
|
@@ -66,11 +70,9 @@ const operationUnit = token => ({
|
|
|
66
70
|
*/
|
|
67
71
|
exports.operationUnit = operationUnit;
|
|
68
72
|
function useStyle(componentName, styleFn) {
|
|
69
|
-
// eslint-disable-next-line prefer-const
|
|
70
73
|
let {
|
|
71
74
|
token = {},
|
|
72
|
-
hashed
|
|
73
|
-
prefixCls
|
|
75
|
+
hashed
|
|
74
76
|
} = (0, _react.useContext)(_index.ProProvider);
|
|
75
77
|
const {
|
|
76
78
|
token: antdToken,
|
|
@@ -93,7 +95,7 @@ function useStyle(componentName, styleFn) {
|
|
|
93
95
|
|
|
94
96
|
// Register styles (side effect only in v2)
|
|
95
97
|
(0, _cssinjs.useStyleRegister)({
|
|
96
|
-
theme,
|
|
98
|
+
theme: theme,
|
|
97
99
|
token,
|
|
98
100
|
path: [componentName],
|
|
99
101
|
nonce: csp?.nonce,
|
|
@@ -246,10 +246,7 @@ const TableSkeleton = ({
|
|
|
246
246
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(TableItemSkeleton, {
|
|
247
247
|
header: true,
|
|
248
248
|
active: active
|
|
249
|
-
}), new Array(size).fill(null).map((_, index) =>
|
|
250
|
-
/*#__PURE__*/
|
|
251
|
-
// eslint-disable-next-line react/no-array-index-key
|
|
252
|
-
(0, _jsxRuntime.jsx)(TableItemSkeleton, {
|
|
249
|
+
}), new Array(size).fill(null).map((_, index) => /*#__PURE__*/(0, _jsxRuntime.jsx)(TableItemSkeleton, {
|
|
253
250
|
active: active
|
|
254
251
|
}, index)), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
255
252
|
style: {
|
|
@@ -162,10 +162,7 @@ const ListSkeleton = ({
|
|
|
162
162
|
padding: 0
|
|
163
163
|
}
|
|
164
164
|
},
|
|
165
|
-
children: [new Array(size).fill(null).map((_, index) =>
|
|
166
|
-
/*#__PURE__*/
|
|
167
|
-
// eslint-disable-next-line react/no-array-index-key
|
|
168
|
-
(0, _jsxRuntime.jsx)(ListSkeletonItem, {
|
|
165
|
+
children: [new Array(size).fill(null).map((_, index) => /*#__PURE__*/(0, _jsxRuntime.jsx)(ListSkeletonItem, {
|
|
169
166
|
active: !!active
|
|
170
167
|
}, index)), actionButton !== false && /*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.Card, {
|
|
171
168
|
variant: "borderless",
|
|
@@ -109,7 +109,6 @@ function useContainer(props = {}) {
|
|
|
109
109
|
console.warn(error);
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
113
112
|
}, [props.columnsState?.persistenceKey, props.columnsState?.persistenceType, defaultColumnKeyMap]);
|
|
114
113
|
|
|
115
114
|
/** 清空一下当前的 key */
|
|
@@ -145,7 +144,6 @@ function useContainer(props = {}) {
|
|
|
145
144
|
console.warn(error);
|
|
146
145
|
clearPersistenceStorage();
|
|
147
146
|
}
|
|
148
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
149
147
|
}, [props.columnsState?.persistenceKey, columnsMap, props.columnsState?.persistenceType]);
|
|
150
148
|
const renderValue = {
|
|
151
149
|
action: actionRef.current,
|
package/lib/table/Table.js
CHANGED
|
@@ -310,8 +310,6 @@ const ProTable = props => {
|
|
|
310
310
|
...(formSearchRef.current || {}),
|
|
311
311
|
...params
|
|
312
312
|
};
|
|
313
|
-
|
|
314
|
-
// eslint-disable-next-line no-underscore-dangle
|
|
315
313
|
delete actionParams._timestamp;
|
|
316
314
|
const response = await request(actionParams, proSort, proFilter);
|
|
317
315
|
return response;
|
|
@@ -355,7 +353,6 @@ const ProTable = props => {
|
|
|
355
353
|
};
|
|
356
354
|
document.addEventListener('visibilitychange', visibilitychange);
|
|
357
355
|
return () => document.removeEventListener('visibilitychange', visibilitychange);
|
|
358
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
359
356
|
}, []);
|
|
360
357
|
|
|
361
358
|
/** SelectedRowKeys受控处理selectRows */
|
|
@@ -403,7 +400,6 @@ const ProTable = props => {
|
|
|
403
400
|
current: 1
|
|
404
401
|
});
|
|
405
402
|
}
|
|
406
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
407
403
|
}, [params]);
|
|
408
404
|
|
|
409
405
|
// 设置 name 到 store 中,里面用了 ref ,所以不用担心直接 set
|
|
@@ -514,10 +510,7 @@ const ProTable = props => {
|
|
|
514
510
|
columns: propsColumns,
|
|
515
511
|
context: columnContext
|
|
516
512
|
}).sort((0, _columnSort.columnSort)(counter.columnsMap ?? {}));
|
|
517
|
-
|
|
518
|
-
}, [propsColumns, counter?.sortKeyColumns, counter?.columnsMap, columnEmptyText, type,
|
|
519
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
520
|
-
editableUtils.editableKeys && editableUtils.editableKeys.join(','), proFilter, proSort]);
|
|
513
|
+
}, [propsColumns, counter?.sortKeyColumns, counter?.columnsMap, columnEmptyText, type, editableUtils.editableKeys && editableUtils.editableKeys.join(','), proFilter, proSort]);
|
|
521
514
|
|
|
522
515
|
/** Table Column 变化的时候更新一下,这个参数将会用于渲染 */
|
|
523
516
|
(0, _utils.useDeepCompareEffectDebounce)(() => {
|
|
@@ -734,11 +727,9 @@ const ProTable = props => {
|
|
|
734
727
|
styles: {
|
|
735
728
|
body: {
|
|
736
729
|
...cardBodyStyle,
|
|
737
|
-
...(cardProps
|
|
730
|
+
...(cardProps?.styles?.body ?? {})
|
|
738
731
|
},
|
|
739
|
-
|
|
740
|
-
header: cardProps.styles?.header || cardProps.headStyle
|
|
741
|
-
} : {})
|
|
732
|
+
header: cardProps?.styles?.header
|
|
742
733
|
},
|
|
743
734
|
...cardProps,
|
|
744
735
|
children: tableContentDom
|
|
@@ -792,8 +783,8 @@ const ProviderTableContainer = props => {
|
|
|
792
783
|
columnsState: props.columnsState,
|
|
793
784
|
columns: props.columns,
|
|
794
785
|
onSizeChange: props.onSizeChange,
|
|
795
|
-
size: props.size,
|
|
796
|
-
defaultSize: props.defaultSize
|
|
786
|
+
size: props.size || undefined,
|
|
787
|
+
defaultSize: props.defaultSize || undefined
|
|
797
788
|
},
|
|
798
789
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_provider.ProConfigProvider, {
|
|
799
790
|
valueTypeMap: {
|
|
@@ -8,6 +8,7 @@ var _provider = require("../../../provider");
|
|
|
8
8
|
const genProStyle = token => {
|
|
9
9
|
return {
|
|
10
10
|
[token.componentCls]: {
|
|
11
|
+
boxSizing: 'border-box',
|
|
11
12
|
marginBlockEnd: 16,
|
|
12
13
|
backgroundColor: (0, _provider.setAlpha)(token.colorTextBase, 0.02),
|
|
13
14
|
borderRadius: token.borderRadius,
|