@tuya-miniapp/smart-ui 2.6.2-beta-4 → 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.
package/dist/dialog/dialog.d.ts
CHANGED
@@ -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;
|
package/dist/dialog/dialog.js
CHANGED
package/dist/dialog/index.js
CHANGED
@@ -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.
|
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);
|
package/lib/dialog/dialog.d.ts
CHANGED
@@ -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;
|
package/lib/dialog/dialog.js
CHANGED
package/lib/dialog/index.js
CHANGED
@@ -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.
|
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);
|