@ant-design/pro-components 3.1.3-1 → 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/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/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 -39
- package/es/card/components/Statistic/index.js +1 -1
- 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/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/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/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/LightFilter/index.js +0 -1
- 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/StepsForm/StepForm.js +0 -1
- package/es/form/layouts/StepsForm/index.js +3 -12
- package/es/layout/ProLayout.js +1 -6
- package/es/layout/components/AppsLogoComponents/style/index.js +4 -0
- package/es/layout/components/FooterToolbar/index.js +0 -3
- package/es/layout/components/GlobalHeader/ActionsContent.js +0 -1
- 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/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 +6 -3
- 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/ColumnSetting/index.js +0 -1
- 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 +1 -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/LabelIconTip/index.d.ts +3 -4
- 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/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/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 -39
- package/lib/card/components/Statistic/index.js +1 -1
- 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/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/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/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/LightFilter/index.js +0 -1
- 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/StepsForm/StepForm.js +0 -1
- package/lib/form/layouts/StepsForm/index.js +3 -12
- package/lib/layout/ProLayout.js +1 -6
- package/lib/layout/components/AppsLogoComponents/style/index.js +4 -0
- package/lib/layout/components/FooterToolbar/index.js +0 -4
- package/lib/layout/components/GlobalHeader/ActionsContent.js +0 -1
- 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/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 +6 -3
- 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/ColumnSetting/index.js +0 -1
- 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 +1 -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/LabelIconTip/index.d.ts +3 -4
- 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/form/helpers/grid.js
CHANGED
|
@@ -103,10 +103,6 @@ const useGridHelpers = props => {
|
|
|
103
103
|
rowProps: config?.rowProps,
|
|
104
104
|
colProps: config?.colProps || colProps,
|
|
105
105
|
Wrapper: config?.Wrapper
|
|
106
|
-
}),
|
|
107
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
108
|
-
[config?.Wrapper, config.grid, grid,
|
|
109
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
110
|
-
JSON.stringify([colProps, config?.colProps, config?.rowProps])]);
|
|
106
|
+
}), [config?.Wrapper, config.grid, grid, JSON.stringify([colProps, config?.colProps, config?.rowProps])]);
|
|
111
107
|
};
|
|
112
108
|
exports.useGridHelpers = useGridHelpers;
|
|
@@ -30,9 +30,7 @@ function DrawerForm({
|
|
|
30
30
|
open: propsOpen,
|
|
31
31
|
...rest
|
|
32
32
|
}) {
|
|
33
|
-
noteOnce(
|
|
34
|
-
// eslint-disable-next-line @typescript-eslint/dot-notation
|
|
35
|
-
!rest['footer'] || !drawerProps?.footer, 'DrawerForm 是一个 ProForm 的特殊布局,如果想自定义按钮,请使用 submit.render 自定义。');
|
|
33
|
+
noteOnce(!rest.footer || !drawerProps?.footer, 'DrawerForm 是一个 ProForm 的特殊布局,如果想自定义按钮,请使用 submit.render 自定义。');
|
|
36
34
|
const resizeInfo = _react.default.useMemo(() => {
|
|
37
35
|
const defaultResize = {
|
|
38
36
|
onResize: () => {},
|
|
@@ -108,8 +106,6 @@ function DrawerForm({
|
|
|
108
106
|
if (resizableDrawer) {
|
|
109
107
|
setDrawerWidth(resizeInfo?.minWidth);
|
|
110
108
|
}
|
|
111
|
-
|
|
112
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
113
109
|
}, [propsOpen, open, resizableDrawer]);
|
|
114
110
|
(0, _react.useImperativeHandle)(rest.formRef, () => {
|
|
115
111
|
return formRef.current;
|
|
@@ -71,7 +71,6 @@ const LightFilterContainer = props => {
|
|
|
71
71
|
collapseItems: collapseItemsArr,
|
|
72
72
|
outsideItems: outsideItemsArr
|
|
73
73
|
};
|
|
74
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
75
74
|
}, [props.items]);
|
|
76
75
|
const renderCollapseLabelRender = () => {
|
|
77
76
|
if (collapseLabel) {
|
|
@@ -28,9 +28,7 @@ function ModalForm({
|
|
|
28
28
|
open: propsOpen,
|
|
29
29
|
...rest
|
|
30
30
|
}) {
|
|
31
|
-
noteOnce(
|
|
32
|
-
// eslint-disable-next-line @typescript-eslint/dot-notation
|
|
33
|
-
!rest['footer'] || !modalProps?.footer, 'ModalForm 是一个 ProForm 的特殊布局,如果想自定义按钮,请使用 submit.render 自定义。');
|
|
31
|
+
noteOnce(!rest.footer || !modalProps?.footer, 'ModalForm 是一个 ProForm 的特殊布局,如果想自定义按钮,请使用 submit.render 自定义。');
|
|
34
32
|
const context = (0, _react.useContext)(_antd.ConfigProvider.ConfigContext);
|
|
35
33
|
const [, forceUpdate] = (0, _react.useState)([]);
|
|
36
34
|
const [loading, setLoading] = (0, _react.useState)(false);
|
|
@@ -79,7 +77,6 @@ function ModalForm({
|
|
|
79
77
|
if (propsOpen) {
|
|
80
78
|
onOpenChange?.(true);
|
|
81
79
|
}
|
|
82
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
83
80
|
}, [propsOpen]);
|
|
84
81
|
const triggerDom = (0, _react.useMemo)(() => {
|
|
85
82
|
if (!trigger) {
|
|
@@ -9,7 +9,7 @@ declare namespace ProForm {
|
|
|
9
9
|
var Group: React.FC<import("src/form").GroupProps>;
|
|
10
10
|
var useForm: typeof import("antd/es/form/Form").useForm;
|
|
11
11
|
var Item: React.FC<import("src/form/components/FormItem").ProFormItemProps>;
|
|
12
|
-
var useWatch: typeof import("
|
|
12
|
+
var useWatch: typeof import("antd/es/form/Form").useWatch;
|
|
13
13
|
var ErrorList: React.FC<import("antd/es/form").ErrorListProps>;
|
|
14
14
|
var Provider: React.FC<import("antd/es/form/context").FormProviderProps>;
|
|
15
15
|
var useFormInstance: typeof import("antd/es/form/hooks/useFormInstance").default;
|
|
@@ -17,8 +17,6 @@ var _BaseForm = require("../../BaseForm");
|
|
|
17
17
|
var _Actions = _interopRequireDefault(require("./Actions"));
|
|
18
18
|
var _style = require("./style");
|
|
19
19
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
20
|
-
/* eslint-disable no-param-reassign */
|
|
21
|
-
|
|
22
20
|
const CONFIG_SPAN_BREAKPOINTS = {
|
|
23
21
|
xs: 513,
|
|
24
22
|
sm: 513,
|
|
@@ -148,8 +148,8 @@ function StepsForm(props) {
|
|
|
148
148
|
});
|
|
149
149
|
}, [onCurrentChangeCallback]);
|
|
150
150
|
const layoutRender = (0, _react.useMemo)(() => {
|
|
151
|
-
return StepsLayoutStrategy[stepsProps?.
|
|
152
|
-
}, [stepsProps?.
|
|
151
|
+
return StepsLayoutStrategy[stepsProps?.orientation || 'horizontal'];
|
|
152
|
+
}, [stepsProps?.orientation]);
|
|
153
153
|
const lastStep = (0, _react.useMemo)(() => step === formArray.length - 1, [formArray.length, step]);
|
|
154
154
|
|
|
155
155
|
/**
|
|
@@ -215,22 +215,13 @@ function StepsForm(props) {
|
|
|
215
215
|
return stepItemProps;
|
|
216
216
|
})
|
|
217
217
|
};
|
|
218
|
-
|
|
219
|
-
// Convert deprecated direction to orientation
|
|
220
|
-
const processedStepsProps = stepsProps ? {
|
|
221
|
-
...stepsProps
|
|
222
|
-
} : {};
|
|
223
|
-
if ('direction' in processedStepsProps) {
|
|
224
|
-
processedStepsProps.orientation = processedStepsProps.direction;
|
|
225
|
-
delete processedStepsProps.direction;
|
|
226
|
-
}
|
|
227
218
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
228
219
|
className: `${prefixCls}-steps-container ${hashId}`.trim(),
|
|
229
220
|
style: {
|
|
230
221
|
maxWidth: Math.min(formArray.length * 320, 1160)
|
|
231
222
|
},
|
|
232
223
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.Steps, {
|
|
233
|
-
...
|
|
224
|
+
...stepsProps,
|
|
234
225
|
...itemsProps,
|
|
235
226
|
current: step,
|
|
236
227
|
onChange: undefined
|
package/lib/layout/ProLayout.js
CHANGED
|
@@ -234,7 +234,6 @@ const BaseProLayout = props => {
|
|
|
234
234
|
});
|
|
235
235
|
(0, _react.useEffect)(() => {
|
|
236
236
|
setMenuLoading(isLoading);
|
|
237
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
238
237
|
}, [isLoading]);
|
|
239
238
|
const {
|
|
240
239
|
cache
|
|
@@ -243,7 +242,6 @@ const BaseProLayout = props => {
|
|
|
243
242
|
return () => {
|
|
244
243
|
if (cache instanceof Map) cache.delete(defaultId);
|
|
245
244
|
};
|
|
246
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
247
245
|
}, []);
|
|
248
246
|
const menuInfoData = (0, _react.useMemo)(() => (0, _getMenuData.getMenuData)(data || route?.children || route?.routes || [], menu, formatMessage, menuDataRender), [formatMessage, menu, menuDataRender, data, route?.children]);
|
|
249
247
|
const {
|
|
@@ -406,7 +404,6 @@ const BaseProLayout = props => {
|
|
|
406
404
|
/** 页面切换的时候触发 */
|
|
407
405
|
(0, _react.useEffect)(() => {
|
|
408
406
|
props.onPageChange?.(props.location);
|
|
409
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
410
407
|
}, [location.pathname, location.pathname?.search]);
|
|
411
408
|
const [hasFooterToolbar, setHasFooterToolbar] = (0, _react.useState)(false);
|
|
412
409
|
/**
|
|
@@ -467,9 +464,7 @@ const BaseProLayout = props => {
|
|
|
467
464
|
flexDirection: siderMenuDom ? 'row' : undefined,
|
|
468
465
|
...style
|
|
469
466
|
},
|
|
470
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.ConfigProvider
|
|
471
|
-
// @ts-ignore
|
|
472
|
-
, {
|
|
467
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.ConfigProvider, {
|
|
473
468
|
theme: {
|
|
474
469
|
hashed: (0, _provider.isNeedOpenHash)(),
|
|
475
470
|
token: {
|
|
@@ -10,6 +10,10 @@ var _simple = require("./simple");
|
|
|
10
10
|
const genAppsLogoComponentsStyle = token => {
|
|
11
11
|
return {
|
|
12
12
|
[token.componentCls]: {
|
|
13
|
+
boxSizing: 'border-box',
|
|
14
|
+
'*, *::before, *::after': {
|
|
15
|
+
boxSizing: 'border-box'
|
|
16
|
+
},
|
|
13
17
|
'&-icon': {
|
|
14
18
|
display: 'inline-flex',
|
|
15
19
|
alignItems: 'center',
|
|
@@ -15,8 +15,6 @@ var _index = require("../../index");
|
|
|
15
15
|
var _style = require("./style");
|
|
16
16
|
var _stylish = require("./style/stylish");
|
|
17
17
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
18
|
-
/* eslint-disable react-hooks/exhaustive-deps */
|
|
19
|
-
|
|
20
18
|
const FooterToolbar = props => {
|
|
21
19
|
const {
|
|
22
20
|
children,
|
|
@@ -52,7 +50,6 @@ const FooterToolbar = props => {
|
|
|
52
50
|
return '100%';
|
|
53
51
|
}
|
|
54
52
|
return isMobile ? '100%' : `calc(100% - ${siderWidth}px)`;
|
|
55
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
56
53
|
}, [value.collapsed, value.hasSiderMenu, value.isMobile, value.siderWidth]);
|
|
57
54
|
const containerDom = (0, _react.useMemo)(() => {
|
|
58
55
|
if (typeof window === 'undefined' || typeof document === 'undefined') return null;
|
|
@@ -81,7 +78,6 @@ const FooterToolbar = props => {
|
|
|
81
78
|
return () => {
|
|
82
79
|
value?.setHasFooterToolbar?.(false);
|
|
83
80
|
};
|
|
84
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
85
81
|
}, []);
|
|
86
82
|
const renderDom = /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
87
83
|
className: (0, _clsx.clsx)(className, hashId, baseClassName, {
|
|
@@ -102,9 +102,7 @@ const DefaultHeader = props => {
|
|
|
102
102
|
});
|
|
103
103
|
if (layout === 'side' && !isMobile) return null;
|
|
104
104
|
return stylish.wrapSSR(wrapSSR( /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
|
|
105
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_antd.ConfigProvider
|
|
106
|
-
// @ts-ignore
|
|
107
|
-
, {
|
|
105
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_antd.ConfigProvider, {
|
|
108
106
|
theme: {
|
|
109
107
|
hashed: (0, _provider.isNeedOpenHash)(),
|
|
110
108
|
components: {
|
|
@@ -9,6 +9,10 @@ const [sm, md, lg, xl] = [576, 768, 992, 1200].map(bp => `@media (max-width: ${b
|
|
|
9
9
|
const genPageContainerStyle = token => {
|
|
10
10
|
return {
|
|
11
11
|
[token.componentCls]: {
|
|
12
|
+
boxSizing: 'border-box',
|
|
13
|
+
'*, *::before, *::after': {
|
|
14
|
+
boxSizing: 'border-box'
|
|
15
|
+
},
|
|
12
16
|
position: 'relative',
|
|
13
17
|
'&-children-container': {
|
|
14
18
|
paddingBlockStart: 0,
|
|
@@ -36,7 +36,6 @@ const BlockCheckbox = ({
|
|
|
36
36
|
})
|
|
37
37
|
}, item.key));
|
|
38
38
|
return domList;
|
|
39
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
40
39
|
}, [value, list?.length, onChange]);
|
|
41
40
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
42
41
|
className: (0, _clsx.clsx)(baseClassName, hashId),
|
|
@@ -8,6 +8,10 @@ var _provider = require("../../../../provider");
|
|
|
8
8
|
const genSettingDrawerStyle = token => {
|
|
9
9
|
return {
|
|
10
10
|
[`${token.componentCls}-handle`]: {
|
|
11
|
+
boxSizing: 'border-box',
|
|
12
|
+
'*, *::before, *::after': {
|
|
13
|
+
boxSizing: 'border-box'
|
|
14
|
+
},
|
|
11
15
|
position: 'fixed',
|
|
12
16
|
insetBlockStart: '240px',
|
|
13
17
|
insetInlineEnd: '0px',
|
|
@@ -163,7 +163,6 @@ class MenuUtil {
|
|
|
163
163
|
disabled: item.disabled,
|
|
164
164
|
key: item.key || item.path,
|
|
165
165
|
onClick: item.onTitleClick,
|
|
166
|
-
// eslint-disable-next-line react/no-is-mounted
|
|
167
166
|
label: this.getMenuItemPath(item, level, noGroupLevel)
|
|
168
167
|
};
|
|
169
168
|
};
|
|
@@ -381,7 +380,6 @@ const BaseMenu = props => {
|
|
|
381
380
|
setOpenKeys(matchMenuKeys);
|
|
382
381
|
setSelectedKeys(matchMenuKeys);
|
|
383
382
|
}
|
|
384
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
385
383
|
}, [matchMenuKeys.join('-')]);
|
|
386
384
|
(0, _react.useEffect)(() => {
|
|
387
385
|
// reset IconFont
|
|
@@ -413,9 +411,7 @@ const BaseMenu = props => {
|
|
|
413
411
|
},
|
|
414
412
|
// 依赖项加上 props.collapsed,保证折叠时能正确响应
|
|
415
413
|
[matchMenuKeys.join('-'), props.collapsed]);
|
|
416
|
-
const openKeysProps = (0, _react.useMemo)(() => getOpenKeysProps(openKeys, props),
|
|
417
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
418
|
-
[openKeys && openKeys.join(','), props.layout, props.collapsed]);
|
|
414
|
+
const openKeysProps = (0, _react.useMemo)(() => getOpenKeysProps(openKeys, props), [openKeys && openKeys.join(','), props.layout, props.collapsed]);
|
|
419
415
|
const {
|
|
420
416
|
wrapSSR,
|
|
421
417
|
hashId
|
|
@@ -458,7 +454,7 @@ const BaseMenu = props => {
|
|
|
458
454
|
}
|
|
459
455
|
return wrapSSR( /*#__PURE__*/(0, _react.createElement)(_antd.Menu, {
|
|
460
456
|
...openKeysProps,
|
|
461
|
-
|
|
457
|
+
tooltip: false,
|
|
462
458
|
key: "Menu",
|
|
463
459
|
mode: mode,
|
|
464
460
|
inlineIndent: 16,
|
|
@@ -175,9 +175,7 @@ const SiderMenu = props => {
|
|
|
175
175
|
}, index);
|
|
176
176
|
})
|
|
177
177
|
});
|
|
178
|
-
},
|
|
179
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
180
|
-
[actionsRender, baseClassName, collapsed]);
|
|
178
|
+
}, [actionsRender, baseClassName, collapsed]);
|
|
181
179
|
const appsDom = (0, _react.useMemo)(() => {
|
|
182
180
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_AppsLogoComponents.AppsLogoComponents, {
|
|
183
181
|
onItemClick: props.itemClick,
|
|
@@ -51,8 +51,7 @@ const TopNavHeader = props => {
|
|
|
51
51
|
token
|
|
52
52
|
} = (0, _react.useContext)(_provider.ProProvider);
|
|
53
53
|
const contentDom = (0, _react.useMemo)(() => {
|
|
54
|
-
const defaultDom = /*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.ConfigProvider
|
|
55
|
-
, {
|
|
54
|
+
const defaultDom = /*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.ConfigProvider, {
|
|
56
55
|
theme: {
|
|
57
56
|
hashed: (0, _provider.isNeedOpenHash)(),
|
|
58
57
|
components: {
|
|
@@ -11,6 +11,10 @@ const genProLayoutStyle = token => {
|
|
|
11
11
|
backgroundColor: 'transparent !important'
|
|
12
12
|
},
|
|
13
13
|
[token.componentCls]: {
|
|
14
|
+
boxSizing: 'border-box',
|
|
15
|
+
'*, *::before, *::after': {
|
|
16
|
+
boxSizing: 'border-box'
|
|
17
|
+
},
|
|
14
18
|
[`& ${token.antCls}-layout`]: {
|
|
15
19
|
display: 'flex',
|
|
16
20
|
backgroundColor: 'transparent',
|
package/lib/list/Item.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { ListGridType } from 'antd/lib/list';
|
|
2
1
|
import type { ExpandableConfig } from 'antd/lib/table/interface';
|
|
3
2
|
import React from 'react';
|
|
4
3
|
import type { CheckCardProps } from '../card';
|
|
5
4
|
import type { GetComponentProps } from './index';
|
|
5
|
+
import type { ListGridType } from './ProListBase';
|
|
6
6
|
export type RenderExpandIconProps<RecordType> = {
|
|
7
7
|
prefixCls: string;
|
|
8
8
|
expanded: boolean;
|
|
@@ -39,11 +39,8 @@ export type ItemProps<RecordType> = {
|
|
|
39
39
|
grid?: ListGridType;
|
|
40
40
|
expand?: boolean;
|
|
41
41
|
rowSupportExpand?: boolean;
|
|
42
|
-
cardActionProps?: 'actions' | 'extra';
|
|
43
42
|
onExpand?: (expand: boolean) => void;
|
|
44
43
|
expandable?: ExpandableConfig<any>;
|
|
45
|
-
showActions?: 'hover' | 'always';
|
|
46
|
-
showExtra?: 'hover' | 'always';
|
|
47
44
|
type?: 'new' | 'top' | 'inline' | 'subheader';
|
|
48
45
|
isEditable: boolean;
|
|
49
46
|
recordKey: string | number | undefined;
|
package/lib/list/Item.js
CHANGED
|
@@ -13,6 +13,7 @@ var _clsx = require("clsx");
|
|
|
13
13
|
var _react = _interopRequireWildcard(require("react"));
|
|
14
14
|
var _card = require("../card");
|
|
15
15
|
var _provider = require("../provider");
|
|
16
|
+
var _ProListBase = require("./ProListBase");
|
|
16
17
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
17
18
|
function renderExpandIcon({
|
|
18
19
|
prefixCls,
|
|
@@ -45,26 +46,26 @@ function renderExpandIcon({
|
|
|
45
46
|
});
|
|
46
47
|
}
|
|
47
48
|
function ProListItem(props) {
|
|
48
|
-
const {
|
|
49
|
-
prefixCls: customizePrefixCls
|
|
50
|
-
} = props;
|
|
51
49
|
const {
|
|
52
50
|
getPrefixCls
|
|
53
51
|
} = (0, _react.useContext)(_antd.ConfigProvider.ConfigContext);
|
|
54
52
|
const {
|
|
55
53
|
hashId
|
|
56
54
|
} = (0, _react.useContext)(_provider.ProProvider);
|
|
57
|
-
const prefixCls = getPrefixCls('pro-list',
|
|
55
|
+
const prefixCls = getPrefixCls('pro-list', props.prefixCls);
|
|
58
56
|
const defaultClassName = `${prefixCls}-row`;
|
|
59
57
|
const {
|
|
60
58
|
title,
|
|
61
59
|
subTitle,
|
|
62
60
|
content,
|
|
63
61
|
itemTitleRender,
|
|
64
|
-
prefixCls:
|
|
62
|
+
prefixCls: _prefixCls,
|
|
63
|
+
// eslint-disable-line @typescript-eslint/no-unused-vars
|
|
65
64
|
actions,
|
|
66
|
-
item,
|
|
67
|
-
|
|
65
|
+
item: _item,
|
|
66
|
+
// eslint-disable-line @typescript-eslint/no-unused-vars
|
|
67
|
+
recordKey: _recordKey,
|
|
68
|
+
// eslint-disable-line @typescript-eslint/no-unused-vars
|
|
68
69
|
avatar,
|
|
69
70
|
cardProps,
|
|
70
71
|
description,
|
|
@@ -77,8 +78,6 @@ function ProListItem(props) {
|
|
|
77
78
|
onExpand: propsOnExpand,
|
|
78
79
|
expandable: expandableConfig,
|
|
79
80
|
rowSupportExpand,
|
|
80
|
-
showActions,
|
|
81
|
-
showExtra,
|
|
82
81
|
type,
|
|
83
82
|
style,
|
|
84
83
|
className: propsClassName = defaultClassName,
|
|
@@ -86,7 +85,6 @@ function ProListItem(props) {
|
|
|
86
85
|
onRow,
|
|
87
86
|
onItem,
|
|
88
87
|
itemHeaderRender,
|
|
89
|
-
cardActionProps,
|
|
90
88
|
extra,
|
|
91
89
|
...rest
|
|
92
90
|
} = props;
|
|
@@ -107,37 +105,14 @@ function ProListItem(props) {
|
|
|
107
105
|
}, [propsOnExpand]);
|
|
108
106
|
const className = (0, _clsx.clsx)({
|
|
109
107
|
[`${defaultClassName}-selected`]: !cardProps && selected,
|
|
110
|
-
[`${defaultClassName}-show-action-hover`]: showActions === 'hover',
|
|
111
108
|
[`${defaultClassName}-type-${type}`]: !!type,
|
|
112
|
-
[`${defaultClassName}-editable`]: isEditable
|
|
113
|
-
[`${defaultClassName}-show-extra-hover`]: showExtra === 'hover'
|
|
109
|
+
[`${defaultClassName}-editable`]: isEditable
|
|
114
110
|
}, hashId, defaultClassName);
|
|
115
|
-
const extraClassName = (0, _clsx.clsx)(hashId, {
|
|
116
|
-
[`${propsClassName}-extra`]: showExtra === 'hover'
|
|
117
|
-
});
|
|
118
111
|
const needExpanded = expanded || Object.values(expandableConfig || {}).length === 0;
|
|
119
112
|
const expandedRowDom = expandedRowRender && expandedRowRender(record, index, indentSize, expanded);
|
|
120
|
-
const
|
|
121
|
-
if (!actions || cardActionProps === 'actions') {
|
|
122
|
-
return undefined;
|
|
123
|
-
}
|
|
124
|
-
return [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
125
|
-
onClick: e => e.stopPropagation(),
|
|
126
|
-
children: actions
|
|
127
|
-
}, "action")];
|
|
128
|
-
}, [actions, cardActionProps]);
|
|
129
|
-
const actionsDom = (0, _react.useMemo)(() => {
|
|
130
|
-
if (!actions || !cardActionProps || cardActionProps === 'extra') {
|
|
131
|
-
return undefined;
|
|
132
|
-
}
|
|
133
|
-
return [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
134
|
-
className: `${defaultClassName}-actions ${hashId}`.trim(),
|
|
135
|
-
onClick: e => e.stopPropagation(),
|
|
136
|
-
children: actions
|
|
137
|
-
}, "action")];
|
|
138
|
-
}, [actions, cardActionProps, defaultClassName, hashId]);
|
|
113
|
+
const actionsArray = (0, _react.useMemo)(() => actions ? _react.default.Children.toArray(actions) : undefined, [actions]);
|
|
139
114
|
const titleDom = title || subTitle ? /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
140
|
-
className: `${defaultClassName}-header-container
|
|
115
|
+
className: (0, _clsx.clsx)(`${defaultClassName}-header-container`, hashId),
|
|
141
116
|
children: [title && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
142
117
|
className: (0, _clsx.clsx)(`${defaultClassName}-title`, hashId, {
|
|
143
118
|
[`${defaultClassName}-title-editable`]: isEditable
|
|
@@ -151,41 +126,77 @@ function ProListItem(props) {
|
|
|
151
126
|
})]
|
|
152
127
|
}) : null;
|
|
153
128
|
const metaTitle = (itemTitleRender && itemTitleRender?.(record, index, titleDom)) ?? titleDom;
|
|
154
|
-
const metaDom = metaTitle || avatar || subTitle || description ? /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
129
|
+
const metaDom = metaTitle || avatar || subTitle || description ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_ProListBase.ProListItemMeta, {
|
|
155
130
|
avatar: avatar,
|
|
156
131
|
title: metaTitle,
|
|
157
132
|
description: description && needExpanded && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
158
|
-
className: `${className}-description
|
|
133
|
+
className: (0, _clsx.clsx)(`${className}-description`, hashId),
|
|
159
134
|
children: description
|
|
160
135
|
})
|
|
161
136
|
}) : null;
|
|
137
|
+
const itemProps = onItem?.(record, index);
|
|
138
|
+
const hasExpandableConfig = Object.keys(expandableConfig || {}).length > 0;
|
|
139
|
+
const expandedRowClassStr = typeof expandedRowClassName === 'function' ? expandedRowClassName(record, index, indentSize) : expandedRowClassName;
|
|
140
|
+
const headerDom = typeof itemHeaderRender === 'function' ? itemHeaderRender(record, index, metaDom) : metaDom;
|
|
141
|
+
|
|
142
|
+
// 卡片模式渲染
|
|
143
|
+
if (cardProps) {
|
|
144
|
+
const cardTitleDom = avatar || title ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
145
|
+
children: [avatar, /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
146
|
+
className: (0, _clsx.clsx)(`${prefixCls}-item-meta-title`, hashId),
|
|
147
|
+
children: title
|
|
148
|
+
})]
|
|
149
|
+
}) : null;
|
|
150
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
151
|
+
className: (0, _clsx.clsx)(hashId, `${className}-card-container`, {
|
|
152
|
+
[propsClassName]: propsClassName !== defaultClassName
|
|
153
|
+
}),
|
|
154
|
+
style: style,
|
|
155
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_card.CheckCard, {
|
|
156
|
+
bordered: true,
|
|
157
|
+
style: {
|
|
158
|
+
width: '100%'
|
|
159
|
+
},
|
|
160
|
+
className: (0, _clsx.clsx)(`${defaultClassName}-card`, hashId),
|
|
161
|
+
...cardProps,
|
|
162
|
+
title: cardTitleDom,
|
|
163
|
+
subTitle: subTitle,
|
|
164
|
+
extra: actionsArray,
|
|
165
|
+
bodyStyle: {
|
|
166
|
+
padding: 24,
|
|
167
|
+
...cardProps.bodyStyle
|
|
168
|
+
},
|
|
169
|
+
...itemProps,
|
|
170
|
+
onClick: e => {
|
|
171
|
+
cardProps?.onClick?.(e);
|
|
172
|
+
itemProps?.onClick?.(e);
|
|
173
|
+
},
|
|
174
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.Skeleton, {
|
|
175
|
+
avatar: true,
|
|
176
|
+
title: false,
|
|
177
|
+
loading: loading,
|
|
178
|
+
active: true,
|
|
179
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
180
|
+
className: (0, _clsx.clsx)(`${className}-header`, hashId),
|
|
181
|
+
children: [typeof itemTitleRender === 'function' && itemTitleRender(record, index, titleDom), content]
|
|
182
|
+
})
|
|
183
|
+
})
|
|
184
|
+
})
|
|
185
|
+
});
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
// 列表模式渲染
|
|
162
189
|
const rowClassName = (0, _clsx.clsx)(hashId, {
|
|
163
190
|
[`${defaultClassName}-item-has-checkbox`]: checkbox,
|
|
164
191
|
[`${defaultClassName}-item-has-avatar`]: avatar,
|
|
165
192
|
[className]: className
|
|
166
193
|
});
|
|
167
|
-
|
|
168
|
-
if (avatar || title) {
|
|
169
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
170
|
-
children: [avatar, /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
171
|
-
className: `${getPrefixCls('list-item-meta-title')} ${hashId}`.trim(),
|
|
172
|
-
children: title
|
|
173
|
-
})]
|
|
174
|
-
});
|
|
175
|
-
}
|
|
176
|
-
return null;
|
|
177
|
-
}, [avatar, getPrefixCls, hashId, title]);
|
|
178
|
-
const itemProps = onItem?.(record, index);
|
|
179
|
-
const defaultDom = !cardProps ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.List.Item, {
|
|
194
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ProListBase.ProListItem, {
|
|
180
195
|
className: (0, _clsx.clsx)(rowClassName, hashId, {
|
|
181
196
|
[propsClassName]: propsClassName !== defaultClassName
|
|
182
197
|
}),
|
|
183
198
|
...rest,
|
|
184
|
-
|
|
185
|
-
extra: !!extra && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
186
|
-
className: extraClassName,
|
|
187
|
-
children: extra
|
|
188
|
-
}),
|
|
199
|
+
extra: extra,
|
|
189
200
|
...onRow?.(record, index),
|
|
190
201
|
...itemProps,
|
|
191
202
|
onClick: e => {
|
|
@@ -201,13 +212,13 @@ function ProListItem(props) {
|
|
|
201
212
|
loading: loading,
|
|
202
213
|
active: true,
|
|
203
214
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
204
|
-
className: `${className}-header
|
|
215
|
+
className: (0, _clsx.clsx)(`${className}-header`, hashId),
|
|
205
216
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
206
|
-
className: `${className}-header-option
|
|
217
|
+
className: (0, _clsx.clsx)(`${className}-header-option`, hashId),
|
|
207
218
|
children: [!!checkbox && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
208
|
-
className: `${className}-checkbox
|
|
219
|
+
className: (0, _clsx.clsx)(`${className}-checkbox`, hashId),
|
|
209
220
|
children: checkbox
|
|
210
|
-
}),
|
|
221
|
+
}), hasExpandableConfig && rowSupportExpand && renderExpandIcon({
|
|
211
222
|
prefixCls,
|
|
212
223
|
hashId,
|
|
213
224
|
expandIcon,
|
|
@@ -215,55 +226,15 @@ function ProListItem(props) {
|
|
|
215
226
|
expanded,
|
|
216
227
|
record
|
|
217
228
|
})]
|
|
218
|
-
}),
|
|
229
|
+
}), headerDom, actionsArray]
|
|
219
230
|
}), needExpanded && (content || expandedRowDom) && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
220
|
-
className: `${className}-content
|
|
231
|
+
className: (0, _clsx.clsx)(`${className}-content`, hashId),
|
|
221
232
|
children: [content, expandedRowRender && rowSupportExpand && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
222
|
-
className:
|
|
233
|
+
className: expandedRowClassStr,
|
|
223
234
|
children: expandedRowDom
|
|
224
235
|
})]
|
|
225
236
|
})]
|
|
226
237
|
})
|
|
227
|
-
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_card.CheckCard, {
|
|
228
|
-
bordered: true,
|
|
229
|
-
style: {
|
|
230
|
-
width: '100%'
|
|
231
|
-
},
|
|
232
|
-
...cardProps,
|
|
233
|
-
title: cardTitleDom,
|
|
234
|
-
subTitle: subTitle,
|
|
235
|
-
extra: extraDom,
|
|
236
|
-
actions: actionsDom,
|
|
237
|
-
bodyStyle: {
|
|
238
|
-
padding: 24,
|
|
239
|
-
...cardProps.bodyStyle
|
|
240
|
-
},
|
|
241
|
-
...itemProps,
|
|
242
|
-
onClick: e => {
|
|
243
|
-
cardProps?.onClick?.(e);
|
|
244
|
-
itemProps?.onClick?.(e);
|
|
245
|
-
},
|
|
246
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.Skeleton, {
|
|
247
|
-
avatar: true,
|
|
248
|
-
title: false,
|
|
249
|
-
loading: loading,
|
|
250
|
-
active: true,
|
|
251
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
252
|
-
className: `${className}-header ${hashId}`.trim(),
|
|
253
|
-
children: [itemTitleRender && itemTitleRender?.(record, index, titleDom), content]
|
|
254
|
-
})
|
|
255
|
-
})
|
|
256
|
-
});
|
|
257
|
-
if (!cardProps) {
|
|
258
|
-
return defaultDom;
|
|
259
|
-
}
|
|
260
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
261
|
-
className: (0, _clsx.clsx)(hashId, {
|
|
262
|
-
[`${className}-card`]: cardProps,
|
|
263
|
-
[propsClassName]: propsClassName !== defaultClassName
|
|
264
|
-
}),
|
|
265
|
-
style: style,
|
|
266
|
-
children: defaultDom
|
|
267
238
|
});
|
|
268
239
|
}
|
|
269
240
|
var _default = exports.default = ProListItem;
|