@tuya-miniapp/smart-ui 2.5.1-beta-1 → 2.5.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/action-sheet/index.js +1 -3
- package/dist/action-sheet/index.wxml +1 -1
- package/dist/bottom-sheet/index.css +1 -1
- package/dist/bottom-sheet/index.js +4 -4
- package/dist/bottom-sheet/index.wxml +1 -7
- package/dist/bottom-sheet/index.wxss +1 -1
- package/dist/button/index.js +7 -2
- package/dist/calendar/calendar.wxml +1 -1
- package/dist/calendar/index.wxs +3 -3
- package/dist/calendar-header/index.js +2 -2
- package/dist/calendar-month/index.wxs +2 -2
- package/dist/cascader/index.js +1 -1
- package/dist/cell/index.js +4 -4
- package/dist/checkbox/index.js +1 -1
- package/dist/circle/index.rjs +1 -2
- package/dist/common/appLog.js +1 -1
- package/dist/custom-keyboard/index.wxml +7 -3
- package/dist/dialog/index.css +1 -1
- package/dist/dialog/index.js +1 -1
- package/dist/dialog/index.wxss +1 -1
- package/dist/dropdown-item/index.js +3 -3
- package/dist/dropdown-menu/index.js +4 -4
- package/dist/field/index.js +1 -1
- package/dist/image/index.js +2 -2
- package/dist/image/index.wxs +1 -1
- package/dist/loading/index.wxs +2 -2
- package/dist/mixins/transition.js +6 -4
- package/dist/nav-bar/index.js +1 -1
- package/dist/notice-bar/index.js +2 -2
- package/dist/picker-column/index.js +1 -1
- package/dist/picker-column/index.wxs +4 -4
- package/dist/popover/index.js +0 -5
- package/dist/popover/index.wxml +2 -10
- package/dist/popup/index.css +1 -1
- package/dist/popup/index.js +1 -1
- package/dist/popup/index.wxs +1 -1
- package/dist/popup/index.wxss +1 -1
- package/dist/radio/index.js +2 -2
- package/dist/rate/index.js +2 -2
- package/dist/search/index.js +2 -2
- package/dist/skeleton/index.css +1 -1
- package/dist/skeleton/index.wxss +1 -1
- package/dist/stepper/index.js +3 -3
- package/dist/steps/index.js +1 -1
- package/dist/switch/index.css +1 -1
- package/dist/switch/index.wxss +1 -1
- package/dist/tag/index.js +1 -1
- package/dist/toast/icons.js +3 -3
- package/dist/toast/index.css +1 -1
- package/dist/toast/index.wxml +1 -1
- package/dist/toast/index.wxss +1 -1
- package/dist/toast/toast.js +8 -4
- package/dist/tree-select/index.js +2 -2
- package/lib/action-sheet/index.js +2 -4
- package/lib/action-sheet/index.wxml +1 -1
- package/lib/bottom-sheet/index.css +1 -1
- package/lib/bottom-sheet/index.js +5 -5
- package/lib/bottom-sheet/index.wxml +1 -7
- package/lib/bottom-sheet/index.wxss +1 -1
- package/lib/button/index.js +7 -2
- package/lib/calendar/calendar.wxml +1 -1
- package/lib/calendar/index.wxs +3 -3
- package/lib/calendar-header/index.js +7 -4
- package/lib/calendar-month/index.wxs +2 -2
- package/lib/cascader/index.js +5 -2
- package/lib/cell/index.js +12 -9
- package/lib/checkbox/index.js +5 -2
- package/lib/circle/index.rjs +1 -2
- package/lib/common/appLog.js +1 -1
- package/lib/custom-keyboard/index.wxml +7 -3
- package/lib/dialog/index.css +1 -1
- package/lib/dialog/index.js +2 -2
- package/lib/dialog/index.wxss +1 -1
- package/lib/dropdown-item/index.js +4 -4
- package/lib/dropdown-menu/index.js +4 -4
- package/lib/field/index.js +5 -2
- package/lib/image/index.js +5 -2
- package/lib/image/index.wxs +1 -1
- package/lib/loading/index.wxs +2 -2
- package/lib/mixins/transition.js +10 -11
- package/lib/nav-bar/index.js +5 -2
- package/lib/notice-bar/index.js +7 -4
- package/lib/picker-column/index.js +2 -5
- package/lib/picker-column/index.wxs +4 -4
- package/lib/popover/index.js +0 -5
- package/lib/popover/index.wxml +2 -10
- package/lib/popup/index.css +1 -1
- package/lib/popup/index.js +6 -3
- package/lib/popup/index.wxs +1 -1
- package/lib/popup/index.wxss +1 -1
- package/lib/radio/index.js +5 -2
- package/lib/rate/index.js +7 -4
- package/lib/search/index.js +7 -4
- package/lib/skeleton/index.css +1 -1
- package/lib/skeleton/index.wxss +1 -1
- package/lib/stepper/index.js +6 -6
- package/lib/steps/index.js +5 -2
- package/lib/switch/index.css +1 -1
- package/lib/switch/index.wxss +1 -1
- package/lib/tag/index.js +5 -2
- package/lib/toast/icons.js +9 -6
- package/lib/toast/index.css +1 -1
- package/lib/toast/index.wxml +1 -1
- package/lib/toast/index.wxss +1 -1
- package/lib/toast/toast.js +8 -4
- package/lib/tree-select/index.js +5 -2
- package/package.json +1 -1
- package/dist/bottom-sheet/index.wxs +0 -12
- package/dist/common/ty.d.ts +0 -7
- package/dist/common/ty.js +0 -33
- package/lib/bottom-sheet/index.wxs +0 -12
- package/lib/common/ty.d.ts +0 -7
- package/lib/common/ty.js +0 -35
package/lib/toast/toast.js
CHANGED
@@ -18,7 +18,6 @@ exports.contextRef = void 0;
|
|
18
18
|
var appLog_1 = __importDefault(require("../common/appLog"));
|
19
19
|
var utils_1 = require("../common/utils");
|
20
20
|
var validator_1 = require("../common/validator");
|
21
|
-
var ty_1 = __importDefault(require("../common/ty"));
|
22
21
|
var defaultOptions = {
|
23
22
|
type: 'text',
|
24
23
|
mask: false,
|
@@ -49,6 +48,7 @@ exports.contextRef = {
|
|
49
48
|
value: {},
|
50
49
|
};
|
51
50
|
function Toast(toastOptions) {
|
51
|
+
var _a, _b;
|
52
52
|
var options = __assign(__assign({}, currentOptions), parseOptions(toastOptions));
|
53
53
|
appLog_1.default.info('start open Toast');
|
54
54
|
var context = (typeof options.context === 'function' ? options.context() : options.context) ||
|
@@ -65,9 +65,11 @@ function Toast(toastOptions) {
|
|
65
65
|
delete options.context;
|
66
66
|
delete options.selector;
|
67
67
|
toast.clear = function () {
|
68
|
+
var _a;
|
68
69
|
toast.setData({ show: false });
|
69
70
|
if (options.nativeDisabled) {
|
70
|
-
|
71
|
+
// @ts-ignore
|
72
|
+
(_a = ty === null || ty === void 0 ? void 0 : ty.nativeDisabled) === null || _a === void 0 ? void 0 : _a.call(ty, false);
|
71
73
|
}
|
72
74
|
preDisRef.value[options.selector] = false;
|
73
75
|
if (options.onClose) {
|
@@ -77,10 +79,12 @@ function Toast(toastOptions) {
|
|
77
79
|
queueRef.value.push(toast);
|
78
80
|
toast.setData(options);
|
79
81
|
if (options.nativeDisabled) {
|
80
|
-
|
82
|
+
// @ts-ignore
|
83
|
+
(_a = ty === null || ty === void 0 ? void 0 : ty.nativeDisabled) === null || _a === void 0 ? void 0 : _a.call(ty, true);
|
81
84
|
}
|
82
85
|
if (preDisRef.value[options.selector] && !options.nativeDisabled) {
|
83
|
-
|
86
|
+
// @ts-ignore
|
87
|
+
(_b = ty === null || ty === void 0 ? void 0 : ty.nativeDisabled) === null || _b === void 0 ? void 0 : _b.call(ty, false);
|
84
88
|
}
|
85
89
|
preDisRef.value[options.selector] = options.nativeDisabled || false;
|
86
90
|
clearTimeout(toast.timer);
|
package/lib/tree-select/index.js
CHANGED
@@ -1,6 +1,9 @@
|
|
1
1
|
"use strict";
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
+
};
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
var
|
6
|
+
var Check_1 = __importDefault(require("@tuya-miniapp/icons/dist/svg/Check"));
|
4
7
|
var component_1 = require("../common/component");
|
5
8
|
(0, component_1.SmartComponent)({
|
6
9
|
classes: [
|
@@ -32,7 +35,7 @@ var component_1 = require("../common/component");
|
|
32
35
|
},
|
33
36
|
selectedIcon: {
|
34
37
|
type: String,
|
35
|
-
value:
|
38
|
+
value: Check_1.default,
|
36
39
|
},
|
37
40
|
},
|
38
41
|
data: {
|
package/package.json
CHANGED
@@ -1,12 +0,0 @@
|
|
1
|
-
function getHeight(contentHeight) {
|
2
|
-
var height = contentHeight
|
3
|
-
? typeof contentHeight === 'number'
|
4
|
-
? contentHeight + 'rpx'
|
5
|
-
: contentHeight
|
6
|
-
: 'undefined';
|
7
|
-
return 'height: ' + height + ';';
|
8
|
-
}
|
9
|
-
|
10
|
-
module.exports = {
|
11
|
-
getHeight: getHeight,
|
12
|
-
};
|
package/dist/common/ty.d.ts
DELETED
package/dist/common/ty.js
DELETED
@@ -1,33 +0,0 @@
|
|
1
|
-
const tyApi = {
|
2
|
-
vibrateShort: (v) => {
|
3
|
-
// @ts-ignore
|
4
|
-
if (typeof ty !== 'undefined') {
|
5
|
-
// @ts-ignore
|
6
|
-
ty.vibrateShort(v);
|
7
|
-
}
|
8
|
-
else if (typeof wx !== 'undefined') {
|
9
|
-
wx.vibrateShort(v);
|
10
|
-
}
|
11
|
-
},
|
12
|
-
nativeDisabled: (v) => {
|
13
|
-
var _a;
|
14
|
-
// @ts-ignore
|
15
|
-
if (typeof ty !== 'undefined') {
|
16
|
-
// @ts-ignore
|
17
|
-
(_a = ty.nativeDisabled) === null || _a === void 0 ? void 0 : _a.call(ty, v);
|
18
|
-
}
|
19
|
-
},
|
20
|
-
getThemeInfo: () => {
|
21
|
-
var _a;
|
22
|
-
// @ts-ignore
|
23
|
-
if (typeof ty !== 'undefined') {
|
24
|
-
// @ts-ignore
|
25
|
-
return (_a = ty.getThemeInfo) === null || _a === void 0 ? void 0 : _a.call(ty);
|
26
|
-
}
|
27
|
-
},
|
28
|
-
isWX: () => {
|
29
|
-
// @ts-ignore
|
30
|
-
return typeof ty === 'undefined' && !!wx;
|
31
|
-
},
|
32
|
-
};
|
33
|
-
export default tyApi;
|
@@ -1,12 +0,0 @@
|
|
1
|
-
function getHeight(contentHeight) {
|
2
|
-
var height = contentHeight
|
3
|
-
? typeof contentHeight === 'number'
|
4
|
-
? contentHeight + 'rpx'
|
5
|
-
: contentHeight
|
6
|
-
: 'undefined';
|
7
|
-
return 'height: ' + height + ';';
|
8
|
-
}
|
9
|
-
|
10
|
-
module.exports = {
|
11
|
-
getHeight: getHeight,
|
12
|
-
};
|
package/lib/common/ty.d.ts
DELETED
package/lib/common/ty.js
DELETED
@@ -1,35 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
var tyApi = {
|
4
|
-
vibrateShort: function (v) {
|
5
|
-
// @ts-ignore
|
6
|
-
if (typeof ty !== 'undefined') {
|
7
|
-
// @ts-ignore
|
8
|
-
ty.vibrateShort(v);
|
9
|
-
}
|
10
|
-
else if (typeof wx !== 'undefined') {
|
11
|
-
wx.vibrateShort(v);
|
12
|
-
}
|
13
|
-
},
|
14
|
-
nativeDisabled: function (v) {
|
15
|
-
var _a;
|
16
|
-
// @ts-ignore
|
17
|
-
if (typeof ty !== 'undefined') {
|
18
|
-
// @ts-ignore
|
19
|
-
(_a = ty.nativeDisabled) === null || _a === void 0 ? void 0 : _a.call(ty, v);
|
20
|
-
}
|
21
|
-
},
|
22
|
-
getThemeInfo: function () {
|
23
|
-
var _a;
|
24
|
-
// @ts-ignore
|
25
|
-
if (typeof ty !== 'undefined') {
|
26
|
-
// @ts-ignore
|
27
|
-
return (_a = ty.getThemeInfo) === null || _a === void 0 ? void 0 : _a.call(ty);
|
28
|
-
}
|
29
|
-
},
|
30
|
-
isWX: function () {
|
31
|
-
// @ts-ignore
|
32
|
-
return typeof ty === 'undefined' && !!wx;
|
33
|
-
},
|
34
|
-
};
|
35
|
-
exports.default = tyApi;
|