@ant-design/pro-components 3.1.4-0 → 3.1.6-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/ProCard.js +15 -7
- package/es/card/components/Card/index.js +43 -19
- package/es/card/components/Card/style.js +12 -1
- package/es/card/components/Statistic/index.js +2 -2
- package/es/card/components/StatisticCard/index.js +1 -1
- package/es/card/typing.d.ts +27 -8
- package/es/field/AllProField.d.ts +2 -0
- package/es/field/AllProField.js +3 -0
- package/es/field/PureProField.d.ts +2 -0
- package/es/field/PureProField.js +2 -0
- package/es/field/components/Cascader/index.js +8 -1
- package/es/field/components/Checkbox/index.js +5 -1
- package/es/field/components/ColorPicker/index.d.ts +1 -1
- package/es/field/components/DatePicker/index.d.ts +1 -1
- package/es/field/components/DatePicker/index.js +13 -1
- package/es/field/components/Digit/index.js +20 -3
- package/es/field/components/Money/index.js +51 -3
- package/es/field/components/Password/index.js +12 -11
- package/es/field/components/Radio/index.js +5 -1
- package/es/field/components/RangePicker/index.d.ts +1 -1
- package/es/field/components/Segmented/index.js +2 -1
- package/es/field/components/Select/SearchSelect/index.js +3 -5
- package/es/field/components/Select/index.d.ts +1 -1
- package/es/field/components/Select/index.js +1 -1
- package/es/field/components/Switch/index.js +10 -2
- package/es/field/components/Text/index.js +7 -1
- package/es/field/components/TextArea/index.js +6 -3
- package/es/field/components/TimePicker/index.js +10 -1
- package/es/field/components/TreeSelect/index.d.ts +2 -12
- package/es/field/components/TreeSelect/index.js +31 -17
- package/es/form/BaseForm/BaseForm.js +4 -3
- package/es/form/BaseForm/Submitter/index.d.ts +1 -1
- package/es/form/components/Digit/DigitRange.js +5 -2
- package/es/form/components/Digit/index.js +7 -2
- package/es/form/components/FormItem/FormItemRender/index.d.ts +1 -1
- package/es/form/components/FormItem/FormItemRender/index.js +10 -2
- package/es/form/components/FormItem/Group/index.js +12 -2
- package/es/form/components/List/ListContainer.js +2 -1
- package/es/form/components/Select/index.js +11 -1
- package/es/form/layouts/DrawerForm/index.d.ts +4 -4
- package/es/form/layouts/DrawerForm/index.js +1 -1
- package/es/form/layouts/LightFilter/index.js +22 -31
- package/es/form/layouts/LoginForm/index.js +10 -9
- package/es/form/layouts/LoginFormPage/index.js +17 -16
- package/es/form/layouts/ModalForm/index.d.ts +2 -2
- package/es/form/layouts/ProForm/index.d.ts +1 -1
- package/es/form/layouts/QueryFilter/Actions.js +2 -1
- package/es/form/layouts/QueryFilter/index.js +40 -23
- package/es/form/layouts/StepsForm/index.js +2 -2
- package/es/layout/ProLayout.d.ts +3 -3
- package/es/layout/ProLayout.js +13 -25
- package/es/layout/components/AppsLogoComponents/DefaultContent.js +6 -5
- package/es/layout/components/AppsLogoComponents/SimpleContent.js +6 -5
- package/es/layout/components/FooterToolbar/index.d.ts +1 -1
- package/es/layout/components/FooterToolbar/index.js +2 -2
- package/es/layout/components/GlobalFooter/index.js +3 -3
- package/es/layout/components/GlobalHeader/ActionsContent.js +6 -6
- package/es/layout/components/GlobalHeader/index.js +1 -1
- package/es/layout/components/GridContent/index.js +1 -1
- package/es/layout/components/Help/ProHelpPanel.js +11 -10
- package/es/layout/components/PageContainer/index.js +9 -9
- package/es/layout/components/PageHeader/index.js +10 -10
- package/es/layout/components/SettingDrawer/BlockCheckbox.js +2 -2
- package/es/layout/components/SettingDrawer/LayoutChange.js +3 -2
- package/es/layout/components/SettingDrawer/RegionalChange.js +3 -2
- package/es/layout/components/SettingDrawer/ThemeColor.js +3 -2
- package/es/layout/components/SettingDrawer/index.js +5 -4
- package/es/layout/components/SiderMenu/BaseMenu.js +3 -3
- package/es/layout/components/SiderMenu/SiderMenu.js +5 -5
- package/es/layout/components/TopNavHeader/index.js +3 -3
- package/es/layout/utils/getBreadcrumbProps.js +1 -1
- package/es/list/Item.d.ts +3 -3
- package/es/list/Item.js +8 -1
- package/es/list/ListView.js +1 -2
- package/es/list/ProListBase.d.ts +1 -1
- package/es/list/ProListBase.js +43 -37
- package/es/list/style/index.js +13 -0
- package/es/provider/index.d.ts +2 -2
- package/es/table/Table.js +14 -5
- package/es/table/components/Alert/index.js +6 -5
- package/es/table/components/ColumnSetting/index.js +9 -9
- package/es/table/components/DragSortTable/index.js +8 -4
- package/es/table/components/EditableTable/index.d.ts +1 -1
- package/es/table/components/EditableTable/index.js +5 -70
- package/es/table/components/ListToolBar/HeaderMenu.d.ts +1 -0
- package/es/table/components/ListToolBar/HeaderMenu.js +4 -3
- package/es/table/components/ListToolBar/index.js +15 -12
- package/es/table/components/ListToolBar/style.js +2 -2
- package/es/table/components/ToolBar/DensityIcon.d.ts +2 -2
- package/es/table/components/ToolBar/DensityIcon.js +6 -3
- package/es/table/components/ToolBar/FullscreenIcon.d.ts +1 -1
- package/es/table/components/ToolBar/FullscreenIcon.js +11 -5
- package/es/table/useFetchData.js +4 -1
- package/es/table/utils/cellRenderToFromItem.js +1 -1
- package/es/table/utils/useDragSort.js +1 -1
- package/es/utils/components/DropdownFooter/index.d.ts +1 -1
- package/es/utils/components/FieldLabel/index.js +1 -1
- package/es/utils/components/FilterDropdown/index.d.ts +1 -1
- package/es/utils/components/FilterDropdown/index.js +1 -1
- package/es/utils/components/InlineErrorFormItem/index.js +5 -4
- package/es/utils/components/LabelIconTip/index.js +2 -2
- package/es/utils/hooks/useFetchData/index.js +0 -2
- package/es/utils/isUrl/index.js +1 -1
- package/es/utils/proFieldParsingText/index.d.ts +2 -2
- package/es/utils/proFieldParsingText/index.js +2 -2
- package/guidelines/components/pro-card.md +5 -4
- package/lib/card/ProCard.js +15 -7
- package/lib/card/components/Card/index.js +43 -19
- package/lib/card/components/Card/style.js +12 -1
- package/lib/card/components/Statistic/index.js +2 -2
- package/lib/card/components/StatisticCard/index.js +1 -1
- package/lib/card/typing.d.ts +27 -8
- package/lib/field/AllProField.d.ts +2 -0
- package/lib/field/AllProField.js +3 -0
- package/lib/field/PureProField.d.ts +2 -0
- package/lib/field/PureProField.js +2 -0
- package/lib/field/components/Cascader/index.js +8 -1
- package/lib/field/components/Checkbox/index.js +5 -1
- package/lib/field/components/ColorPicker/index.d.ts +1 -1
- package/lib/field/components/DatePicker/index.d.ts +1 -1
- package/lib/field/components/DatePicker/index.js +13 -1
- package/lib/field/components/Digit/index.js +20 -3
- package/lib/field/components/Money/index.js +50 -2
- package/lib/field/components/Password/index.js +11 -10
- package/lib/field/components/Percent/util.d.ts +1 -1
- package/lib/field/components/Radio/index.js +5 -1
- package/lib/field/components/RangePicker/index.d.ts +1 -1
- package/lib/field/components/Segmented/index.js +2 -1
- package/lib/field/components/Select/SearchSelect/index.js +2 -4
- package/lib/field/components/Select/index.d.ts +1 -1
- package/lib/field/components/Select/index.js +1 -1
- package/lib/field/components/Switch/index.js +10 -2
- package/lib/field/components/Text/index.js +7 -1
- package/lib/field/components/TextArea/index.js +6 -3
- package/lib/field/components/TimePicker/index.js +10 -1
- package/lib/field/components/TreeSelect/index.d.ts +2 -12
- package/lib/field/components/TreeSelect/index.js +30 -16
- package/lib/form/BaseForm/BaseForm.js +4 -3
- package/lib/form/BaseForm/Submitter/index.d.ts +1 -1
- package/lib/form/components/Digit/DigitRange.js +5 -2
- package/lib/form/components/Digit/index.js +7 -2
- package/lib/form/components/FormItem/FormItemRender/index.d.ts +1 -1
- package/lib/form/components/FormItem/FormItemRender/index.js +10 -2
- package/lib/form/components/FormItem/Group/index.js +12 -2
- package/lib/form/components/List/ListContainer.js +2 -1
- package/lib/form/components/Select/index.js +11 -1
- package/lib/form/layouts/DrawerForm/index.d.ts +4 -4
- package/lib/form/layouts/DrawerForm/index.js +1 -1
- package/lib/form/layouts/LightFilter/index.js +21 -30
- package/lib/form/layouts/LoginForm/index.js +10 -9
- package/lib/form/layouts/LoginFormPage/index.js +17 -16
- package/lib/form/layouts/ModalForm/index.d.ts +2 -2
- package/lib/form/layouts/ProForm/index.d.ts +1 -1
- package/lib/form/layouts/QueryFilter/Actions.js +2 -1
- package/lib/form/layouts/QueryFilter/index.js +39 -22
- package/lib/form/layouts/StepsForm/index.js +2 -2
- package/lib/layout/ProLayout.d.ts +3 -3
- package/lib/layout/ProLayout.js +13 -25
- package/lib/layout/components/AppsLogoComponents/DefaultContent.js +6 -5
- package/lib/layout/components/AppsLogoComponents/SimpleContent.js +6 -5
- package/lib/layout/components/FooterToolbar/index.d.ts +1 -1
- package/lib/layout/components/FooterToolbar/index.js +2 -2
- package/lib/layout/components/GlobalFooter/index.js +3 -3
- package/lib/layout/components/GlobalHeader/ActionsContent.js +6 -6
- package/lib/layout/components/GlobalHeader/index.js +1 -1
- package/lib/layout/components/GridContent/index.js +1 -1
- package/lib/layout/components/Help/ProHelpPanel.js +11 -10
- package/lib/layout/components/PageContainer/index.js +9 -9
- package/lib/layout/components/PageHeader/index.js +10 -10
- package/lib/layout/components/SettingDrawer/BlockCheckbox.js +2 -2
- package/lib/layout/components/SettingDrawer/LayoutChange.js +3 -2
- package/lib/layout/components/SettingDrawer/RegionalChange.js +3 -2
- package/lib/layout/components/SettingDrawer/ThemeColor.js +3 -2
- package/lib/layout/components/SettingDrawer/index.js +5 -4
- package/lib/layout/components/SiderMenu/BaseMenu.js +3 -3
- package/lib/layout/components/SiderMenu/SiderMenu.js +5 -5
- package/lib/layout/components/TopNavHeader/index.js +3 -3
- package/lib/layout/utils/getBreadcrumbProps.js +1 -1
- package/lib/list/Item.d.ts +3 -3
- package/lib/list/Item.js +8 -1
- package/lib/list/ListView.js +1 -2
- package/lib/list/ProListBase.d.ts +1 -1
- package/lib/list/ProListBase.js +42 -36
- package/lib/list/style/index.js +13 -0
- package/lib/provider/index.d.ts +2 -2
- package/lib/table/Table.js +14 -5
- package/lib/table/components/Alert/index.js +6 -5
- package/lib/table/components/ColumnSetting/index.js +9 -9
- package/lib/table/components/DragSortTable/index.js +8 -4
- package/lib/table/components/EditableTable/index.d.ts +1 -1
- package/lib/table/components/EditableTable/index.js +5 -70
- package/lib/table/components/ListToolBar/HeaderMenu.d.ts +1 -0
- package/lib/table/components/ListToolBar/HeaderMenu.js +4 -3
- package/lib/table/components/ListToolBar/index.js +15 -12
- package/lib/table/components/ListToolBar/style.js +2 -2
- package/lib/table/components/ToolBar/DensityIcon.d.ts +2 -2
- package/lib/table/components/ToolBar/DensityIcon.js +6 -3
- package/lib/table/components/ToolBar/FullscreenIcon.d.ts +1 -1
- package/lib/table/components/ToolBar/FullscreenIcon.js +11 -5
- package/lib/table/useFetchData.js +4 -1
- package/lib/table/utils/cellRenderToFromItem.js +1 -1
- package/lib/table/utils/useDragSort.js +1 -1
- package/lib/utils/components/DropdownFooter/index.d.ts +1 -1
- package/lib/utils/components/FieldLabel/index.js +1 -1
- package/lib/utils/components/FilterDropdown/index.d.ts +1 -1
- package/lib/utils/components/FilterDropdown/index.js +1 -1
- package/lib/utils/components/InlineErrorFormItem/index.js +5 -4
- package/lib/utils/components/LabelIconTip/index.js +2 -2
- package/lib/utils/hooks/useFetchData/index.js +0 -2
- package/lib/utils/isUrl/index.js +1 -1
- package/lib/utils/proFieldParsingText/index.d.ts +2 -2
- package/lib/utils/proFieldParsingText/index.js +2 -2
- package/package.json +31 -30
|
@@ -58,7 +58,7 @@ const CheckboxListItem = ({
|
|
|
58
58
|
hashId
|
|
59
59
|
} = useContext(ProProvider);
|
|
60
60
|
const dom = /*#__PURE__*/_jsxs("span", {
|
|
61
|
-
className: `${className}-list-item-option
|
|
61
|
+
className: clsx(`${className}-list-item-option`, hashId),
|
|
62
62
|
children: [/*#__PURE__*/_jsx(ToolTipIcon, {
|
|
63
63
|
columnKey: columnKey,
|
|
64
64
|
fixed: "left",
|
|
@@ -80,9 +80,9 @@ const CheckboxListItem = ({
|
|
|
80
80
|
})]
|
|
81
81
|
});
|
|
82
82
|
return /*#__PURE__*/_jsxs("span", {
|
|
83
|
-
className: `${className}-list-item
|
|
83
|
+
className: clsx(`${className}-list-item`, hashId),
|
|
84
84
|
children: [/*#__PURE__*/_jsx("div", {
|
|
85
|
-
className: `${className}-list-item-title
|
|
85
|
+
className: clsx(`${className}-list-item-title`, hashId),
|
|
86
86
|
children: title
|
|
87
87
|
}), showListItemOption && !isLeaf ? dom : null]
|
|
88
88
|
}, columnKey);
|
|
@@ -113,7 +113,7 @@ const CheckboxList = ({
|
|
|
113
113
|
const treeMap = new Map();
|
|
114
114
|
const loopData = (data, parentConfig) => data.map(({
|
|
115
115
|
key,
|
|
116
|
-
dataIndex,
|
|
116
|
+
dataIndex: _dataIndex,
|
|
117
117
|
children,
|
|
118
118
|
...rest
|
|
119
119
|
}) => {
|
|
@@ -261,13 +261,13 @@ const CheckboxList = ({
|
|
|
261
261
|
},
|
|
262
262
|
height: listHeight,
|
|
263
263
|
treeData: treeDataConfig.list?.map(({
|
|
264
|
-
disabled /* 不透传 disabled,使子节点禁用时也可以拖动调整顺序 */,
|
|
264
|
+
disabled: _disabled /* 不透传 disabled,使子节点禁用时也可以拖动调整顺序 */,
|
|
265
265
|
...config
|
|
266
266
|
}) => config)
|
|
267
267
|
});
|
|
268
268
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
269
269
|
children: [showTitle && /*#__PURE__*/_jsx("span", {
|
|
270
|
-
className: `${className}-list-title
|
|
270
|
+
className: clsx(`${className}-list-title`, hashId),
|
|
271
271
|
children: listTitle
|
|
272
272
|
}), listDom]
|
|
273
273
|
});
|
|
@@ -424,7 +424,7 @@ function ColumnSetting(props) {
|
|
|
424
424
|
return wrapSSR( /*#__PURE__*/_jsx(Popover, {
|
|
425
425
|
arrow: false,
|
|
426
426
|
title: /*#__PURE__*/_jsxs("div", {
|
|
427
|
-
className: `${className}-title
|
|
427
|
+
className: clsx(`${className}-title`, hashId),
|
|
428
428
|
children: [props.checkable === false ? /*#__PURE__*/_jsx("div", {}) : /*#__PURE__*/_jsx(Checkbox, {
|
|
429
429
|
indeterminate: indeterminate,
|
|
430
430
|
checked: unCheckedKeys.length === 0 && unCheckedKeys.length !== localColumns.length,
|
|
@@ -434,7 +434,7 @@ function ColumnSetting(props) {
|
|
|
434
434
|
children: intl.getMessage('tableToolBar.columnDisplay', '列展示')
|
|
435
435
|
}), checkedReset ? /*#__PURE__*/_jsx("a", {
|
|
436
436
|
onClick: clearClick,
|
|
437
|
-
className: `${className}-action-rest-button
|
|
437
|
+
className: clsx(`${className}-action-rest-button`, hashId),
|
|
438
438
|
children: intl.getMessage('tableToolBar.reset', '重置')
|
|
439
439
|
}) : null, props?.extra ? /*#__PURE__*/_jsx(Space, {
|
|
440
440
|
size: 12,
|
|
@@ -443,7 +443,7 @@ function ColumnSetting(props) {
|
|
|
443
443
|
}) : null]
|
|
444
444
|
}),
|
|
445
445
|
classNames: {
|
|
446
|
-
root: `${className}-overlay
|
|
446
|
+
root: clsx(`${className}-overlay`, hashId)
|
|
447
447
|
},
|
|
448
448
|
trigger: "click",
|
|
449
449
|
placement: "bottomRight",
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { HolderOutlined } from '@ant-design/icons';
|
|
2
2
|
import { useControlledState } from '@rc-component/util';
|
|
3
3
|
import { ConfigProvider } from 'antd';
|
|
4
|
+
import { clsx } from 'clsx';
|
|
4
5
|
import React, { useCallback, useContext, useMemo } from 'react';
|
|
5
6
|
import ProTable from "../../Table";
|
|
6
7
|
import { useDragSort } from "../../utils/useDragSort";
|
|
@@ -25,7 +26,10 @@ function DragSortTable(props) {
|
|
|
25
26
|
const setDataSource = useCallback(updater => {
|
|
26
27
|
setDataSourceInner(prev => {
|
|
27
28
|
const next = typeof updater === 'function' ? updater(prev) : updater;
|
|
28
|
-
|
|
29
|
+
// 使用 queueMicrotask 延迟回调,避免在渲染期间更新其他组件状态
|
|
30
|
+
queueMicrotask(() => {
|
|
31
|
+
onDataSourceChange?.(next);
|
|
32
|
+
});
|
|
29
33
|
return next;
|
|
30
34
|
});
|
|
31
35
|
}, [onDataSourceChange]);
|
|
@@ -38,14 +42,14 @@ function DragSortTable(props) {
|
|
|
38
42
|
const DragHandle = useMemo(() => {
|
|
39
43
|
return dragHandleProps => {
|
|
40
44
|
const {
|
|
41
|
-
rowData,
|
|
42
|
-
index,
|
|
45
|
+
rowData: _rowData,
|
|
46
|
+
index: _index,
|
|
43
47
|
className,
|
|
44
48
|
...rest
|
|
45
49
|
} = dragHandleProps;
|
|
46
50
|
const defaultDom = /*#__PURE__*/_jsx(HolderOutlined, {
|
|
47
51
|
...rest,
|
|
48
|
-
className:
|
|
52
|
+
className: clsx(getPrefixCls('pro-table-drag-icon'), className, hashId)
|
|
49
53
|
});
|
|
50
54
|
const handel = dragSortHandlerRender ? dragSortHandlerRender(dragHandleProps?.rowData, dragHandleProps?.index) : defaultDom;
|
|
51
55
|
return /*#__PURE__*/_jsx("div", {
|
|
@@ -86,7 +86,7 @@ export type EditableProTableProps<T, U extends ParamsType, ValueType = 'text'> =
|
|
|
86
86
|
declare function FieldEditableTable<DataType extends Record<string, any>, Params extends ParamsType = ParamsType, ValueType = 'text'>(props: EditableProTableProps<DataType, Params, ValueType>): import("react/jsx-runtime").JSX.Element;
|
|
87
87
|
declare namespace FieldEditableTable {
|
|
88
88
|
var RecordCreator: <T = Record<string, any>>(props: RecordCreatorProps<T> & {
|
|
89
|
-
children: JSX.Element;
|
|
89
|
+
children: React.JSX.Element;
|
|
90
90
|
}) => React.FunctionComponentElement<any>;
|
|
91
91
|
}
|
|
92
92
|
export default FieldEditableTable;
|
|
@@ -5,7 +5,6 @@ import React, { useCallback, useContext, useEffect, useImperativeHandle, useMemo
|
|
|
5
5
|
import ProForm, { ProFormDependency } from "../../../form";
|
|
6
6
|
import { useIntl } from "../../../provider";
|
|
7
7
|
import { isDeepEqualReact, runFunction, useDeepCompareEffect, useRefFunction } from "../../../utils";
|
|
8
|
-
import { editableRowByKey, recordKeyToString } from "../../../utils/useEditableArray";
|
|
9
8
|
import ProTable from "../../Table";
|
|
10
9
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
10
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -39,69 +38,6 @@ function RecordCreator(props) {
|
|
|
39
38
|
});
|
|
40
39
|
}
|
|
41
40
|
|
|
42
|
-
/**
|
|
43
|
-
* 处理嵌套行的新增
|
|
44
|
-
*/
|
|
45
|
-
function handleNestedRowInsert(baseData, defaultValue, newLineOptions, getRowKey, childrenColumnName) {
|
|
46
|
-
if (!newLineOptions.recordKey) {
|
|
47
|
-
return baseData;
|
|
48
|
-
}
|
|
49
|
-
const actionProps = {
|
|
50
|
-
data: baseData,
|
|
51
|
-
getRowKey,
|
|
52
|
-
row: {
|
|
53
|
-
...defaultValue,
|
|
54
|
-
map_row_parentKey: recordKeyToString(newLineOptions.parentKey)?.toString()
|
|
55
|
-
},
|
|
56
|
-
key: newLineOptions.recordKey,
|
|
57
|
-
childrenColumnName
|
|
58
|
-
};
|
|
59
|
-
return editableRowByKey(actionProps, newLineOptions.position === 'top' ? 'top' : 'update');
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
* 处理分页场景下的新增
|
|
64
|
-
*/
|
|
65
|
-
function handlePaginationInsert(baseData, defaultValue, pageConfig) {
|
|
66
|
-
if (pageConfig.pageSize > baseData.length) {
|
|
67
|
-
return [...baseData, defaultValue];
|
|
68
|
-
}
|
|
69
|
-
const insertIndex = pageConfig.current * pageConfig.pageSize - 1;
|
|
70
|
-
const result = [...baseData];
|
|
71
|
-
result.splice(insertIndex, 0, defaultValue);
|
|
72
|
-
return result;
|
|
73
|
-
}
|
|
74
|
-
function useEditableDataSource({
|
|
75
|
-
actionDataSource,
|
|
76
|
-
editableUtils,
|
|
77
|
-
pagination,
|
|
78
|
-
getRowKey,
|
|
79
|
-
childrenColumnName
|
|
80
|
-
}) {
|
|
81
|
-
return useMemo(() => {
|
|
82
|
-
const newLineConfig = editableUtils?.newLineRecord;
|
|
83
|
-
const baseData = Array.isArray(actionDataSource) ? [...actionDataSource] : [];
|
|
84
|
-
if (!newLineConfig?.defaultValue) {
|
|
85
|
-
return baseData;
|
|
86
|
-
}
|
|
87
|
-
const {
|
|
88
|
-
options: newLineOptions,
|
|
89
|
-
defaultValue
|
|
90
|
-
} = newLineConfig;
|
|
91
|
-
if (newLineOptions?.parentKey) {
|
|
92
|
-
return handleNestedRowInsert(baseData, defaultValue, newLineOptions, getRowKey, childrenColumnName || 'children');
|
|
93
|
-
}
|
|
94
|
-
if (newLineOptions?.position === 'top') {
|
|
95
|
-
return [defaultValue, ...baseData];
|
|
96
|
-
}
|
|
97
|
-
const pageConfig = pagination && typeof pagination === 'object' ? pagination : undefined;
|
|
98
|
-
if (pageConfig?.current && pageConfig?.pageSize) {
|
|
99
|
-
return handlePaginationInsert(baseData, defaultValue, pageConfig);
|
|
100
|
-
}
|
|
101
|
-
return [...baseData, defaultValue];
|
|
102
|
-
}, [actionDataSource, childrenColumnName, editableUtils?.newLineRecord, getRowKey, pagination]);
|
|
103
|
-
}
|
|
104
|
-
|
|
105
41
|
/**
|
|
106
42
|
* 检查是否应该显示创建按钮
|
|
107
43
|
*/
|
|
@@ -233,15 +169,15 @@ function EditableTable(props) {
|
|
|
233
169
|
const {
|
|
234
170
|
onTableChange,
|
|
235
171
|
maxLength,
|
|
236
|
-
formItemProps,
|
|
172
|
+
formItemProps: _formItemProps,
|
|
237
173
|
recordCreatorProps,
|
|
238
174
|
rowKey,
|
|
239
|
-
controlled,
|
|
175
|
+
controlled: _controlled,
|
|
240
176
|
defaultValue,
|
|
241
|
-
onChange,
|
|
177
|
+
onChange: _onChange,
|
|
242
178
|
editableFormRef,
|
|
243
179
|
// @ts-ignore
|
|
244
|
-
autoFocus,
|
|
180
|
+
autoFocus: _autoFocus,
|
|
245
181
|
...rest
|
|
246
182
|
} = props;
|
|
247
183
|
const preData = useRef(undefined);
|
|
@@ -533,7 +469,6 @@ function EditableTable(props) {
|
|
|
533
469
|
} = recordCreatorProps || {};
|
|
534
470
|
const isTop = position === 'top';
|
|
535
471
|
const {
|
|
536
|
-
creatorButtonDom,
|
|
537
472
|
buttonRenderProps
|
|
538
473
|
} = useCreatorButton({
|
|
539
474
|
recordCreatorProps,
|
|
@@ -682,7 +617,7 @@ function FieldEditableTable(props) {
|
|
|
682
617
|
const name = [props.name].flat(1);
|
|
683
618
|
try {
|
|
684
619
|
return JSON.stringify(get(prev, name)) !== JSON.stringify(get(next, name));
|
|
685
|
-
} catch (
|
|
620
|
+
} catch (_error) {
|
|
686
621
|
return true;
|
|
687
622
|
}
|
|
688
623
|
},
|
|
@@ -11,6 +11,7 @@ export type ListToolBarHeaderMenuProps = {
|
|
|
11
11
|
items?: ListToolBarMenuItem[];
|
|
12
12
|
onChange?: (activeKey?: React.Key) => void;
|
|
13
13
|
prefixCls?: string;
|
|
14
|
+
hashId?: string;
|
|
14
15
|
};
|
|
15
16
|
declare const HeaderMenu: React.FC<ListToolBarHeaderMenuProps>;
|
|
16
17
|
export default HeaderMenu;
|
|
@@ -8,8 +8,9 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
8
8
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
9
|
const HeaderMenu = props => {
|
|
10
10
|
const {
|
|
11
|
-
hashId
|
|
11
|
+
hashId: contextHashId
|
|
12
12
|
} = useContext(ProProvider);
|
|
13
|
+
const hashId = props.hashId ?? contextHashId;
|
|
13
14
|
const {
|
|
14
15
|
items = [],
|
|
15
16
|
type = 'inline',
|
|
@@ -54,7 +55,7 @@ const HeaderMenu = props => {
|
|
|
54
55
|
});
|
|
55
56
|
}
|
|
56
57
|
return /*#__PURE__*/_jsx("div", {
|
|
57
|
-
className: clsx(`${prefixCls}-menu`, `${prefixCls}-dropdownmenu
|
|
58
|
+
className: clsx(`${prefixCls}-menu`, `${prefixCls}-dropdownmenu`, hashId),
|
|
58
59
|
children: /*#__PURE__*/_jsx(Dropdown, {
|
|
59
60
|
trigger: ['click'],
|
|
60
61
|
menu: {
|
|
@@ -69,7 +70,7 @@ const HeaderMenu = props => {
|
|
|
69
70
|
}))
|
|
70
71
|
},
|
|
71
72
|
children: /*#__PURE__*/_jsxs(Space, {
|
|
72
|
-
className: `${prefixCls}-dropdownmenu-label`,
|
|
73
|
+
className: clsx(`${prefixCls}-dropdownmenu-label`, hashId),
|
|
73
74
|
children: [activeItem.label, /*#__PURE__*/_jsx(DownOutlined, {})]
|
|
74
75
|
})
|
|
75
76
|
})
|
|
@@ -53,13 +53,14 @@ function getSettingItem(setting) {
|
|
|
53
53
|
}
|
|
54
54
|
const ListToolBarTabBar = ({
|
|
55
55
|
prefixCls,
|
|
56
|
+
hashId,
|
|
56
57
|
tabs,
|
|
57
58
|
multipleLine,
|
|
58
59
|
filtersNode
|
|
59
60
|
}) => {
|
|
60
61
|
if (!multipleLine) return null;
|
|
61
62
|
return /*#__PURE__*/_jsx("div", {
|
|
62
|
-
className: `${prefixCls}-extra-line`,
|
|
63
|
+
className: clsx(`${prefixCls}-extra-line`, hashId),
|
|
63
64
|
children: tabs?.items && tabs?.items.length ? /*#__PURE__*/_jsx(Tabs, {
|
|
64
65
|
style: {
|
|
65
66
|
width: '100%'
|
|
@@ -137,7 +138,7 @@ const ListToolBar = ({
|
|
|
137
138
|
/** 轻量筛选组件 */
|
|
138
139
|
const filtersNode = useMemo(() => {
|
|
139
140
|
if (filter) return /*#__PURE__*/_jsx("div", {
|
|
140
|
-
className: `${prefixCls}-filter
|
|
141
|
+
className: clsx(`${prefixCls}-filter`, hashId),
|
|
141
142
|
children: filter
|
|
142
143
|
});
|
|
143
144
|
return null;
|
|
@@ -181,16 +182,16 @@ const ListToolBar = ({
|
|
|
181
182
|
// 保留dom是为了占位,不然 right 就变到左边了
|
|
182
183
|
if (!hasLeft && hasRight) {
|
|
183
184
|
return /*#__PURE__*/_jsx("div", {
|
|
184
|
-
className: `${prefixCls}-left
|
|
185
|
+
className: clsx(`${prefixCls}-left`, hashId)
|
|
185
186
|
});
|
|
186
187
|
}
|
|
187
188
|
|
|
188
189
|
// 减少 space 的dom,渲染的时候能节省点性能
|
|
189
190
|
if (!menu && (hasTitle || !searchNode)) {
|
|
190
191
|
return /*#__PURE__*/_jsx("div", {
|
|
191
|
-
className: `${prefixCls}-left
|
|
192
|
+
className: clsx(`${prefixCls}-left`, hashId),
|
|
192
193
|
children: /*#__PURE__*/_jsx("div", {
|
|
193
|
-
className: `${prefixCls}-title
|
|
194
|
+
className: clsx(`${prefixCls}-title`, hashId),
|
|
194
195
|
children: /*#__PURE__*/_jsx(LabelIconTip, {
|
|
195
196
|
tooltip: tooltip,
|
|
196
197
|
label: title,
|
|
@@ -206,7 +207,7 @@ const ListToolBar = ({
|
|
|
206
207
|
[`${prefixCls}-left-has-inline-menu`]: menu?.type === 'inline'
|
|
207
208
|
}),
|
|
208
209
|
children: [hasTitle && !menu && /*#__PURE__*/_jsx("div", {
|
|
209
|
-
className: `${prefixCls}-title
|
|
210
|
+
className: clsx(`${prefixCls}-title`, hashId),
|
|
210
211
|
children: /*#__PURE__*/_jsx(LabelIconTip, {
|
|
211
212
|
tooltip: tooltip,
|
|
212
213
|
label: title,
|
|
@@ -217,9 +218,10 @@ const ListToolBar = ({
|
|
|
217
218
|
// 这里面实现了 tabs 的逻辑
|
|
218
219
|
_jsx(HeaderMenu, {
|
|
219
220
|
...menu,
|
|
220
|
-
prefixCls: prefixCls
|
|
221
|
+
prefixCls: prefixCls,
|
|
222
|
+
hashId: hashId
|
|
221
223
|
}), !hasTitle && searchNode ? /*#__PURE__*/_jsx("div", {
|
|
222
|
-
className: `${prefixCls}-search
|
|
224
|
+
className: clsx(`${prefixCls}-search`, hashId),
|
|
223
225
|
children: searchNode
|
|
224
226
|
}) : null]
|
|
225
227
|
});
|
|
@@ -227,19 +229,19 @@ const ListToolBar = ({
|
|
|
227
229
|
const rightTitleDom = useMemo(() => {
|
|
228
230
|
if (!hasRight) return null;
|
|
229
231
|
return /*#__PURE__*/_jsxs("div", {
|
|
230
|
-
className: `${prefixCls}-right
|
|
232
|
+
className: clsx(`${prefixCls}-right`, hashId),
|
|
231
233
|
style: isMobile ? {} : {
|
|
232
234
|
alignItems: 'center'
|
|
233
235
|
},
|
|
234
236
|
children: [!multipleLine ? filtersNode : null, hasTitle && searchNode ? /*#__PURE__*/_jsx("div", {
|
|
235
|
-
className: `${prefixCls}-search
|
|
237
|
+
className: clsx(`${prefixCls}-search`, hashId),
|
|
236
238
|
children: searchNode
|
|
237
239
|
}) : null, actionDom, settings?.length ? /*#__PURE__*/_jsx("div", {
|
|
238
|
-
className: `${prefixCls}-setting-items
|
|
240
|
+
className: clsx(`${prefixCls}-setting-items`, hashId),
|
|
239
241
|
children: settings.map((setting, index) => {
|
|
240
242
|
const settingItem = getSettingItem(setting);
|
|
241
243
|
return /*#__PURE__*/_jsx("div", {
|
|
242
|
-
className: `${prefixCls}-setting-item
|
|
244
|
+
className: clsx(`${prefixCls}-setting-item`, hashId),
|
|
243
245
|
children: settingItem
|
|
244
246
|
}, index);
|
|
245
247
|
})
|
|
@@ -268,6 +270,7 @@ const ListToolBar = ({
|
|
|
268
270
|
className: clsx(prefixCls, hashId, className),
|
|
269
271
|
children: [titleNode, /*#__PURE__*/_jsx(ListToolBarTabBar, {
|
|
270
272
|
filtersNode: filtersNode,
|
|
273
|
+
hashId: hashId,
|
|
271
274
|
prefixCls: prefixCls,
|
|
272
275
|
tabs: tabs,
|
|
273
276
|
multipleLine: multipleLine
|
|
@@ -18,7 +18,7 @@ const genProListStyle = token => {
|
|
|
18
18
|
alignItems: 'center',
|
|
19
19
|
justifyContent: 'flex-start',
|
|
20
20
|
color: token.colorTextHeading,
|
|
21
|
-
fontWeight:
|
|
21
|
+
fontWeight: token.fontWeightStrong,
|
|
22
22
|
fontSize: token.fontSizeLG
|
|
23
23
|
},
|
|
24
24
|
'&-search:not(:last-child)': {
|
|
@@ -101,7 +101,7 @@ const genProListStyle = token => {
|
|
|
101
101
|
},
|
|
102
102
|
[`${token.antCls}-tabs-nav-list`]: {
|
|
103
103
|
marginBlockStart: 0,
|
|
104
|
-
|
|
104
|
+
[`${token.antCls}-tabs-tab`]: {
|
|
105
105
|
paddingBlockStart: 0
|
|
106
106
|
}
|
|
107
107
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
export type DensitySize = 'middle' | 'small' | 'large' | undefined;
|
|
3
|
-
declare const _default: React.MemoExoticComponent<
|
|
3
|
+
declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponent<{
|
|
4
4
|
icon?: React.ReactNode;
|
|
5
|
-
}
|
|
5
|
+
} & React.RefAttributes<HTMLSpanElement>>>;
|
|
6
6
|
export default _default;
|
|
@@ -4,7 +4,7 @@ import React, { useContext } from 'react';
|
|
|
4
4
|
import { useIntl } from "../../../provider";
|
|
5
5
|
import { TableContext } from "../../Store/Provide";
|
|
6
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
-
const DensityIcon = props => {
|
|
7
|
+
const DensityIcon = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
8
8
|
const {
|
|
9
9
|
icon = /*#__PURE__*/_jsx(ColumnHeightOutlined, {})
|
|
10
10
|
} = props;
|
|
@@ -35,8 +35,11 @@ const DensityIcon = props => {
|
|
|
35
35
|
trigger: ['click'],
|
|
36
36
|
children: /*#__PURE__*/_jsx(Tooltip, {
|
|
37
37
|
title: intl.getMessage('tableToolBar.density', '表格密度'),
|
|
38
|
-
children:
|
|
38
|
+
children: /*#__PURE__*/_jsx("span", {
|
|
39
|
+
ref: ref,
|
|
40
|
+
children: icon
|
|
41
|
+
})
|
|
39
42
|
})
|
|
40
43
|
});
|
|
41
|
-
};
|
|
44
|
+
});
|
|
42
45
|
export default /*#__PURE__*/React.memo(DensityIcon);
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
declare const _default: React.MemoExoticComponent<
|
|
2
|
+
declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponent<React.RefAttributes<HTMLSpanElement>>>;
|
|
3
3
|
export default _default;
|
|
@@ -4,7 +4,7 @@ import React, { useEffect, useState } from 'react';
|
|
|
4
4
|
import { useIntl } from "../../../provider";
|
|
5
5
|
import { isBrowser } from "../../../utils";
|
|
6
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
-
const FullScreenIcon = () => {
|
|
7
|
+
const FullScreenIcon = /*#__PURE__*/React.forwardRef((_, ref) => {
|
|
8
8
|
const intl = useIntl();
|
|
9
9
|
const [fullscreen, setFullscreen] = useState(false);
|
|
10
10
|
useEffect(() => {
|
|
@@ -16,11 +16,17 @@ const FullScreenIcon = () => {
|
|
|
16
16
|
};
|
|
17
17
|
}, []);
|
|
18
18
|
return fullscreen ? /*#__PURE__*/_jsx(Tooltip, {
|
|
19
|
-
title: intl.getMessage('tableToolBar.exitFullScreen', '
|
|
20
|
-
children: /*#__PURE__*/_jsx(
|
|
19
|
+
title: intl.getMessage('tableToolBar.exitFullScreen', '退出全屏'),
|
|
20
|
+
children: /*#__PURE__*/_jsx("span", {
|
|
21
|
+
ref: ref,
|
|
22
|
+
children: /*#__PURE__*/_jsx(FullscreenExitOutlined, {})
|
|
23
|
+
})
|
|
21
24
|
}) : /*#__PURE__*/_jsx(Tooltip, {
|
|
22
25
|
title: intl.getMessage('tableToolBar.fullScreen', '全屏'),
|
|
23
|
-
children: /*#__PURE__*/_jsx(
|
|
26
|
+
children: /*#__PURE__*/_jsx("span", {
|
|
27
|
+
ref: ref,
|
|
28
|
+
children: /*#__PURE__*/_jsx(FullscreenOutlined, {})
|
|
29
|
+
})
|
|
24
30
|
});
|
|
25
|
-
};
|
|
31
|
+
});
|
|
26
32
|
export default /*#__PURE__*/React.memo(FullScreenIcon);
|
package/es/table/useFetchData.js
CHANGED
|
@@ -51,7 +51,10 @@ const useFetchData = (getData, defaultData, options) => {
|
|
|
51
51
|
const setTableDataList = useCallback(updater => {
|
|
52
52
|
setTableDataListInner(prev => {
|
|
53
53
|
const next = typeof updater === 'function' ? updater(prev) : updater;
|
|
54
|
-
|
|
54
|
+
// 使用 queueMicrotask 延迟回调,避免在渲染期间更新其他组件状态
|
|
55
|
+
queueMicrotask(() => {
|
|
56
|
+
options?.onDataSourceChange?.(next);
|
|
57
|
+
});
|
|
55
58
|
return next;
|
|
56
59
|
});
|
|
57
60
|
}, [options?.onDataSourceChange]);
|
|
@@ -119,7 +119,7 @@ const CellRenderFromItem = props => {
|
|
|
119
119
|
const shouldName = [rowName].flat(1);
|
|
120
120
|
try {
|
|
121
121
|
return JSON.stringify(get(pre, shouldName)) !== JSON.stringify(get(next, shouldName));
|
|
122
|
-
} catch (
|
|
122
|
+
} catch (_error) {
|
|
123
123
|
return true;
|
|
124
124
|
}
|
|
125
125
|
},
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
type LightFilterFooterRender = ((onConfirm?: (e?: React.MouseEvent) => void, onClear?: (e?: React.MouseEvent) => void) => JSX.Element | false) | false;
|
|
2
|
+
type LightFilterFooterRender = ((onConfirm?: (e?: React.MouseEvent) => void, onClear?: (e?: React.MouseEvent) => void) => React.JSX.Element | false) | false;
|
|
3
3
|
type OnClick = (e?: React.MouseEvent) => void;
|
|
4
4
|
export type DropdownFooterProps = {
|
|
5
5
|
onClear?: OnClick;
|
|
@@ -2,7 +2,7 @@ import type { PopoverProps } from 'antd';
|
|
|
2
2
|
import type { TooltipPlacement } from 'antd/lib/tooltip';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import type { DropdownFooterProps } from '../DropdownFooter';
|
|
5
|
-
export type FooterRender = ((onConfirm?: (e?: React.MouseEvent) => void, onClear?: (e?: React.MouseEvent) => void) => JSX.Element | false) | false;
|
|
5
|
+
export type FooterRender = ((onConfirm?: (e?: React.MouseEvent) => void, onClear?: (e?: React.MouseEvent) => void) => React.JSX.Element | false) | false;
|
|
6
6
|
export type DropdownProps = {
|
|
7
7
|
label?: React.ReactNode;
|
|
8
8
|
footer?: DropdownFooterProps;
|
|
@@ -51,7 +51,7 @@ const FilterDropdown = props => {
|
|
|
51
51
|
return htmlRef.current || document.body;
|
|
52
52
|
},
|
|
53
53
|
children: /*#__PURE__*/_jsx("div", {
|
|
54
|
-
className: `${prefixCls}-content
|
|
54
|
+
className: clsx(`${prefixCls}-content`, hashId),
|
|
55
55
|
children: children
|
|
56
56
|
})
|
|
57
57
|
}), footer && /*#__PURE__*/_jsx(DropdownFooter, {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { LoadingOutlined } from '@ant-design/icons';
|
|
2
2
|
import { get } from '@rc-component/util';
|
|
3
3
|
import { ConfigProvider, Form, Popover, theme } from 'antd';
|
|
4
|
+
import { clsx } from 'clsx';
|
|
4
5
|
import React, { useContext, useEffect, useState } from 'react';
|
|
5
6
|
import { useStyle } from "./style";
|
|
6
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -47,13 +48,13 @@ const InlineErrorFormItemPopover = ({
|
|
|
47
48
|
getPopupContainer: popoverProps?.getPopupContainer,
|
|
48
49
|
getTooltipContainer: popoverProps?.getTooltipContainer,
|
|
49
50
|
content: wrapSSR( /*#__PURE__*/_jsx("div", {
|
|
50
|
-
className: `${prefixCls}-form-item
|
|
51
|
+
className: clsx(`${prefixCls}-form-item`, hashId, token.hashId),
|
|
51
52
|
style: {
|
|
52
53
|
margin: 0,
|
|
53
54
|
padding: 0
|
|
54
55
|
},
|
|
55
56
|
children: /*#__PURE__*/_jsxs("div", {
|
|
56
|
-
className: `${prefixCls}-form-item-with-help
|
|
57
|
+
className: clsx(`${prefixCls}-form-item-with-help`, hashId, token.hashId),
|
|
57
58
|
children: [loading ? /*#__PURE__*/_jsx(LoadingOutlined, {}) : null, errorList]
|
|
58
59
|
})
|
|
59
60
|
})),
|
|
@@ -82,7 +83,7 @@ const InternalFormItemFunction = ({
|
|
|
82
83
|
}
|
|
83
84
|
try {
|
|
84
85
|
return JSON.stringify(get(prev, shouldName)) !== JSON.stringify(get(next, shouldName));
|
|
85
|
-
} catch (
|
|
86
|
+
} catch (_error) {
|
|
86
87
|
return true;
|
|
87
88
|
}
|
|
88
89
|
}
|
|
@@ -132,7 +133,7 @@ export const InlineErrorFormItem = props => {
|
|
|
132
133
|
}
|
|
133
134
|
try {
|
|
134
135
|
return JSON.stringify(get(prev, shouldName)) !== JSON.stringify(get(next, shouldName));
|
|
135
|
-
} catch (
|
|
136
|
+
} catch (_error) {
|
|
136
137
|
return true;
|
|
137
138
|
}
|
|
138
139
|
} : undefined,
|
|
@@ -47,12 +47,12 @@ export const LabelIconTip = /*#__PURE__*/React.memo(props => {
|
|
|
47
47
|
}),
|
|
48
48
|
children: label
|
|
49
49
|
}), subTitle && /*#__PURE__*/_jsx("div", {
|
|
50
|
-
className: `${className}-subtitle
|
|
50
|
+
className: clsx(`${className}-subtitle`, hashId),
|
|
51
51
|
children: subTitle
|
|
52
52
|
}), tooltip && /*#__PURE__*/_jsx(Tooltip, {
|
|
53
53
|
...tooltipProps,
|
|
54
54
|
children: /*#__PURE__*/_jsx("span", {
|
|
55
|
-
className: `${className}-icon
|
|
55
|
+
className: clsx(`${className}-icon`, hashId),
|
|
56
56
|
children: icon
|
|
57
57
|
})
|
|
58
58
|
})]
|
|
@@ -11,7 +11,6 @@ export function useFetchData(props) {
|
|
|
11
11
|
testId += 1;
|
|
12
12
|
return testId.toString();
|
|
13
13
|
});
|
|
14
|
-
const proFieldKeyRef = useRef(cacheKey);
|
|
15
14
|
const fetchData = async () => {
|
|
16
15
|
abortRef.current?.abort();
|
|
17
16
|
const abort = new AbortController();
|
|
@@ -31,7 +30,6 @@ export function useFetchData(props) {
|
|
|
31
30
|
};
|
|
32
31
|
const {
|
|
33
32
|
data,
|
|
34
|
-
error,
|
|
35
33
|
isValidating
|
|
36
34
|
} = useSWR(props.request ? [cacheKey, props.params] : null, fetchData, {
|
|
37
35
|
revalidateOnFocus: false,
|
package/es/utils/isUrl/index.js
CHANGED
|
@@ -14,8 +14,8 @@ export declare const objectToMap: (value: ProFieldValueEnumType | undefined) =>
|
|
|
14
14
|
* 转化 text 和 valueEnum 通过 type 来添加 Status
|
|
15
15
|
*
|
|
16
16
|
* @param text
|
|
17
|
-
* @param
|
|
18
|
-
* @param
|
|
17
|
+
* @param valueEnumParams
|
|
18
|
+
* @param key
|
|
19
19
|
*/
|
|
20
20
|
export declare const proFieldParsingText: (text: string | number | (string | number)[], valueEnumParams: ProFieldValueEnumType, key?: number | string) => React.ReactNode;
|
|
21
21
|
export {};
|
|
@@ -93,8 +93,8 @@ const TableStatus = {
|
|
|
93
93
|
* 转化 text 和 valueEnum 通过 type 来添加 Status
|
|
94
94
|
*
|
|
95
95
|
* @param text
|
|
96
|
-
* @param
|
|
97
|
-
* @param
|
|
96
|
+
* @param valueEnumParams
|
|
97
|
+
* @param key
|
|
98
98
|
*/
|
|
99
99
|
export const proFieldParsingText = (text, valueEnumParams, key) => {
|
|
100
100
|
if (Array.isArray(text)) {
|