@tuya-miniapp/smart-ui 2.6.2 → 2.6.3-beta-0

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.
@@ -19,6 +19,7 @@ interface DialogOptions {
19
19
  ariaLabel?: string;
20
20
  customStyle?: string;
21
21
  transition?: string;
22
+ autoClose?: boolean;
22
23
  beforeClose?: null | ((action: Action, value?: string) => Promise<void | boolean> | void);
23
24
  businessId?: number;
24
25
  sessionFrom?: string;
@@ -15,6 +15,7 @@ const defaultOptions = {
15
15
  beforeClose: null,
16
16
  transition: 'scale',
17
17
  customStyle: '',
18
+ autoClose: true,
18
19
  messageAlign: '',
19
20
  overlayStyle: '',
20
21
  confirmButtonText: '确认',
@@ -41,6 +41,10 @@ SmartComponent({
41
41
  type: Number,
42
42
  value: 2000,
43
43
  },
44
+ autoClose: {
45
+ type: Boolean,
46
+ value: false,
47
+ },
44
48
  confirmButtonText: {
45
49
  type: String,
46
50
  value: 'Confirm',
@@ -125,7 +129,9 @@ SmartComponent({
125
129
  this.setData({ inputValue: (_b = (_a = evt === null || evt === void 0 ? void 0 : evt.detail) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : '' });
126
130
  },
127
131
  close(action) {
128
- this.setData({ show: false });
132
+ if (this.data.autoClose) {
133
+ this.setData({ show: false });
134
+ }
129
135
  this.setData({ actionType: action });
130
136
  wx.nextTick(() => {
131
137
  this.$emit('close', action);
@@ -19,6 +19,7 @@ interface DialogOptions {
19
19
  ariaLabel?: string;
20
20
  customStyle?: string;
21
21
  transition?: string;
22
+ autoClose?: boolean;
22
23
  beforeClose?: null | ((action: Action, value?: string) => Promise<void | boolean> | void);
23
24
  businessId?: number;
24
25
  sessionFrom?: string;
@@ -32,6 +32,7 @@ var defaultOptions = {
32
32
  beforeClose: null,
33
33
  transition: 'scale',
34
34
  customStyle: '',
35
+ autoClose: true,
35
36
  messageAlign: '',
36
37
  overlayStyle: '',
37
38
  confirmButtonText: '确认',
@@ -46,6 +46,10 @@ var dialog_1 = require("./dialog");
46
46
  type: Number,
47
47
  value: 2000,
48
48
  },
49
+ autoClose: {
50
+ type: Boolean,
51
+ value: false,
52
+ },
49
53
  confirmButtonText: {
50
54
  type: String,
51
55
  value: 'Confirm',
@@ -131,7 +135,9 @@ var dialog_1 = require("./dialog");
131
135
  },
132
136
  close: function (action) {
133
137
  var _this = this;
134
- this.setData({ show: false });
138
+ if (this.data.autoClose) {
139
+ this.setData({ show: false });
140
+ }
135
141
  this.setData({ actionType: action });
136
142
  wx.nextTick(function () {
137
143
  _this.$emit('close', action);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tuya-miniapp/smart-ui",
3
- "version": "2.6.2",
3
+ "version": "2.6.3-beta-0",
4
4
  "author": "MiniApp Team",
5
5
  "license": "MIT",
6
6
  "miniprogram": "lib",