antd-mobile 5.2.1 → 5.3.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/2x/cjs/components/avatar/avatar.js +1 -0
- package/2x/cjs/components/calendar/calendar.js +23 -20
- package/2x/cjs/components/date-picker/date-picker.js +3 -7
- package/2x/cjs/components/dialog/dialog.css +27 -18
- package/2x/cjs/components/dialog/dialog.js +39 -42
- package/2x/cjs/components/dropdown/dropdown.css +2 -1
- package/2x/cjs/components/ellipsis/ellipsis.d.ts +2 -0
- package/2x/cjs/components/ellipsis/ellipsis.js +8 -5
- package/2x/cjs/components/form/context.d.ts +2 -1
- package/2x/cjs/components/form/context.js +6 -5
- package/2x/cjs/components/form/form-item.css +27 -1
- package/2x/cjs/components/form/form-item.d.ts +1 -0
- package/2x/cjs/components/form/form-item.js +44 -13
- package/2x/cjs/components/form/form.js +18 -9
- package/2x/cjs/components/form/index.css +27 -1
- package/2x/cjs/components/input/input.js +2 -2
- package/2x/cjs/components/modal/modal.css +27 -21
- package/2x/cjs/components/modal/modal.js +39 -36
- package/2x/cjs/components/popover/arrow.js +1 -2
- package/2x/cjs/components/pull-to-refresh/pull-to-refresh.js +1 -1
- package/2x/cjs/components/switch/spin-icon.d.ts +3 -0
- package/2x/cjs/components/switch/spin-icon.js +37 -0
- package/2x/cjs/components/switch/switch.css +1 -1
- package/2x/cjs/components/switch/switch.js +4 -6
- package/2x/cjs/locales/base.d.ts +51 -0
- package/2x/cjs/locales/base.js +52 -0
- package/2x/cjs/locales/en-US.d.ts +51 -0
- package/2x/cjs/locales/zh-CN.d.ts +51 -0
- package/2x/cjs/locales/zh-CN.js +52 -0
- package/2x/es/components/avatar/avatar.js +1 -0
- package/2x/es/components/calendar/calendar.js +23 -19
- package/2x/es/components/date-picker/date-picker.js +3 -7
- package/2x/es/components/dialog/dialog.css +27 -18
- package/2x/es/components/dialog/dialog.js +37 -41
- package/2x/es/components/dropdown/dropdown.css +2 -1
- package/2x/es/components/ellipsis/ellipsis.d.ts +2 -0
- package/2x/es/components/ellipsis/ellipsis.js +7 -5
- package/2x/es/components/form/context.d.ts +2 -1
- package/2x/es/components/form/context.js +4 -3
- package/2x/es/components/form/form-item.css +27 -1
- package/2x/es/components/form/form-item.d.ts +1 -0
- package/2x/es/components/form/form-item.js +43 -13
- package/2x/es/components/form/form.js +18 -11
- package/2x/es/components/form/index.css +27 -1
- package/2x/es/components/input/input.js +2 -2
- package/2x/es/components/modal/modal.css +27 -21
- package/2x/es/components/modal/modal.js +37 -36
- package/2x/es/components/popover/arrow.js +1 -2
- package/2x/es/components/pull-to-refresh/pull-to-refresh.js +1 -1
- package/2x/es/components/switch/spin-icon.d.ts +3 -0
- package/2x/es/components/switch/spin-icon.js +23 -0
- package/2x/es/components/switch/switch.css +1 -1
- package/2x/es/components/switch/switch.js +3 -5
- package/2x/es/locales/base.d.ts +51 -0
- package/2x/es/locales/base.js +52 -0
- package/2x/es/locales/en-US.d.ts +51 -0
- package/2x/es/locales/zh-CN.d.ts +51 -0
- package/2x/es/locales/zh-CN.js +52 -0
- package/2x/package.json +4 -4
- package/cjs/components/avatar/avatar.js +1 -0
- package/cjs/components/calendar/calendar.js +23 -20
- package/cjs/components/date-picker/date-picker.js +3 -7
- package/cjs/components/dialog/dialog.css +26 -18
- package/cjs/components/dialog/dialog.js +39 -42
- package/cjs/components/dropdown/dropdown.css +2 -1
- package/cjs/components/ellipsis/ellipsis.d.ts +2 -0
- package/cjs/components/ellipsis/ellipsis.js +8 -5
- package/cjs/components/form/context.d.ts +2 -1
- package/cjs/components/form/context.js +6 -5
- package/cjs/components/form/form-item.css +21 -1
- package/cjs/components/form/form-item.d.ts +1 -0
- package/cjs/components/form/form-item.js +44 -13
- package/cjs/components/form/form.js +18 -9
- package/cjs/components/form/index.css +21 -1
- package/cjs/components/input/input.js +2 -2
- package/cjs/components/modal/modal.css +26 -20
- package/cjs/components/modal/modal.js +39 -36
- package/cjs/components/popover/arrow.js +1 -2
- package/cjs/components/pull-to-refresh/pull-to-refresh.js +1 -1
- package/cjs/components/switch/spin-icon.d.ts +3 -0
- package/cjs/components/switch/spin-icon.js +37 -0
- package/cjs/components/switch/switch.css +1 -1
- package/cjs/components/switch/switch.js +4 -6
- package/cjs/locales/base.d.ts +51 -0
- package/cjs/locales/base.js +52 -0
- package/cjs/locales/en-US.d.ts +51 -0
- package/cjs/locales/zh-CN.d.ts +51 -0
- package/cjs/locales/zh-CN.js +52 -0
- package/es/components/avatar/avatar.js +1 -0
- package/es/components/calendar/calendar.js +23 -19
- package/es/components/date-picker/date-picker.js +3 -7
- package/es/components/dialog/dialog.css +26 -18
- package/es/components/dialog/dialog.js +37 -41
- package/es/components/dropdown/dropdown.css +2 -1
- package/es/components/ellipsis/ellipsis.d.ts +2 -0
- package/es/components/ellipsis/ellipsis.js +7 -5
- package/es/components/form/context.d.ts +2 -1
- package/es/components/form/context.js +4 -3
- package/es/components/form/form-item.css +21 -1
- package/es/components/form/form-item.d.ts +1 -0
- package/es/components/form/form-item.js +43 -13
- package/es/components/form/form.js +18 -11
- package/es/components/form/index.css +21 -1
- package/es/components/input/input.js +2 -2
- package/es/components/modal/modal.css +26 -20
- package/es/components/modal/modal.js +37 -36
- package/es/components/popover/arrow.js +1 -2
- package/es/components/pull-to-refresh/pull-to-refresh.js +1 -1
- package/es/components/switch/spin-icon.d.ts +3 -0
- package/es/components/switch/spin-icon.js +23 -0
- package/es/components/switch/switch.css +1 -1
- package/es/components/switch/switch.js +3 -5
- package/es/locales/base.d.ts +51 -0
- package/es/locales/base.js +52 -0
- package/es/locales/en-US.d.ts +51 -0
- package/es/locales/zh-CN.d.ts +51 -0
- package/es/locales/zh-CN.js +52 -0
- package/package.json +4 -4
- package/umd/antd-mobile.js +1 -1
- package/umd/antd-mobile.js.LICENSE.txt +0 -24
- package/2x/assets/spin.svg +0 -12
- package/2x/cjs/assets/spin.svg +0 -12
- package/2x/es/assets/spin.svg +0 -12
- package/assets/spin.svg +0 -12
- package/cjs/assets/spin.svg +0 -12
- package/es/assets/spin.svg +0 -12
|
@@ -52,49 +52,28 @@ export const Modal = p => {
|
|
|
52
52
|
}
|
|
53
53
|
});
|
|
54
54
|
const [active, setActive] = useState(props.visible);
|
|
55
|
-
const
|
|
56
|
-
className:
|
|
57
|
-
style:
|
|
58
|
-
display: active ? 'unset' : 'none'
|
|
59
|
-
}
|
|
60
|
-
}, React.createElement(Mask, {
|
|
61
|
-
visible: props.visible,
|
|
62
|
-
onMaskClick: props.closeOnMaskClick ? props.onClose : undefined,
|
|
63
|
-
style: props.maskStyle,
|
|
64
|
-
className: classNames(`${classPrefix}-mask`, props.maskClassName)
|
|
65
|
-
}), React.createElement("div", {
|
|
66
|
-
className: `${classPrefix}-wrap`,
|
|
67
|
-
style: {
|
|
68
|
-
pointerEvents: props.visible ? 'unset' : 'none'
|
|
69
|
-
}
|
|
70
|
-
}, React.createElement(animated.div, {
|
|
71
|
-
style: Object.assign({}, style),
|
|
72
|
-
onClick: e => e.stopPropagation(),
|
|
73
|
-
className: `${classPrefix}-main`
|
|
55
|
+
const body = React.createElement("div", {
|
|
56
|
+
className: classNames(cls('body'), props.image && cls('with-image'), props.bodyClassName),
|
|
57
|
+
style: props.bodyStyle
|
|
74
58
|
}, props.showCloseButton && React.createElement("a", {
|
|
75
|
-
className: classNames(
|
|
59
|
+
className: classNames(cls('close'), 'adm-plain-anchor'),
|
|
76
60
|
onClick: props.onClose
|
|
77
61
|
}, React.createElement(CloseOutline, null)), !!props.image && React.createElement("div", {
|
|
78
|
-
className:
|
|
62
|
+
className: cls('image-container')
|
|
79
63
|
}, React.createElement(Image, {
|
|
80
64
|
src: props.image,
|
|
81
65
|
alt: 'modal header image',
|
|
82
66
|
width: '100%'
|
|
83
|
-
})), React.createElement("div", {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
}, props.header)), !!props.title && React.createElement("div", {
|
|
91
|
-
className: `${classPrefix}-body-title`
|
|
92
|
-
}, props.title), !!props.content && React.createElement("div", {
|
|
93
|
-
className: `${classPrefix}-body-content`
|
|
94
|
-
}, typeof props.content === 'string' ? React.createElement(AutoCenter, null, props.content) : props.content)), React.createElement(Space, {
|
|
67
|
+
})), !!props.header && React.createElement("div", {
|
|
68
|
+
className: cls('header')
|
|
69
|
+
}, React.createElement(AutoCenter, null, props.header)), !!props.title && React.createElement("div", {
|
|
70
|
+
className: cls('title')
|
|
71
|
+
}, props.title), React.createElement("div", {
|
|
72
|
+
className: cls('content')
|
|
73
|
+
}, typeof props.content === 'string' ? React.createElement(AutoCenter, null, props.content) : props.content), React.createElement(Space, {
|
|
95
74
|
direction: 'vertical',
|
|
96
75
|
block: true,
|
|
97
|
-
className:
|
|
76
|
+
className: classNames(cls('footer'), props.actions.length === 0 && cls('footer-empty'))
|
|
98
77
|
}, props.actions.map((action, index) => {
|
|
99
78
|
return React.createElement(ModalActionButton, {
|
|
100
79
|
key: action.key,
|
|
@@ -109,6 +88,28 @@ export const Modal = p => {
|
|
|
109
88
|
}
|
|
110
89
|
})
|
|
111
90
|
});
|
|
112
|
-
})))
|
|
91
|
+
})));
|
|
92
|
+
const node = withStopPropagation(props.stopPropagation, withNativeProps(props, React.createElement("div", {
|
|
93
|
+
className: cls(),
|
|
94
|
+
style: {
|
|
95
|
+
display: active ? 'unset' : 'none'
|
|
96
|
+
}
|
|
97
|
+
}, React.createElement(Mask, {
|
|
98
|
+
visible: props.visible,
|
|
99
|
+
onMaskClick: props.closeOnMaskClick ? props.onClose : undefined,
|
|
100
|
+
style: props.maskStyle,
|
|
101
|
+
className: classNames(cls('mask'), props.maskClassName)
|
|
102
|
+
}), React.createElement("div", {
|
|
103
|
+
className: cls('wrap'),
|
|
104
|
+
style: {
|
|
105
|
+
pointerEvents: props.visible ? 'unset' : 'none'
|
|
106
|
+
}
|
|
107
|
+
}, React.createElement(animated.div, {
|
|
108
|
+
style: style
|
|
109
|
+
}, body)))));
|
|
113
110
|
return renderToContainer(props.getContainer, node);
|
|
114
|
-
};
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
function cls(name = '') {
|
|
114
|
+
return 'adm-modal' + (name && '-') + name;
|
|
115
|
+
}
|
|
@@ -4,9 +4,8 @@ export const Arrow = memo(props => {
|
|
|
4
4
|
return withNativeProps(props, React.createElement("svg", {
|
|
5
5
|
viewBox: '0 0 30 16'
|
|
6
6
|
}, React.createElement("g", {
|
|
7
|
-
transform: 'translate(-1300.000000, -841.000000)',
|
|
8
7
|
fill: 'currentColor'
|
|
9
8
|
}, React.createElement("path", {
|
|
10
|
-
d: '
|
|
9
|
+
d: 'M0,0 L30,0 L18.07289,14.312538 C16.65863,16.009645 14.13637,16.238942 12.43926,14.824685 C12.25341,14.669808 12.08199,14.49839 11.92711,14.312538 L0,0 L0,0 Z'
|
|
11
10
|
}))));
|
|
12
11
|
});
|
|
@@ -108,7 +108,7 @@ export const PullToRefresh = p => {
|
|
|
108
108
|
if (!element) return;
|
|
109
109
|
const scrollParent = getScrollParent(element);
|
|
110
110
|
if (!scrollParent) return;
|
|
111
|
-
const top = 'scrollTop' in scrollParent ? scrollParent.scrollTop : scrollParent.
|
|
111
|
+
const top = 'scrollTop' in scrollParent ? scrollParent.scrollTop : scrollParent.scrollY;
|
|
112
112
|
|
|
113
113
|
if (top <= 0 && y > 0) {
|
|
114
114
|
pullingRef.current = true;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React, { memo } from 'react';
|
|
2
|
+
import { withNativeProps } from '../../utils/native-props';
|
|
3
|
+
export const SpinIcon = memo(props => {
|
|
4
|
+
return withNativeProps(props, React.createElement("svg", {
|
|
5
|
+
width: '28px',
|
|
6
|
+
height: '28px',
|
|
7
|
+
viewBox: '0 0 28 28'
|
|
8
|
+
}, React.createElement("g", {
|
|
9
|
+
stroke: 'none',
|
|
10
|
+
strokeWidth: '1',
|
|
11
|
+
fill: 'none',
|
|
12
|
+
fillRule: 'evenodd'
|
|
13
|
+
}, React.createElement("g", {
|
|
14
|
+
transform: 'translate(-137.000000, -840.000000)',
|
|
15
|
+
fill: '#1576FE'
|
|
16
|
+
}, React.createElement("g", {
|
|
17
|
+
transform: 'translate(80.000000, 823.000000)'
|
|
18
|
+
}, React.createElement("g", {
|
|
19
|
+
transform: 'translate(53.000000, 13.000000)'
|
|
20
|
+
}, React.createElement("path", {
|
|
21
|
+
d: 'M17.9996753,31.5 C10.5556724,31.5 4.5,25.4443275 4.5,18.0003247 C4.5,10.5563219 10.5556724,4.5 17.9996753,4.5 C18.5355492,4.5 18.9702974,4.93474816 18.9702974,5.47062208 C18.9702974,6.006496 18.5355492,6.44124416 17.9996753,6.44124416 C11.6261524,6.44124416 6.44124416,11.6267709 6.44124416,18.0002938 C6.44124416,24.3738167 11.6261524,29.5587249 17.9996753,29.5587249 C24.3731982,29.5587249 29.5587249,24.3738167 29.5587249,18.0002938 C29.5587249,14.7964616 28.2778291,11.8169616 25.9523687,9.61220279 C25.5637302,9.24317094 25.5473089,8.62893223 25.9157222,8.23967523 C26.2841356,7.84976878 26.8989928,7.83461537 27.2882498,8.20302872 C30.0042351,10.7787368 31.5,14.2580826 31.5,18.0002938 C31.5,25.4443275 25.4436781,31.5 17.9996753,31.5 Z'
|
|
22
|
+
})))))));
|
|
23
|
+
});
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { __awaiter } from "tslib";
|
|
2
2
|
import classNames from 'classnames';
|
|
3
3
|
import React, { useState } from 'react';
|
|
4
|
-
import SpinIcon from '../../assets/spin.svg';
|
|
5
4
|
import { withNativeProps } from '../../utils/native-props';
|
|
6
5
|
import { usePropsValue } from '../../utils/use-props-value';
|
|
7
6
|
import { mergeProps } from '../../utils/with-default-props';
|
|
7
|
+
import { SpinIcon } from './spin-icon';
|
|
8
8
|
const classPrefix = `adm-switch`;
|
|
9
9
|
const defaultProps = {
|
|
10
10
|
defaultChecked: false
|
|
@@ -54,10 +54,8 @@ export const Switch = p => {
|
|
|
54
54
|
className: `${classPrefix}-checkbox`
|
|
55
55
|
}, React.createElement("div", {
|
|
56
56
|
className: `${classPrefix}-handle`
|
|
57
|
-
}, (props.loading || changing) && React.createElement(
|
|
58
|
-
|
|
59
|
-
className: `${classPrefix}-icon`,
|
|
60
|
-
alt: 'switch-handle'
|
|
57
|
+
}, (props.loading || changing) && React.createElement(SpinIcon, {
|
|
58
|
+
className: `${classPrefix}-spin-icon`
|
|
61
59
|
})), React.createElement("div", {
|
|
62
60
|
className: `${classPrefix}-inner`
|
|
63
61
|
}, checked ? props.checkedText : props.uncheckedText))));
|
package/es/locales/base.d.ts
CHANGED
|
@@ -31,6 +31,57 @@ export declare const base: {
|
|
|
31
31
|
description: string;
|
|
32
32
|
};
|
|
33
33
|
};
|
|
34
|
+
Form: {
|
|
35
|
+
required: string;
|
|
36
|
+
optional: string;
|
|
37
|
+
defaultValidateMessages: {
|
|
38
|
+
default: string;
|
|
39
|
+
required: string;
|
|
40
|
+
enum: string;
|
|
41
|
+
whitespace: string;
|
|
42
|
+
date: {
|
|
43
|
+
format: string;
|
|
44
|
+
parse: string;
|
|
45
|
+
invalid: string;
|
|
46
|
+
};
|
|
47
|
+
types: {
|
|
48
|
+
string: string;
|
|
49
|
+
method: string;
|
|
50
|
+
array: string;
|
|
51
|
+
object: string;
|
|
52
|
+
number: string;
|
|
53
|
+
date: string;
|
|
54
|
+
boolean: string;
|
|
55
|
+
integer: string;
|
|
56
|
+
float: string;
|
|
57
|
+
regexp: string;
|
|
58
|
+
email: string;
|
|
59
|
+
url: string;
|
|
60
|
+
hex: string;
|
|
61
|
+
};
|
|
62
|
+
string: {
|
|
63
|
+
len: string;
|
|
64
|
+
min: string;
|
|
65
|
+
max: string;
|
|
66
|
+
range: string;
|
|
67
|
+
};
|
|
68
|
+
number: {
|
|
69
|
+
len: string;
|
|
70
|
+
min: string;
|
|
71
|
+
max: string;
|
|
72
|
+
range: string;
|
|
73
|
+
};
|
|
74
|
+
array: {
|
|
75
|
+
len: string;
|
|
76
|
+
min: string;
|
|
77
|
+
max: string;
|
|
78
|
+
range: string;
|
|
79
|
+
};
|
|
80
|
+
pattern: {
|
|
81
|
+
mismatch: string;
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
};
|
|
34
85
|
ImageUploader: {
|
|
35
86
|
uploading: string;
|
|
36
87
|
};
|
package/es/locales/base.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
const typeTemplate = '${label} is not a valid ${type}';
|
|
1
2
|
export const base = {
|
|
2
3
|
common: {
|
|
3
4
|
confirm: 'Confirm',
|
|
@@ -31,6 +32,57 @@ export const base = {
|
|
|
31
32
|
description: 'Want to try a new search?'
|
|
32
33
|
}
|
|
33
34
|
},
|
|
35
|
+
Form: {
|
|
36
|
+
required: 'Required',
|
|
37
|
+
optional: 'Optional',
|
|
38
|
+
defaultValidateMessages: {
|
|
39
|
+
default: 'Field validation error for ${label}',
|
|
40
|
+
required: 'Please enter ${label}',
|
|
41
|
+
enum: '${label} must be one of [${enum}]',
|
|
42
|
+
whitespace: '${label} cannot be a blank character',
|
|
43
|
+
date: {
|
|
44
|
+
format: '${label} date format is invalid',
|
|
45
|
+
parse: '${label} cannot be converted to a date',
|
|
46
|
+
invalid: '${label} is an invalid date'
|
|
47
|
+
},
|
|
48
|
+
types: {
|
|
49
|
+
string: typeTemplate,
|
|
50
|
+
method: typeTemplate,
|
|
51
|
+
array: typeTemplate,
|
|
52
|
+
object: typeTemplate,
|
|
53
|
+
number: typeTemplate,
|
|
54
|
+
date: typeTemplate,
|
|
55
|
+
boolean: typeTemplate,
|
|
56
|
+
integer: typeTemplate,
|
|
57
|
+
float: typeTemplate,
|
|
58
|
+
regexp: typeTemplate,
|
|
59
|
+
email: typeTemplate,
|
|
60
|
+
url: typeTemplate,
|
|
61
|
+
hex: typeTemplate
|
|
62
|
+
},
|
|
63
|
+
string: {
|
|
64
|
+
len: '${label} must be ${len} characters',
|
|
65
|
+
min: '${label} must be at least ${min} characters',
|
|
66
|
+
max: '${label} must be up to ${max} characters',
|
|
67
|
+
range: '${label} must be between ${min}-${max} characters'
|
|
68
|
+
},
|
|
69
|
+
number: {
|
|
70
|
+
len: '${label} must be equal to ${len}',
|
|
71
|
+
min: '${label} must be minimum ${min}',
|
|
72
|
+
max: '${label} must be maximum ${max}',
|
|
73
|
+
range: '${label} must be between ${min}-${max}'
|
|
74
|
+
},
|
|
75
|
+
array: {
|
|
76
|
+
len: 'Must be ${len} ${label}',
|
|
77
|
+
min: 'At least ${min} ${label}',
|
|
78
|
+
max: 'At most ${max} ${label}',
|
|
79
|
+
range: 'The amount of ${label} must be between ${min}-${max}'
|
|
80
|
+
},
|
|
81
|
+
pattern: {
|
|
82
|
+
mismatch: '${label} does not match the pattern ${pattern}'
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
},
|
|
34
86
|
ImageUploader: {
|
|
35
87
|
uploading: 'Uploading...'
|
|
36
88
|
},
|
package/es/locales/en-US.d.ts
CHANGED
|
@@ -31,6 +31,57 @@ declare const enUS: {
|
|
|
31
31
|
description: string;
|
|
32
32
|
};
|
|
33
33
|
};
|
|
34
|
+
Form: {
|
|
35
|
+
required: string;
|
|
36
|
+
optional: string;
|
|
37
|
+
defaultValidateMessages: {
|
|
38
|
+
default: string;
|
|
39
|
+
required: string;
|
|
40
|
+
enum: string;
|
|
41
|
+
whitespace: string;
|
|
42
|
+
date: {
|
|
43
|
+
format: string;
|
|
44
|
+
parse: string;
|
|
45
|
+
invalid: string;
|
|
46
|
+
};
|
|
47
|
+
types: {
|
|
48
|
+
string: string;
|
|
49
|
+
method: string;
|
|
50
|
+
array: string;
|
|
51
|
+
object: string;
|
|
52
|
+
number: string;
|
|
53
|
+
date: string;
|
|
54
|
+
boolean: string;
|
|
55
|
+
integer: string;
|
|
56
|
+
float: string;
|
|
57
|
+
regexp: string;
|
|
58
|
+
email: string;
|
|
59
|
+
url: string;
|
|
60
|
+
hex: string;
|
|
61
|
+
};
|
|
62
|
+
string: {
|
|
63
|
+
len: string;
|
|
64
|
+
min: string;
|
|
65
|
+
max: string;
|
|
66
|
+
range: string;
|
|
67
|
+
};
|
|
68
|
+
number: {
|
|
69
|
+
len: string;
|
|
70
|
+
min: string;
|
|
71
|
+
max: string;
|
|
72
|
+
range: string;
|
|
73
|
+
};
|
|
74
|
+
array: {
|
|
75
|
+
len: string;
|
|
76
|
+
min: string;
|
|
77
|
+
max: string;
|
|
78
|
+
range: string;
|
|
79
|
+
};
|
|
80
|
+
pattern: {
|
|
81
|
+
mismatch: string;
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
};
|
|
34
85
|
ImageUploader: {
|
|
35
86
|
uploading: string;
|
|
36
87
|
};
|
package/es/locales/zh-CN.d.ts
CHANGED
|
@@ -31,6 +31,57 @@ declare const zhCN: {
|
|
|
31
31
|
description: string;
|
|
32
32
|
};
|
|
33
33
|
};
|
|
34
|
+
Form: {
|
|
35
|
+
required: string;
|
|
36
|
+
optional: string;
|
|
37
|
+
defaultValidateMessages: {
|
|
38
|
+
default: string;
|
|
39
|
+
required: string;
|
|
40
|
+
enum: string;
|
|
41
|
+
whitespace: string;
|
|
42
|
+
date: {
|
|
43
|
+
format: string;
|
|
44
|
+
parse: string;
|
|
45
|
+
invalid: string;
|
|
46
|
+
};
|
|
47
|
+
types: {
|
|
48
|
+
string: string;
|
|
49
|
+
method: string;
|
|
50
|
+
array: string;
|
|
51
|
+
object: string;
|
|
52
|
+
number: string;
|
|
53
|
+
date: string;
|
|
54
|
+
boolean: string;
|
|
55
|
+
integer: string;
|
|
56
|
+
float: string;
|
|
57
|
+
regexp: string;
|
|
58
|
+
email: string;
|
|
59
|
+
url: string;
|
|
60
|
+
hex: string;
|
|
61
|
+
};
|
|
62
|
+
string: {
|
|
63
|
+
len: string;
|
|
64
|
+
min: string;
|
|
65
|
+
max: string;
|
|
66
|
+
range: string;
|
|
67
|
+
};
|
|
68
|
+
number: {
|
|
69
|
+
len: string;
|
|
70
|
+
min: string;
|
|
71
|
+
max: string;
|
|
72
|
+
range: string;
|
|
73
|
+
};
|
|
74
|
+
array: {
|
|
75
|
+
len: string;
|
|
76
|
+
min: string;
|
|
77
|
+
max: string;
|
|
78
|
+
range: string;
|
|
79
|
+
};
|
|
80
|
+
pattern: {
|
|
81
|
+
mismatch: string;
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
};
|
|
34
85
|
ImageUploader: {
|
|
35
86
|
uploading: string;
|
|
36
87
|
};
|
package/es/locales/zh-CN.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { mergeLocale } from '../utils/merge-locale';
|
|
2
2
|
import { base } from './base';
|
|
3
|
+
const typeTemplate = '${label}不是一个有效的${type}';
|
|
3
4
|
const zhCN = mergeLocale(base, {
|
|
4
5
|
common: {
|
|
5
6
|
confirm: '确定',
|
|
@@ -33,6 +34,57 @@ const zhCN = mergeLocale(base, {
|
|
|
33
34
|
description: '找找其他的吧'
|
|
34
35
|
}
|
|
35
36
|
},
|
|
37
|
+
Form: {
|
|
38
|
+
required: '必填',
|
|
39
|
+
optional: '选填',
|
|
40
|
+
defaultValidateMessages: {
|
|
41
|
+
default: '字段验证错误${label}',
|
|
42
|
+
required: '请输入${label}',
|
|
43
|
+
enum: '${label}必须是其中一个[${enum}]',
|
|
44
|
+
whitespace: '${label}不能为空字符',
|
|
45
|
+
date: {
|
|
46
|
+
format: '${label}日期格式无效',
|
|
47
|
+
parse: '${label}不能转换为日期',
|
|
48
|
+
invalid: '${label}是一个无效日期'
|
|
49
|
+
},
|
|
50
|
+
types: {
|
|
51
|
+
string: typeTemplate,
|
|
52
|
+
method: typeTemplate,
|
|
53
|
+
array: typeTemplate,
|
|
54
|
+
object: typeTemplate,
|
|
55
|
+
number: typeTemplate,
|
|
56
|
+
date: typeTemplate,
|
|
57
|
+
boolean: typeTemplate,
|
|
58
|
+
integer: typeTemplate,
|
|
59
|
+
float: typeTemplate,
|
|
60
|
+
regexp: typeTemplate,
|
|
61
|
+
email: typeTemplate,
|
|
62
|
+
url: typeTemplate,
|
|
63
|
+
hex: typeTemplate
|
|
64
|
+
},
|
|
65
|
+
string: {
|
|
66
|
+
len: '${label}须为${len}个字符',
|
|
67
|
+
min: '${label}最少${min}个字符',
|
|
68
|
+
max: '${label}最多${max}个字符',
|
|
69
|
+
range: '${label}须在${min}-${max}字符之间'
|
|
70
|
+
},
|
|
71
|
+
number: {
|
|
72
|
+
len: '${label}必须等于${len}',
|
|
73
|
+
min: '${label}最小值为${min}',
|
|
74
|
+
max: '${label}最大值为${max}',
|
|
75
|
+
range: '${label}须在${min}-${max}之间'
|
|
76
|
+
},
|
|
77
|
+
array: {
|
|
78
|
+
len: '须为${len}个${label}',
|
|
79
|
+
min: '最少${min}个${label}',
|
|
80
|
+
max: '最多${max}个${label}',
|
|
81
|
+
range: '${label}数量须在${min}-${max}之间'
|
|
82
|
+
},
|
|
83
|
+
pattern: {
|
|
84
|
+
mismatch: '${label}与模式不匹配${pattern}'
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
},
|
|
36
88
|
ImageUploader: {
|
|
37
89
|
uploading: '上传中...'
|
|
38
90
|
},
|
package/package.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "antd-mobile",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.3.1",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"@react-spring/web": "^9.4.3",
|
|
6
6
|
"@types/resize-observer-browser": "^0.1.7",
|
|
7
|
-
"@use-gesture/react": "^10.2.
|
|
7
|
+
"@use-gesture/react": "^10.2.7",
|
|
8
8
|
"ahooks": "^3.1.10",
|
|
9
9
|
"antd-mobile-icons": "^0.2.2",
|
|
10
10
|
"antd-mobile-v5-count": "^1.0.1",
|
|
11
11
|
"classnames": "^2.3.1",
|
|
12
|
-
"dayjs": "^1.10.
|
|
12
|
+
"dayjs": "^1.10.8",
|
|
13
13
|
"lodash": "^4.17.21",
|
|
14
|
-
"rc-field-form": "^1.23.
|
|
14
|
+
"rc-field-form": "^1.23.1",
|
|
15
15
|
"rc-tooltip": "^5.1.1",
|
|
16
16
|
"staged-components": "^1.1.2",
|
|
17
17
|
"tslib": "^2.3.1",
|