@tuya-miniapp/smart-ui 2.2.1-beta-1 → 2.2.1-beta-2
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/dialog/dialog.d.ts +1 -0
- package/dist/dialog/dialog.js +3 -3
- package/dist/toast/toast.d.ts +1 -0
- package/dist/toast/toast.js +1 -0
- package/lib/dialog/dialog.d.ts +1 -0
- package/lib/dialog/dialog.js +3 -3
- package/lib/toast/toast.d.ts +1 -0
- package/lib/toast/toast.js +1 -0
- package/package.json +1 -1
package/dist/dialog/dialog.d.ts
CHANGED
package/dist/dialog/dialog.js
CHANGED
@@ -11,8 +11,6 @@ const defaultOptions = {
|
|
11
11
|
zIndex: 100,
|
12
12
|
overlay: true,
|
13
13
|
selector: '#smart-dialog',
|
14
|
-
// className: '',
|
15
|
-
// asyncClose: false,
|
16
14
|
beforeClose: null,
|
17
15
|
transition: 'scale',
|
18
16
|
customStyle: '',
|
@@ -25,6 +23,7 @@ const defaultOptions = {
|
|
25
23
|
closeOnClickOverlay: false,
|
26
24
|
confirmButtonOpenType: '',
|
27
25
|
icon: false,
|
26
|
+
ignoreQueue: false,
|
28
27
|
value: null,
|
29
28
|
password: false,
|
30
29
|
placeholder: '',
|
@@ -42,7 +41,8 @@ const Dialog = (options) => {
|
|
42
41
|
getCurrentPage();
|
43
42
|
const selector = options.selector;
|
44
43
|
const dialog = context.selectComponent(options.selector);
|
45
|
-
if (
|
44
|
+
if (!options.ignoreQueue &&
|
45
|
+
queueRef.value.length > 0 &&
|
46
46
|
queueRef.value.find(item => dialog && item && item.id === dialog.id)) {
|
47
47
|
console.warn(`相同选择器的 Dialog 调用过于频繁,${dialog.id} 已忽略重复调用`);
|
48
48
|
return;
|
package/dist/toast/toast.d.ts
CHANGED
package/dist/toast/toast.js
CHANGED
package/lib/dialog/dialog.d.ts
CHANGED
package/lib/dialog/dialog.js
CHANGED
@@ -25,8 +25,6 @@ var defaultOptions = {
|
|
25
25
|
zIndex: 100,
|
26
26
|
overlay: true,
|
27
27
|
selector: '#smart-dialog',
|
28
|
-
// className: '',
|
29
|
-
// asyncClose: false,
|
30
28
|
beforeClose: null,
|
31
29
|
transition: 'scale',
|
32
30
|
customStyle: '',
|
@@ -39,6 +37,7 @@ var defaultOptions = {
|
|
39
37
|
closeOnClickOverlay: false,
|
40
38
|
confirmButtonOpenType: '',
|
41
39
|
icon: false,
|
40
|
+
ignoreQueue: false,
|
42
41
|
value: null,
|
43
42
|
password: false,
|
44
43
|
placeholder: '',
|
@@ -56,7 +55,8 @@ var Dialog = function (options) {
|
|
56
55
|
(0, utils_1.getCurrentPage)();
|
57
56
|
var selector = options.selector;
|
58
57
|
var dialog = context.selectComponent(options.selector);
|
59
|
-
if (
|
58
|
+
if (!options.ignoreQueue &&
|
59
|
+
queueRef.value.length > 0 &&
|
60
60
|
queueRef.value.find(function (item) { return dialog && item && item.id === dialog.id; })) {
|
61
61
|
console.warn("\u76F8\u540C\u9009\u62E9\u5668\u7684 Dialog \u8C03\u7528\u8FC7\u4E8E\u9891\u7E41\uFF0C".concat(dialog.id, " \u5DF2\u5FFD\u7565\u91CD\u590D\u8C03\u7528"));
|
62
62
|
return;
|
package/lib/toast/toast.d.ts
CHANGED
package/lib/toast/toast.js
CHANGED