@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
|
@@ -5,43 +5,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = useStyle;
|
|
7
7
|
var _provider = require("../../../provider");
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
return {
|
|
13
|
-
[componentCls]: {
|
|
14
|
-
boxSizing: 'border-box',
|
|
15
|
-
'&-divider': {
|
|
16
|
-
flex: 'none',
|
|
17
|
-
width: token.lineWidth,
|
|
18
|
-
marginInline: token.marginXS,
|
|
19
|
-
marginBlock: token.marginLG,
|
|
20
|
-
backgroundColor: token.colorSplit,
|
|
21
|
-
'&-horizontal': {
|
|
22
|
-
width: 'initial',
|
|
23
|
-
height: token.lineWidth,
|
|
24
|
-
marginInline: token.marginLG,
|
|
25
|
-
marginBlock: token.marginXS
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
|
-
'&&-size-small &-divider': {
|
|
29
|
-
marginBlock: token.marginLG,
|
|
30
|
-
marginInline: token.marginXS,
|
|
31
|
-
'&-horizontal': {
|
|
32
|
-
marginBlock: token.marginXS,
|
|
33
|
-
marginInline: token.marginLG
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
};
|
|
39
|
-
function useStyle(prefixCls) {
|
|
40
|
-
return (0, _provider.useStyle)('ProCardDivider', token => {
|
|
41
|
-
const proCardDividerToken = {
|
|
42
|
-
...token,
|
|
43
|
-
componentCls: `.${prefixCls}`
|
|
44
|
-
};
|
|
45
|
-
return [genDividerStyle(proCardDividerToken)];
|
|
46
|
-
});
|
|
8
|
+
/**
|
|
9
|
+
* Divider 样式已合并至 ProCard style.ts,此 hook 仅用于获取 hashId 和 wrapSSR
|
|
10
|
+
*/
|
|
11
|
+
function useStyle(_prefixCls) {
|
|
12
|
+
return (0, _provider.useStyle)('ProCardDivider', () => ({}));
|
|
47
13
|
}
|
package/lib/card/typing.d.ts
CHANGED
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
import type { TabPaneProps, TabsProps } from 'antd';
|
|
2
|
-
import type { LabelTooltipType } from 'antd/lib/form/FormItemLabel';
|
|
3
2
|
import type { ReactNode } from 'react';
|
|
3
|
+
import type { LabelTooltipType } from '../utils';
|
|
4
|
+
export type { LabelTooltipType };
|
|
4
5
|
export type Breakpoint = 'xxl' | 'xl' | 'lg' | 'md' | 'sm' | 'xs';
|
|
5
6
|
export type Gutter = number | Partial<Record<Breakpoint, number>>;
|
|
6
7
|
export type ColSpanType = number | string;
|
|
7
8
|
type CollapsibleType = 'icon' | 'header' | boolean;
|
|
8
9
|
type CardPropsBase = {
|
|
9
|
-
/** 标题样式 */
|
|
10
|
-
headStyle?: React.CSSProperties;
|
|
11
|
-
/** 内容样式 */
|
|
12
|
-
bodyStyle?: React.CSSProperties;
|
|
13
10
|
/** 样式配置 */
|
|
14
11
|
styles?: {
|
|
15
12
|
header?: React.CSSProperties;
|
|
@@ -93,4 +90,3 @@ export type ProCardTabPaneProps = {
|
|
|
93
90
|
cardProps?: CardProps;
|
|
94
91
|
} & TabPaneProps;
|
|
95
92
|
export type CardType = React.ForwardRefExoticComponent<CardProps>;
|
|
96
|
-
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { DescriptionsProps, FormProps } from 'antd';
|
|
2
|
-
import type { LabelTooltipType } from 'antd/lib/form/FormItemLabel';
|
|
3
2
|
import React from 'react';
|
|
4
3
|
import type { ProFieldFCMode } from '../provider';
|
|
5
|
-
import type { ProCoreActionType, ProFieldValueType, ProSchema, ProSchemaComponentTypes, RowEditableConfig, UseEditableMapUtilType } from '../utils';
|
|
4
|
+
import type { ProCoreActionType, ProEllipsis, ProFieldValueType, ProSchema, ProSchemaComponentTypes, RowEditableConfig, UseEditableMapUtilType } from '../utils';
|
|
5
|
+
import { LabelTooltipType } from '../utils';
|
|
6
6
|
import type { RequestData } from './useFetchData';
|
|
7
7
|
export interface DescriptionsItemProps {
|
|
8
8
|
prefixCls?: string;
|
|
@@ -31,9 +31,7 @@ export type ProDescriptionsItemProps<T = Record<string, any>, ValueType = 'text'
|
|
|
31
31
|
hide?: boolean;
|
|
32
32
|
plain?: boolean;
|
|
33
33
|
copyable?: boolean;
|
|
34
|
-
ellipsis?:
|
|
35
|
-
showTitle?: boolean;
|
|
36
|
-
};
|
|
34
|
+
ellipsis?: ProEllipsis;
|
|
37
35
|
mode?: ProFieldFCMode;
|
|
38
36
|
children?: React.ReactNode;
|
|
39
37
|
/**
|
|
@@ -194,14 +194,14 @@ const schemaToDescriptionsItem = (items, entity, action, editableUtils, emptyTex
|
|
|
194
194
|
};
|
|
195
195
|
}
|
|
196
196
|
const {
|
|
197
|
-
valueEnum,
|
|
198
|
-
render,
|
|
197
|
+
valueEnum: _valueEnum,
|
|
198
|
+
render: _render,
|
|
199
199
|
renderText,
|
|
200
200
|
mode,
|
|
201
|
-
plain,
|
|
201
|
+
plain: _plain,
|
|
202
202
|
dataIndex,
|
|
203
|
-
request,
|
|
204
|
-
params,
|
|
203
|
+
request: _request,
|
|
204
|
+
params: _params,
|
|
205
205
|
editable,
|
|
206
206
|
...restItem
|
|
207
207
|
} = item;
|
|
@@ -301,7 +301,7 @@ const ProDescriptions = props => {
|
|
|
301
301
|
onLoadingChange,
|
|
302
302
|
actionRef,
|
|
303
303
|
onRequestError,
|
|
304
|
-
emptyText,
|
|
304
|
+
emptyText: _emptyText,
|
|
305
305
|
...rest
|
|
306
306
|
} = props;
|
|
307
307
|
const proContext = (0, _react.useContext)(_provider.default);
|
package/lib/field/AllProField.js
CHANGED
|
@@ -134,15 +134,12 @@ const defaultRenderText = (dataValue, valueType, props, valueTypeMap) => {
|
|
|
134
134
|
});
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
|
-
|
|
138
|
-
// eslint-disable-next-line no-param-reassign
|
|
139
137
|
delete props.emptyText;
|
|
140
138
|
if (typeof valueType === 'object') {
|
|
141
139
|
return defaultRenderTextByObject(dataValue, valueType, props);
|
|
142
140
|
}
|
|
143
141
|
const customValueTypeConfig = valueTypeMap && valueTypeMap[valueType];
|
|
144
142
|
if (customValueTypeConfig) {
|
|
145
|
-
// eslint-disable-next-line no-param-reassign
|
|
146
143
|
delete props.ref;
|
|
147
144
|
if (mode === 'read') {
|
|
148
145
|
return customValueTypeConfig.render?.(dataValue, {
|
|
@@ -569,7 +566,6 @@ const ProFieldComponent = ({
|
|
|
569
566
|
...(0, _utils.omitUndefined)(restFieldProps),
|
|
570
567
|
onChange: onChangeCallBack
|
|
571
568
|
};
|
|
572
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
573
569
|
}, [value, restFieldProps, onChangeCallBack]);
|
|
574
570
|
const renderedDom = defaultRenderText(mode === 'edit' ? fieldProps?.value ?? text ?? '' : text ?? fieldProps?.value ?? '', valueType || 'text', (0, _utils.omitUndefined)({
|
|
575
571
|
ref,
|
|
@@ -59,11 +59,8 @@ const pureRenderText = (dataValue, valueType, props, valueTypeMap) => {
|
|
|
59
59
|
});
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
|
-
|
|
63
|
-
// eslint-disable-next-line no-param-reassign
|
|
64
62
|
delete props.emptyText;
|
|
65
63
|
if (typeof valueType === 'object') {
|
|
66
|
-
// eslint-disable-next-line @typescript-eslint/no-use-before-define
|
|
67
64
|
return pureRenderText(dataValue, valueType.type, {
|
|
68
65
|
...valueType,
|
|
69
66
|
...props
|
|
@@ -71,7 +68,6 @@ const pureRenderText = (dataValue, valueType, props, valueTypeMap) => {
|
|
|
71
68
|
}
|
|
72
69
|
const customValueTypeConfig = valueTypeMap && valueTypeMap[valueType];
|
|
73
70
|
if (customValueTypeConfig) {
|
|
74
|
-
// eslint-disable-next-line no-param-reassign
|
|
75
71
|
delete props.ref;
|
|
76
72
|
if (mode === 'read') {
|
|
77
73
|
const readDom = customValueTypeConfig.render?.(dataValue, {
|
|
@@ -136,7 +132,6 @@ const ProFieldComponent = ({
|
|
|
136
132
|
...(0, _utils.omitUndefined)(restFieldProps),
|
|
137
133
|
onChange: onChangeCallBack
|
|
138
134
|
};
|
|
139
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
140
135
|
}, [value, restFieldProps, onChangeCallBack]);
|
|
141
136
|
const renderedDom = pureRenderText(mode === 'edit' ? fieldProps?.value ?? text ?? '' : text ?? fieldProps?.value ?? '', valueType || 'text', (0, _utils.omitUndefined)({
|
|
142
137
|
ref,
|
|
@@ -106,14 +106,11 @@ const FieldCheckbox = ({
|
|
|
106
106
|
}
|
|
107
107
|
if (mode === 'edit') {
|
|
108
108
|
const {
|
|
109
|
-
fieldNames,
|
|
109
|
+
fieldNames: _fieldNames,
|
|
110
110
|
variant,
|
|
111
111
|
...restFieldProps
|
|
112
112
|
} = rest.fieldProps || {};
|
|
113
|
-
const dom = wrapSSR(
|
|
114
|
-
/*#__PURE__*/
|
|
115
|
-
//@ts-ignore
|
|
116
|
-
(0, _jsxRuntime.jsx)(_antd.Checkbox.Group, {
|
|
113
|
+
const dom = wrapSSR( /*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.Checkbox.Group, {
|
|
117
114
|
...restFieldProps,
|
|
118
115
|
variant: variant,
|
|
119
116
|
className: (0, _clsx.clsx)(rest.fieldProps?.className, hashId, `${layoutClassName}-${layout}`, {
|
|
@@ -5,6 +5,6 @@ declare const _default: React.ForwardRefExoticComponent<import("../../../provide
|
|
|
5
5
|
format?: string | undefined;
|
|
6
6
|
showTime?: boolean | undefined;
|
|
7
7
|
variant?: "outlined" | "filled" | "borderless" | "underlined" | undefined;
|
|
8
|
-
picker?: "time" | "date" | "month" | "week" | "
|
|
8
|
+
picker?: "time" | "date" | "month" | "week" | "quarter" | "year" | undefined;
|
|
9
9
|
} & ProFieldLightProps & React.RefAttributes<any>>;
|
|
10
10
|
export default _default;
|
|
@@ -88,6 +88,7 @@ const FieldDigitRange = ({
|
|
|
88
88
|
const placeholderValue = fieldProps?.placeholder || placeholder || [intl.getMessage('tableForm.inputPlaceholder', '请输入'), intl.getMessage('tableForm.inputPlaceholder', '请输入')];
|
|
89
89
|
const getInputNumberPlaceholder = index => Array.isArray(placeholderValue) ? placeholderValue[index] : placeholderValue;
|
|
90
90
|
const dom = /*#__PURE__*/(0, _jsxRuntime.jsxs)(_antd.Space.Compact, {
|
|
91
|
+
block: true,
|
|
91
92
|
onBlur: handleGroupBlur,
|
|
92
93
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.InputNumber, {
|
|
93
94
|
...fieldProps,
|
|
@@ -11,17 +11,14 @@ var _provider = require("../../../provider");
|
|
|
11
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
12
|
const addArrayKeys = doms => doms.map((dom, index) => {
|
|
13
13
|
if (! /*#__PURE__*/_react.default.isValidElement(dom)) {
|
|
14
|
-
// eslint-disable-next-line react/no-array-index-key
|
|
15
14
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_react.default.Fragment, {
|
|
16
15
|
children: dom
|
|
17
16
|
}, index);
|
|
18
17
|
}
|
|
19
18
|
return /*#__PURE__*/_react.default.cloneElement(dom, {
|
|
20
|
-
// eslint-disable-next-line react/no-array-index-key
|
|
21
19
|
key: index,
|
|
22
20
|
...dom?.props,
|
|
23
21
|
style: {
|
|
24
|
-
// @ts-ignore
|
|
25
22
|
...dom?.props?.style
|
|
26
23
|
}
|
|
27
24
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** 获取展示符号 */
|
|
2
2
|
export declare function getSymbolByRealValue(realValue: number): "-" | "+" | null;
|
|
3
3
|
/** 获取颜色 */
|
|
4
|
-
export declare function getColorByRealValue(realValue: number /** ,color: string */): "#595959" | "#
|
|
4
|
+
export declare function getColorByRealValue(realValue: number /** ,color: string */): "#595959" | "#ff4d4f" | "#52c41a";
|
|
5
5
|
/** 获取到最后展示的数字 */
|
|
6
6
|
export declare function getRealTextWithPrecision(realValue: number, precision?: number): string | number;
|
|
7
7
|
/**
|
|
@@ -5,6 +5,6 @@ declare const _default: React.ForwardRefExoticComponent<import("../../../provide
|
|
|
5
5
|
format?: string | undefined;
|
|
6
6
|
variant?: "outlined" | "filled" | "borderless" | "underlined" | undefined;
|
|
7
7
|
showTime?: boolean | undefined;
|
|
8
|
-
picker?: "time" | "date" | "month" | "week" | "
|
|
8
|
+
picker?: "time" | "date" | "month" | "week" | "quarter" | "year" | undefined;
|
|
9
9
|
} & ProFieldLightProps & React.RefAttributes<any>>;
|
|
10
10
|
export default _default;
|
|
@@ -31,7 +31,6 @@ const FieldSwitch = ({
|
|
|
31
31
|
const dom = (0, _react.useMemo)(() => {
|
|
32
32
|
if (text === undefined || text === null || `${text}`.length < 1) return '-';
|
|
33
33
|
return text ? fieldProps?.checkedChildren ?? intl.getMessage('switch.open', '打开') : fieldProps?.unCheckedChildren ?? intl.getMessage('switch.close', '关闭');
|
|
34
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
35
34
|
}, [fieldProps?.checkedChildren, fieldProps?.unCheckedChildren, text]);
|
|
36
35
|
if (mode === 'read') {
|
|
37
36
|
if (render) {
|
|
@@ -32,7 +32,10 @@ const FieldText = ({
|
|
|
32
32
|
(0, _react.useImperativeHandle)(ref, () => inputRef.current, []);
|
|
33
33
|
(0, _react.useEffect)(() => {
|
|
34
34
|
if (autoFocus) {
|
|
35
|
-
|
|
35
|
+
// 使用 queueMicrotask 延迟 focus 调用,避免在渲染期间触发 flushSync
|
|
36
|
+
queueMicrotask(() => {
|
|
37
|
+
inputRef.current?.focus();
|
|
38
|
+
});
|
|
36
39
|
}
|
|
37
40
|
}, [autoFocus]);
|
|
38
41
|
if (mode === 'read') {
|
|
@@ -19,8 +19,6 @@ var _helpers = require("../helpers");
|
|
|
19
19
|
var _EditOrReadOnlyContext = require("./EditOrReadOnlyContext");
|
|
20
20
|
var _Submitter = _interopRequireDefault(require("./Submitter"));
|
|
21
21
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
22
|
-
/* eslint-disable react-hooks/exhaustive-deps */
|
|
23
|
-
|
|
24
22
|
const {
|
|
25
23
|
noteOnce
|
|
26
24
|
} = _util.warning;
|
|
@@ -249,7 +247,6 @@ function BaseFormComponents(props) {
|
|
|
249
247
|
const isEqual = (0, _utils.isDeepEqualReact)(props.initialValues, preInitialValues);
|
|
250
248
|
noteOnce(isEqual, `initialValues 只在 form 初始化时生效,如果你需要异步加载推荐使用 request,或者 initialValues ? <Form/> : null `);
|
|
251
249
|
noteOnce(isEqual, `The initialValues only take effect when the form is initialized, if you need to load asynchronously recommended request, or the initialValues ? <Form/> : null `);
|
|
252
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
253
250
|
}, [props.initialValues]);
|
|
254
251
|
|
|
255
252
|
// 初始化给一个默认的 form
|
|
@@ -496,7 +493,6 @@ function BaseForm(props) {
|
|
|
496
493
|
(0, _react.useEffect)(() => {
|
|
497
494
|
if (!syncToUrl) return;
|
|
498
495
|
setUrlSearch(genParams(syncToUrl, getGenParams(), 'set'));
|
|
499
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
500
496
|
}, [extraUrlParams, getGenParams, syncToUrl]);
|
|
501
497
|
const getPopupContainer = (0, _react.useMemo)(() => {
|
|
502
498
|
if (typeof window === 'undefined') return undefined;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import type { SizeType as AntdSizeType } from 'antd/lib/config-provider/SizeContext';
|
|
1
2
|
import type { TooltipPlacement } from 'antd/lib/tooltip';
|
|
2
3
|
import React from 'react';
|
|
3
4
|
import type { LightFilterFooterRender } from '../../typing';
|
|
4
|
-
export type SizeType =
|
|
5
|
+
export type SizeType = AntdSizeType;
|
|
5
6
|
export type LightWrapperProps = {
|
|
6
7
|
label?: React.ReactNode;
|
|
7
8
|
disabled?: boolean;
|
|
@@ -38,7 +38,6 @@ const BaseProFormCaptcha = /*#__PURE__*/_react.default.forwardRef((props, ref) =
|
|
|
38
38
|
} catch (error) {
|
|
39
39
|
setTiming(false);
|
|
40
40
|
setLoading(false);
|
|
41
|
-
// eslint-disable-next-line no-console
|
|
42
41
|
console.log(error);
|
|
43
42
|
}
|
|
44
43
|
};
|
|
@@ -70,7 +69,6 @@ const BaseProFormCaptcha = /*#__PURE__*/_react.default.forwardRef((props, ref) =
|
|
|
70
69
|
}, 1000);
|
|
71
70
|
}
|
|
72
71
|
return () => clearInterval(interval);
|
|
73
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
74
72
|
}, [timing]);
|
|
75
73
|
(0, _react.useEffect)(() => {
|
|
76
74
|
if (onTiming) {
|
|
@@ -110,7 +108,6 @@ const BaseProFormCaptcha = /*#__PURE__*/_react.default.forwardRef((props, ref) =
|
|
|
110
108
|
await onGetCaptcha('');
|
|
111
109
|
}
|
|
112
110
|
} catch (error) {
|
|
113
|
-
// eslint-disable-next-line no-console
|
|
114
111
|
console.log(error);
|
|
115
112
|
}
|
|
116
113
|
},
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
|
+
var _util = require("@rc-component/util");
|
|
8
9
|
var _antd = require("antd");
|
|
9
10
|
var _react = _interopRequireDefault(require("react"));
|
|
10
11
|
var _field = require("../../../field");
|
|
@@ -73,9 +74,12 @@ const ProFormCheckboxComponents = /*#__PURE__*/_react.default.forwardRef(({
|
|
|
73
74
|
fieldProps,
|
|
74
75
|
children
|
|
75
76
|
}, ref) => {
|
|
77
|
+
const {
|
|
78
|
+
...restFieldProps
|
|
79
|
+
} = fieldProps || {};
|
|
76
80
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.Checkbox, {
|
|
77
81
|
ref: ref,
|
|
78
|
-
...
|
|
82
|
+
...(0, _util.omit)(restFieldProps, ['allowClear']),
|
|
79
83
|
children: children
|
|
80
84
|
});
|
|
81
85
|
});
|
|
@@ -15,7 +15,5 @@ ExportComponent.Week = _WeekPicker.default;
|
|
|
15
15
|
ExportComponent.Month = _MonthPicker.default;
|
|
16
16
|
ExportComponent.Quarter = _QuarterPicker.default;
|
|
17
17
|
ExportComponent.Year = _YearPicker.default;
|
|
18
|
-
// @ts-ignore
|
|
19
|
-
// eslint-disable-next-line no-param-reassign
|
|
20
18
|
ExportComponent.displayName = 'ProFormComponent';
|
|
21
19
|
var _default = exports.default = ExportComponent;
|
|
@@ -92,12 +92,22 @@ const FieldSet = props => {
|
|
|
92
92
|
} = (0, _helpers.useGridHelpers)(rest);
|
|
93
93
|
const Wrapper = (0, _react.useCallback)(({
|
|
94
94
|
children: dom
|
|
95
|
-
}) =>
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
95
|
+
}) => {
|
|
96
|
+
// 从 space props 中提取 wrap,如果未定义则不传递
|
|
97
|
+
const spacePropsWithWrap = {
|
|
98
|
+
...space,
|
|
99
|
+
align: 'start'
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
// 只有当 space 中明确定义了 wrap 时才传递,否则使用组件默认行为
|
|
103
|
+
if (type === 'space' && space?.wrap !== undefined) {
|
|
104
|
+
spacePropsWithWrap.wrap = space.wrap;
|
|
105
|
+
}
|
|
106
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Components, {
|
|
107
|
+
...spacePropsWithWrap,
|
|
108
|
+
children: dom
|
|
109
|
+
});
|
|
110
|
+
}, [Components, space, type]);
|
|
101
111
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(RowWrapper, {
|
|
102
112
|
Wrapper: Wrapper,
|
|
103
113
|
children: list
|
|
@@ -19,8 +19,8 @@ const FormItemProvide = exports.FormItemProvide = /*#__PURE__*/_react.default.cr
|
|
|
19
19
|
/**
|
|
20
20
|
* 把value扔给 fieldProps,方便给自定义用
|
|
21
21
|
*
|
|
22
|
-
* @param param0
|
|
23
22
|
* @returns
|
|
23
|
+
* @param formFieldProps
|
|
24
24
|
*/
|
|
25
25
|
const WithValueFomFiledProps = formFieldProps => {
|
|
26
26
|
const {
|
|
@@ -90,11 +90,14 @@ const WithValueFomFiledProps = formFieldProps => {
|
|
|
90
90
|
[valuePropName]: formFieldProps[valuePropName],
|
|
91
91
|
...filedChildren.props,
|
|
92
92
|
onChange: finalChange,
|
|
93
|
-
fieldProps
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
93
|
+
// 只有当子组件是 ProFormComponent 时才传递 fieldProps,避免传递给原生 DOM 元素
|
|
94
|
+
...(!isProFormComponent && fieldProps ? {
|
|
95
|
+
fieldProps: {
|
|
96
|
+
...filedChildren.props?.fieldProps,
|
|
97
|
+
...fieldPropsFromRest,
|
|
98
|
+
...fieldProps
|
|
99
|
+
}
|
|
100
|
+
} : {}),
|
|
98
101
|
...(variantFromRest !== undefined && {
|
|
99
102
|
variant: variantFromRest
|
|
100
103
|
}),
|
|
@@ -173,7 +176,6 @@ const WarpFormItem = ({
|
|
|
173
176
|
getValueProps: getValuePropsFunc,
|
|
174
177
|
children: children
|
|
175
178
|
});
|
|
176
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
177
179
|
}, [addonAfter, addonBefore, children, convertValue?.toString(), props]);
|
|
178
180
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(FormItemProvide.Provider, {
|
|
179
181
|
value: {
|
|
@@ -47,8 +47,6 @@ const ignoreWidthValueType = ['switch', 'radioButton', 'radio', 'rate'];
|
|
|
47
47
|
*/
|
|
48
48
|
function warpField(Field, config) {
|
|
49
49
|
// 标记是否是 ProForm 的组件
|
|
50
|
-
// @ts-ignore
|
|
51
|
-
// eslint-disable-next-line no-param-reassign
|
|
52
50
|
Field.displayName = 'ProFormComponent';
|
|
53
51
|
const FieldWithContext = props => {
|
|
54
52
|
const {
|
|
@@ -108,9 +106,7 @@ function warpField(Field, config) {
|
|
|
108
106
|
formItemProps: getFormItemProps?.(),
|
|
109
107
|
fieldProps: getFieldProps?.()
|
|
110
108
|
};
|
|
111
|
-
},
|
|
112
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
113
|
-
[getFieldProps, getFormItemProps, rest.dependenciesValues, onlyChange]);
|
|
109
|
+
}, [getFieldProps, getFormItemProps, rest.dependenciesValues, onlyChange]);
|
|
114
110
|
const fieldProps = (0, _utils.useDeepCompareMemo)(() => {
|
|
115
111
|
const newFieldProps = {
|
|
116
112
|
...(ignoreFormItem ? (0, _utils.omitUndefined)({
|
|
@@ -152,8 +148,6 @@ function warpField(Field, config) {
|
|
|
152
148
|
if (Array.isArray(prefixName) && name) name = `${prefixName.join('.')}.${name}`;
|
|
153
149
|
const key = name && `form-${contextValue.formKey ?? ''}-field-${name}`;
|
|
154
150
|
return key;
|
|
155
|
-
|
|
156
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
157
151
|
}, [(0, _utils.stringify)(otherProps?.name), prefixName, contextValue.formKey]);
|
|
158
152
|
const onChange = (0, _utils.useRefFunction)((...restParams) => {
|
|
159
153
|
if (getFormItemProps || getFieldProps) {
|
|
@@ -170,7 +164,6 @@ function warpField(Field, config) {
|
|
|
170
164
|
};
|
|
171
165
|
if (isIgnoreWidth) Reflect.deleteProperty(newStyle, 'width');
|
|
172
166
|
return (0, _utils.omitUndefined)(newStyle);
|
|
173
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
174
167
|
}, [(0, _utils.stringify)(fieldProps?.style), contextValue.grid, isIgnoreWidth, width]);
|
|
175
168
|
const className = (0, _utils.useDeepCompareMemo)(() => {
|
|
176
169
|
const isSizeEnum = width && WIDTH_SIZE_ENUM[width];
|
|
@@ -200,15 +193,12 @@ function warpField(Field, config) {
|
|
|
200
193
|
};
|
|
201
194
|
}, [allowClear, className, onChange, fieldProps, style]);
|
|
202
195
|
const field = (0, _utils.useDeepCompareMemo)(() => {
|
|
203
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Field
|
|
204
|
-
// @ts-ignore
|
|
205
|
-
, {
|
|
196
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Field, {
|
|
206
197
|
...rest,
|
|
207
198
|
fieldProps: fieldFieldProps,
|
|
208
199
|
proFieldProps: fieldProFieldProps,
|
|
209
200
|
ref: props?.fieldRef
|
|
210
201
|
}, props.proFormFieldKey || props.name);
|
|
211
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
212
202
|
}, [fieldProFieldProps, fieldFieldProps, rest]);
|
|
213
203
|
|
|
214
204
|
// 使用useMemo包裹避免不必要的re-render
|
|
@@ -219,9 +209,7 @@ function warpField(Field, config) {
|
|
|
219
209
|
, {
|
|
220
210
|
label: label && proFieldProps?.light !== true ? label : undefined,
|
|
221
211
|
tooltip: proFieldProps?.light !== true && tooltip,
|
|
222
|
-
valuePropName: valuePropName
|
|
223
|
-
// @ts-ignore
|
|
224
|
-
,
|
|
212
|
+
valuePropName: valuePropName,
|
|
225
213
|
...otherProps,
|
|
226
214
|
ignoreFormItem: ignoreFormItem,
|
|
227
215
|
transform: transform,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { ColProps } from 'antd';
|
|
2
|
-
import type { LabelTooltipType } from 'antd/lib/form/FormItemLabel';
|
|
3
2
|
import type { FormListFieldData, FormListOperation, FormListProps } from 'antd/lib/form/FormList';
|
|
4
3
|
import type { NamePath } from 'antd/lib/form/interface';
|
|
5
4
|
import type { ReactNode } from 'react';
|
|
6
5
|
import React from 'react';
|
|
6
|
+
import type { LabelTooltipType } from '../../../utils';
|
|
7
7
|
import type { ProFormGridConfig } from '../../typing';
|
|
8
8
|
import type { ChildrenItemFunction, FormListActionGuard, ProFromListCommonProps } from './ListItem';
|
|
9
9
|
declare const FormListContext: React.Context<Record<string, any> | (FormListFieldData & {
|
|
@@ -99,8 +99,6 @@ function ProFormList(props) {
|
|
|
99
99
|
}
|
|
100
100
|
return [listContext.name, rest.name].flat(1);
|
|
101
101
|
}, [listContext.name, rest.name]);
|
|
102
|
-
|
|
103
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
104
102
|
(0, _react.useImperativeHandle)(actionRef, () => ({
|
|
105
103
|
...actionRefs.current,
|
|
106
104
|
get: index => {
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
|
+
var _util = require("@rc-component/util");
|
|
8
9
|
var _antd = require("antd");
|
|
9
10
|
var _react = _interopRequireDefault(require("react"));
|
|
10
11
|
var _Radio = _interopRequireDefault(require("../../../field/components/Radio"));
|
|
@@ -77,8 +78,11 @@ const ProFormRadioComponents = /*#__PURE__*/_react.default.forwardRef(({
|
|
|
77
78
|
fieldProps,
|
|
78
79
|
children
|
|
79
80
|
}, ref) => {
|
|
81
|
+
const {
|
|
82
|
+
...restFieldProps
|
|
83
|
+
} = fieldProps || {};
|
|
80
84
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.Radio, {
|
|
81
|
-
...
|
|
85
|
+
...(0, _util.omit)(restFieldProps, ['allowClear']),
|
|
82
86
|
ref: ref,
|
|
83
87
|
children: children
|
|
84
88
|
});
|
|
@@ -90,8 +94,5 @@ const ProFormRadio = (0, _warpField.default)?.(ProFormRadioComponents, {
|
|
|
90
94
|
const WrappedProFormRadio = ProFormRadio;
|
|
91
95
|
WrappedProFormRadio.Group = RadioGroup;
|
|
92
96
|
WrappedProFormRadio.Button = _antd.Radio.Button;
|
|
93
|
-
|
|
94
|
-
// @ts-ignore
|
|
95
|
-
// eslint-disable-next-line no-param-reassign
|
|
96
97
|
WrappedProFormRadio.displayName = 'ProFormComponent';
|
|
97
98
|
var _default = exports.default = WrappedProFormRadio;
|
|
@@ -145,7 +145,6 @@ function BetaSchemaForm(props) {
|
|
|
145
145
|
// like StepsForm's columns but not only for StepsForm
|
|
146
146
|
if (columns.length && Array.isArray(columns[0])) return;
|
|
147
147
|
return genItems(columns);
|
|
148
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
149
148
|
}, [columns, restProps?.open, action, type, formDomsDeps, formRef.current]);
|
|
150
149
|
|
|
151
150
|
/**
|
|
@@ -31,7 +31,6 @@ const StepsForm = ({
|
|
|
31
31
|
return steps?.map((step, index) => /*#__PURE__*/(0, _react.createElement)(_index.default, {
|
|
32
32
|
grid: grid,
|
|
33
33
|
...step,
|
|
34
|
-
// eslint-disable-next-line react/no-array-index-key
|
|
35
34
|
key: index,
|
|
36
35
|
layoutType: "StepForm",
|
|
37
36
|
columns: columns[index]
|
|
@@ -127,6 +127,5 @@ const WrappedProFormSelect = ProFormSelect;
|
|
|
127
127
|
WrappedProFormSelect.SearchSelect = ProFormSearchSelect;
|
|
128
128
|
|
|
129
129
|
// @ts-ignore
|
|
130
|
-
// eslint-disable-next-line no-param-reassign
|
|
131
130
|
WrappedProFormSelect.displayName = 'ProFormComponent';
|
|
132
131
|
var _default = exports.default = WrappedProFormSelect;
|
|
@@ -159,8 +159,5 @@ const Password = ({
|
|
|
159
159
|
};
|
|
160
160
|
const WrappedProFormText = ProFormText;
|
|
161
161
|
WrappedProFormText.Password = Password;
|
|
162
|
-
|
|
163
|
-
// @ts-ignore
|
|
164
|
-
// eslint-disable-next-line no-param-reassign
|
|
165
162
|
WrappedProFormText.displayName = 'ProFormComponent';
|
|
166
163
|
var _default = exports.default = WrappedProFormText;
|
|
@@ -76,8 +76,10 @@ const BaseProFormUploadButton = /*#__PURE__*/_react.default.forwardRef(({
|
|
|
76
76
|
children: [icon, title]
|
|
77
77
|
}))
|
|
78
78
|
}), previewImage && /*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.Image, {
|
|
79
|
-
|
|
80
|
-
|
|
79
|
+
styles: {
|
|
80
|
+
root: {
|
|
81
|
+
display: 'none'
|
|
82
|
+
}
|
|
81
83
|
},
|
|
82
84
|
...imageProps,
|
|
83
85
|
preview: {
|
|
@@ -37,7 +37,6 @@ const BaseProFormUploadDragger = /*#__PURE__*/_react.default.forwardRef(({
|
|
|
37
37
|
// 如果配置了 max ,并且 超过了文件列表的大小,就不展示按钮
|
|
38
38
|
const showUploadButton = (max === undefined || !value || value?.length < max) && mode !== 'read' && proFieldProps?.readonly !== true;
|
|
39
39
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_antd.Upload.Dragger, {
|
|
40
|
-
// @ts-ignore
|
|
41
40
|
ref: ref,
|
|
42
41
|
name: "files",
|
|
43
42
|
action: action,
|