@ant-design/pro-components 3.1.14-0 → 3.1.14-1
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/Card/style.js +0 -4
- package/es/descriptions/ProDescriptions.js +2 -2
- package/es/field/PureProField.js +1 -1
- package/es/field/components/Options/index.js +3 -3
- package/es/layout/components/PageHeader/index.js +6 -7
- package/es/layout/components/PageHeader/style/index.js +2 -4
- package/lib/card/components/Card/style.js +0 -4
- package/lib/descriptions/ProDescriptions.js +2 -2
- package/lib/field/PureProField.js +1 -1
- package/lib/field/components/Options/index.js +3 -3
- package/lib/layout/components/PageHeader/index.js +5 -6
- package/lib/layout/components/PageHeader/style/index.js +1 -3
- package/package.json +1 -1
|
@@ -25,10 +25,6 @@ const genProCardStyle = token => {
|
|
|
25
25
|
borderRadius: token.borderRadiusLG,
|
|
26
26
|
transition: 'all 0.3s',
|
|
27
27
|
...resetComponent?.(token),
|
|
28
|
-
// 对齐 antd v6 Card:variant='borderless' 默认就有 boxShadowTertiary 浅阴影。
|
|
29
|
-
'&&:not(&-border):not(&-box-shadow)': {
|
|
30
|
-
boxShadow: token.boxShadowTertiary
|
|
31
|
-
},
|
|
32
28
|
'&-box-shadow': {
|
|
33
29
|
boxShadow: token.boxShadowTertiary,
|
|
34
30
|
borderColor: 'transparent'
|
|
@@ -125,9 +125,9 @@ const ProDescriptions = props => {
|
|
|
125
125
|
minWidth: 0
|
|
126
126
|
}
|
|
127
127
|
},
|
|
128
|
-
extra: rest.extra ? /*#__PURE__*/_jsxs(Space, {
|
|
128
|
+
extra: options || rest.extra ? /*#__PURE__*/_jsxs(Space, {
|
|
129
129
|
children: [options, rest.extra]
|
|
130
|
-
}) :
|
|
130
|
+
}) : undefined,
|
|
131
131
|
title: title,
|
|
132
132
|
items: children
|
|
133
133
|
})
|
package/es/field/PureProField.js
CHANGED
|
@@ -45,7 +45,7 @@ export const pureRenderRead = (dataValue, valueType, props, valueTypeMap) => {
|
|
|
45
45
|
}, /*#__PURE__*/_jsx(_Fragment, {
|
|
46
46
|
children: dataValue
|
|
47
47
|
}));
|
|
48
|
-
if (props?.render) {
|
|
48
|
+
if (props?.render && valueType !== 'option') {
|
|
49
49
|
return props.render?.(dataValue, {
|
|
50
50
|
text: dataValue,
|
|
51
51
|
...props
|
|
@@ -42,9 +42,9 @@ const FieldOptions = ({
|
|
|
42
42
|
mode: type,
|
|
43
43
|
...fieldProps
|
|
44
44
|
}, /*#__PURE__*/_jsx(_Fragment, {}));
|
|
45
|
-
if (!doms
|
|
46
|
-
|
|
47
|
-
|
|
45
|
+
if (!doms) return null;
|
|
46
|
+
if (!Array.isArray(doms)) return doms;
|
|
47
|
+
if (doms.length < 1) return null;
|
|
48
48
|
return /*#__PURE__*/_jsx("div", {
|
|
49
49
|
style: {
|
|
50
50
|
display: 'flex',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ArrowLeftOutlined, ArrowRightOutlined } from '@ant-design/icons';
|
|
2
2
|
import ResizeObserver from '@rc-component/resize-observer';
|
|
3
|
-
import { Avatar, Breadcrumb, ConfigProvider, Space } from 'antd';
|
|
3
|
+
import { Avatar, Breadcrumb, Button, ConfigProvider, Space } from 'antd';
|
|
4
4
|
import { clsx } from 'clsx';
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import useStyle from "./style";
|
|
@@ -12,14 +12,13 @@ const renderBack = (prefixCls, hashId, backIcon, onBack) => {
|
|
|
12
12
|
}
|
|
13
13
|
return /*#__PURE__*/_jsx("div", {
|
|
14
14
|
className: clsx(`${prefixCls}-back`, hashId),
|
|
15
|
-
children: /*#__PURE__*/_jsx(
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
},
|
|
15
|
+
children: /*#__PURE__*/_jsx(Button, {
|
|
16
|
+
type: "text",
|
|
17
|
+
size: "small",
|
|
18
|
+
onClick: onBack,
|
|
20
19
|
className: clsx(`${prefixCls}-back-button`, hashId),
|
|
21
20
|
"aria-label": "back",
|
|
22
|
-
|
|
21
|
+
icon: backIcon
|
|
23
22
|
})
|
|
24
23
|
});
|
|
25
24
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { resetComponent, useStyle as useAntdStyle } from "../../../../utils";
|
|
2
2
|
const textOverflowEllipsis = () => ({
|
|
3
3
|
overflow: 'hidden',
|
|
4
4
|
whiteSpace: 'nowrap',
|
|
@@ -30,9 +30,7 @@ const genPageHeaderStyle = token => {
|
|
|
30
30
|
lineHeight: 1,
|
|
31
31
|
'&-button': {
|
|
32
32
|
fontSize: 16,
|
|
33
|
-
|
|
34
|
-
color: token.pageHeaderColorBack,
|
|
35
|
-
cursor: 'pointer'
|
|
33
|
+
color: token.pageHeaderColorBack
|
|
36
34
|
},
|
|
37
35
|
[`${token.componentCls}-rlt &`]: {
|
|
38
36
|
float: 'right',
|
|
@@ -31,10 +31,6 @@ const genProCardStyle = token => {
|
|
|
31
31
|
borderRadius: token.borderRadiusLG,
|
|
32
32
|
transition: 'all 0.3s',
|
|
33
33
|
...(0, _utils.resetComponent)?.(token),
|
|
34
|
-
// 对齐 antd v6 Card:variant='borderless' 默认就有 boxShadowTertiary 浅阴影。
|
|
35
|
-
'&&:not(&-border):not(&-box-shadow)': {
|
|
36
|
-
boxShadow: token.boxShadowTertiary
|
|
37
|
-
},
|
|
38
34
|
'&-box-shadow': {
|
|
39
35
|
boxShadow: token.boxShadowTertiary,
|
|
40
36
|
borderColor: 'transparent'
|
|
@@ -132,9 +132,9 @@ const ProDescriptions = props => {
|
|
|
132
132
|
minWidth: 0
|
|
133
133
|
}
|
|
134
134
|
},
|
|
135
|
-
extra: rest.extra ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_antd.Space, {
|
|
135
|
+
extra: options || rest.extra ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_antd.Space, {
|
|
136
136
|
children: [options, rest.extra]
|
|
137
|
-
}) :
|
|
137
|
+
}) : undefined,
|
|
138
138
|
title: title,
|
|
139
139
|
items: children
|
|
140
140
|
})
|
|
@@ -51,7 +51,7 @@ const pureRenderRead = (dataValue, valueType, props, valueTypeMap) => {
|
|
|
51
51
|
}, /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
|
|
52
52
|
children: dataValue
|
|
53
53
|
}));
|
|
54
|
-
if (props?.render) {
|
|
54
|
+
if (props?.render && valueType !== 'option') {
|
|
55
55
|
return props.render?.(dataValue, {
|
|
56
56
|
text: dataValue,
|
|
57
57
|
...props
|
|
@@ -48,9 +48,9 @@ const FieldOptions = ({
|
|
|
48
48
|
mode: type,
|
|
49
49
|
...fieldProps
|
|
50
50
|
}, /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {}));
|
|
51
|
-
if (!doms
|
|
52
|
-
|
|
53
|
-
|
|
51
|
+
if (!doms) return null;
|
|
52
|
+
if (!Array.isArray(doms)) return doms;
|
|
53
|
+
if (doms.length < 1) return null;
|
|
54
54
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
55
55
|
style: {
|
|
56
56
|
display: 'flex',
|
|
@@ -18,14 +18,13 @@ const renderBack = (prefixCls, hashId, backIcon, onBack) => {
|
|
|
18
18
|
}
|
|
19
19
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
20
20
|
className: (0, _clsx.clsx)(`${prefixCls}-back`, hashId),
|
|
21
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
},
|
|
21
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.Button, {
|
|
22
|
+
type: "text",
|
|
23
|
+
size: "small",
|
|
24
|
+
onClick: onBack,
|
|
26
25
|
className: (0, _clsx.clsx)(`${prefixCls}-back-button`, hashId),
|
|
27
26
|
"aria-label": "back",
|
|
28
|
-
|
|
27
|
+
icon: backIcon
|
|
29
28
|
})
|
|
30
29
|
});
|
|
31
30
|
};
|
|
@@ -36,9 +36,7 @@ const genPageHeaderStyle = token => {
|
|
|
36
36
|
lineHeight: 1,
|
|
37
37
|
'&-button': {
|
|
38
38
|
fontSize: 16,
|
|
39
|
-
|
|
40
|
-
color: token.pageHeaderColorBack,
|
|
41
|
-
cursor: 'pointer'
|
|
39
|
+
color: token.pageHeaderColorBack
|
|
42
40
|
},
|
|
43
41
|
[`${token.componentCls}-rlt &`]: {
|
|
44
42
|
float: 'right',
|