antd-mobile 2.3.0 → 2.3.4
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/CHANGELOG.en-US.md +21 -0
- package/CHANGELOG.zh-CN.md +21 -0
- package/dist/antd-mobile.css +27 -23
- package/dist/antd-mobile.css.map +1 -1
- package/dist/antd-mobile.js +1121 -2026
- package/dist/antd-mobile.js.map +1 -1
- package/dist/antd-mobile.min.css +2 -2
- package/dist/antd-mobile.min.css.map +1 -1
- package/dist/antd-mobile.min.js +5 -5
- package/es/drawer/PropsType.d.ts +1 -0
- package/es/image-picker/PropsType.d.ts +11 -5
- package/es/image-picker/PropsType.js +0 -1
- package/es/input-item/CustomInput.js +1 -1
- package/es/input-item/style/custom-keyboard.less +12 -7
- package/es/input-item/style/index.css +14 -10
- package/es/style/index.less +4 -1
- package/es/switch/style/index.css +12 -12
- package/es/switch/style/index.less +19 -11
- package/es/textarea-item/index.js +1 -1
- package/es/toast/index.js +16 -4
- package/lib/drawer/PropsType.d.ts +1 -0
- package/lib/image-picker/PropsType.d.ts +11 -5
- package/lib/image-picker/PropsType.js +0 -1
- package/lib/input-item/CustomInput.js +1 -1
- package/lib/input-item/style/custom-keyboard.less +12 -7
- package/lib/input-item/style/index.css +14 -10
- package/lib/style/index.less +4 -1
- package/lib/switch/style/index.css +12 -12
- package/lib/switch/style/index.less +19 -11
- package/lib/textarea-item/index.js +1 -1
- package/lib/toast/index.js +16 -4
- package/package.json +1 -1
package/lib/toast/index.js
CHANGED
|
@@ -34,14 +34,11 @@ var _config = {
|
|
|
34
34
|
mask: true
|
|
35
35
|
};
|
|
36
36
|
var messageInstance = void 0;
|
|
37
|
+
var messageNeedHide = void 0;
|
|
37
38
|
var prefixCls = 'am-toast';
|
|
38
39
|
function getMessageInstance(mask, callback) {
|
|
39
40
|
var _classnames;
|
|
40
41
|
|
|
41
|
-
if (messageInstance) {
|
|
42
|
-
messageInstance.destroy();
|
|
43
|
-
messageInstance = null;
|
|
44
|
-
}
|
|
45
42
|
_rmcNotification2['default'].newInstance({
|
|
46
43
|
prefixCls: prefixCls,
|
|
47
44
|
style: {},
|
|
@@ -64,7 +61,20 @@ function notice(content, type) {
|
|
|
64
61
|
loading: 'loading'
|
|
65
62
|
};
|
|
66
63
|
var iconType = iconTypes[type];
|
|
64
|
+
messageNeedHide = false;
|
|
67
65
|
getMessageInstance(mask, function (notification) {
|
|
66
|
+
if (!notification) {
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
if (messageInstance) {
|
|
70
|
+
messageInstance.destroy();
|
|
71
|
+
messageInstance = null;
|
|
72
|
+
}
|
|
73
|
+
if (messageNeedHide) {
|
|
74
|
+
notification.destroy();
|
|
75
|
+
messageNeedHide = false;
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
68
78
|
messageInstance = notification;
|
|
69
79
|
notification.notice({
|
|
70
80
|
duration: duration,
|
|
@@ -124,6 +134,8 @@ exports['default'] = {
|
|
|
124
134
|
if (messageInstance) {
|
|
125
135
|
messageInstance.destroy();
|
|
126
136
|
messageInstance = null;
|
|
137
|
+
} else {
|
|
138
|
+
messageNeedHide = true;
|
|
127
139
|
}
|
|
128
140
|
},
|
|
129
141
|
config: function config() {
|