@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.
@@ -35,6 +35,7 @@ interface DialogOptions {
35
35
  closeOnClickOverlay?: boolean;
36
36
  confirmButtonOpenType?: string;
37
37
  value?: null | string;
38
+ ignoreQueue?: boolean;
38
39
  password?: boolean;
39
40
  placeholder?: string;
40
41
  maxlength?: number;
@@ -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 (queueRef.value.length > 0 &&
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;
@@ -12,6 +12,7 @@ interface ToastOptions {
12
12
  duration?: number;
13
13
  selector?: string;
14
14
  forbidClick?: boolean;
15
+ ignoreQueue?: boolean;
15
16
  loadingType?: string;
16
17
  message?: ToastMessage;
17
18
  onClose?: () => void;
@@ -7,6 +7,7 @@ const defaultOptions = {
7
7
  show: true,
8
8
  zIndex: 1000,
9
9
  duration: 2000,
10
+ ignoreQueue: false,
10
11
  position: 'middle',
11
12
  forbidClick: false,
12
13
  loadingType: 'circular',
@@ -35,6 +35,7 @@ interface DialogOptions {
35
35
  closeOnClickOverlay?: boolean;
36
36
  confirmButtonOpenType?: string;
37
37
  value?: null | string;
38
+ ignoreQueue?: boolean;
38
39
  password?: boolean;
39
40
  placeholder?: string;
40
41
  maxlength?: number;
@@ -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 (queueRef.value.length > 0 &&
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;
@@ -12,6 +12,7 @@ interface ToastOptions {
12
12
  duration?: number;
13
13
  selector?: string;
14
14
  forbidClick?: boolean;
15
+ ignoreQueue?: boolean;
15
16
  loadingType?: string;
16
17
  message?: ToastMessage;
17
18
  onClose?: () => void;
@@ -21,6 +21,7 @@ var defaultOptions = {
21
21
  show: true,
22
22
  zIndex: 1000,
23
23
  duration: 2000,
24
+ ignoreQueue: false,
24
25
  position: 'middle',
25
26
  forbidClick: false,
26
27
  loadingType: 'circular',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tuya-miniapp/smart-ui",
3
- "version": "2.2.1-beta-1",
3
+ "version": "2.2.1-beta-2",
4
4
  "author": "MiniApp Team",
5
5
  "license": "MIT",
6
6
  "miniprogram": "lib",