@tuya-miniapp/smart-ui 2.4.1-beta-5 → 2.5.1-beta-1
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 +3 -1
- package/dist/action-sheet/index.wxml +1 -1
- package/dist/bottom-sheet/index.css +1 -1
- package/dist/bottom-sheet/index.js +3 -4
- package/dist/bottom-sheet/index.wxml +5 -1
- package/dist/bottom-sheet/index.wxs +1 -1
- package/dist/bottom-sheet/index.wxss +1 -1
- package/dist/button/index.js +2 -7
- 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/common/appLog.js +1 -1
- package/dist/common/ty.d.ts +7 -0
- package/dist/common/ty.js +33 -0
- package/dist/custom-keyboard/index.wxml +3 -7
- package/dist/dialog/index.js +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 +4 -6
- 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/popup/index.js +1 -1
- package/dist/popup/index.wxs +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/stepper/index.js +3 -3
- package/dist/steps/index.js +1 -1
- package/dist/tag/index.js +1 -1
- package/dist/toast/icons.js +3 -3
- package/dist/toast/toast.js +4 -8
- package/dist/tree-select/index.js +2 -2
- package/lib/action-sheet/index.js +4 -2
- package/lib/action-sheet/index.wxml +1 -1
- package/lib/bottom-sheet/index.css +1 -1
- package/lib/bottom-sheet/index.js +4 -5
- package/lib/bottom-sheet/index.wxml +5 -1
- package/lib/bottom-sheet/index.wxs +1 -1
- package/lib/bottom-sheet/index.wxss +1 -1
- package/lib/button/index.js +2 -7
- package/lib/calendar/index.wxs +3 -3
- package/lib/calendar-header/index.js +4 -7
- package/lib/calendar-month/index.wxs +2 -2
- package/lib/cascader/index.js +2 -5
- package/lib/cell/index.js +9 -12
- package/lib/checkbox/index.js +2 -5
- package/lib/common/appLog.js +1 -1
- package/lib/common/ty.d.ts +7 -0
- package/lib/common/ty.js +35 -0
- package/lib/custom-keyboard/index.wxml +3 -7
- package/lib/dialog/index.js +2 -2
- package/lib/dropdown-item/index.js +4 -4
- package/lib/dropdown-menu/index.js +4 -4
- package/lib/field/index.js +2 -5
- package/lib/image/index.js +2 -5
- package/lib/image/index.wxs +1 -1
- package/lib/loading/index.wxs +2 -2
- package/lib/mixins/transition.js +11 -10
- package/lib/nav-bar/index.js +2 -5
- package/lib/notice-bar/index.js +4 -7
- package/lib/picker-column/index.js +5 -2
- package/lib/picker-column/index.wxs +4 -4
- package/lib/popup/index.js +3 -6
- package/lib/popup/index.wxs +1 -1
- package/lib/radio/index.js +2 -5
- package/lib/rate/index.js +4 -7
- package/lib/search/index.js +4 -7
- package/lib/stepper/index.js +6 -6
- package/lib/steps/index.js +2 -5
- package/lib/tag/index.js +2 -5
- package/lib/toast/icons.js +6 -9
- package/lib/toast/toast.js +4 -8
- package/lib/tree-select/index.js +2 -5
- package/package.json +1 -1
@@ -3,8 +3,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
4
|
};
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
-
var
|
6
|
+
var icons_1 = require("@tuya-miniapp/icons");
|
7
7
|
var component_1 = require("../common/component");
|
8
|
+
var ty_1 = __importDefault(require("../common/ty"));
|
8
9
|
var button_1 = require("../mixins/button");
|
9
10
|
(0, component_1.SmartComponent)({
|
10
11
|
classes: ['list-class'],
|
@@ -55,7 +56,8 @@ var button_1 = require("../mixins/button");
|
|
55
56
|
},
|
56
57
|
},
|
57
58
|
data: {
|
58
|
-
checkMarkIcon:
|
59
|
+
checkMarkIcon: icons_1.Check,
|
60
|
+
isWX: ty_1.default.isWX(),
|
59
61
|
},
|
60
62
|
methods: {
|
61
63
|
onSelect: function (event) {
|
@@ -26,7 +26,7 @@
|
|
26
26
|
<view wx:if="{{ description }}" class="smart-action-sheet__description smart-hairline--bottom">
|
27
27
|
{{ description }}
|
28
28
|
</view>
|
29
|
-
<scroll-view wx:if="{{ actions && actions.length }}" class="smart-action-sheet__list list-class">
|
29
|
+
<scroll-view scroll-y="{{isWX}}" wx:if="{{ actions && actions.length }}" class="smart-action-sheet__list list-class">
|
30
30
|
<!-- button外包一层view,防止actions动态变化,导致渲染时button被打散 -->
|
31
31
|
<button
|
32
32
|
wx:for="{{ actions }}"
|
@@ -1 +1 @@
|
|
1
|
-
@import '../common/index.css';.smart-bottom-sheet{color:var(--bottom-sheet-font-color,var(--app-B4-N1,#000));display:flex;flex-direction:column;max-height:var(--bottom-sheet-max-height,50%);min-height:var(--bottom-sheet-min-height,auto);padding-bottom:env(safe-area-inset-bottom);width:var(--bottom-sheet-width,100%)}.smart-bottom-sheet__header{color:var(--bottom-sheet-header-color,var(--app-B4-N1,#000));font-size:var(--bottom-sheet-header-font-size,17px);font-weight:var(--bottom-sheet-header-font-weight,600);line-height:var(--bottom-sheet-header-height,56px);padding:var(--bottom-sheet-header-padding,0 16px);text-align:center}.smart-bottom-sheet__content{overflow-y:auto;padding:var(--bottom-sheet-padding,0 16px);position:relative}.smart-bottom-sheet__icon{margin:var(--bottom-sheet-icon-margin,16px 16px 0 0);position:absolute;right:0;top:0}
|
1
|
+
@import '../common/index.css';.smart-bottom-sheet{color:var(--bottom-sheet-font-color,var(--app-B4-N1,#000));display:flex;flex-direction:column;max-height:var(--bottom-sheet-max-height,50%);min-height:var(--bottom-sheet-min-height,auto);padding-bottom:env(safe-area-inset-bottom);width:var(--bottom-sheet-width,100%)}.smart-bottom-sheet__header{color:var(--bottom-sheet-header-color,var(--app-B4-N1,#000));font-size:var(--bottom-sheet-header-font-size,17px);font-weight:var(--bottom-sheet-header-font-weight,600);line-height:var(--bottom-sheet-header-height,56px);padding:var(--bottom-sheet-header-padding,0 16px);text-align:center}.smart-bottom-sheet__content{box-sizing:border-box;overflow-y:auto;padding:var(--bottom-sheet-padding,0 16px);position:relative}.smart-bottom-sheet__icon{margin:var(--bottom-sheet-icon-margin,16px 16px 0 0);position:absolute;right:0;top:0}
|
@@ -3,8 +3,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
4
|
};
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
-
var
|
6
|
+
var icons_1 = require("@tuya-miniapp/icons");
|
7
7
|
var component_1 = require("../common/component");
|
8
|
+
var ty_1 = __importDefault(require("../common/ty"));
|
8
9
|
(0, component_1.SmartComponent)({
|
9
10
|
props: {
|
10
11
|
show: Boolean,
|
@@ -38,13 +39,11 @@ var component_1 = require("../common/component");
|
|
38
39
|
},
|
39
40
|
},
|
40
41
|
data: {
|
41
|
-
xmarkIcon:
|
42
|
+
xmarkIcon: icons_1.Xmark,
|
42
43
|
xmarkIconColor: 'rgba(0, 0, 0, 0.5)',
|
43
44
|
},
|
44
45
|
mounted: function () {
|
45
|
-
var
|
46
|
-
// @ts-ignore
|
47
|
-
var themeInfo = (_a = ty === null || ty === void 0 ? void 0 : ty.getThemeInfo()) !== null && _a !== void 0 ? _a : {};
|
46
|
+
var themeInfo = ty_1.default.getThemeInfo() || {};
|
48
47
|
var xmarkIconColor = this.data.iconColor || themeInfo['--app-B4-N3'] || 'rgba(0, 0, 0, 0.5)';
|
49
48
|
this.setData({ xmarkIconColor: xmarkIconColor });
|
50
49
|
},
|
@@ -25,7 +25,11 @@
|
|
25
25
|
{{ title }}
|
26
26
|
<smart-icon bind:click="onClose" name="{{ xmarkIcon }}" class="smart-bottom-sheet__icon" size="{{ iconSize }}" color="{{ xmarkIconColor }}" />
|
27
27
|
</view>
|
28
|
-
|
28
|
+
|
29
|
+
<view wx:if="{{ contentHeight !== null }}" class="smart-bottom-sheet__content" style="{{computed.getHeight(contentHeight)}}">
|
30
|
+
<slot />
|
31
|
+
</view>
|
32
|
+
<scroll-view wx:else class="smart-bottom-sheet__content">
|
29
33
|
<slot />
|
30
34
|
</scroll-view>
|
31
35
|
</smart-popup>
|
@@ -1 +1 @@
|
|
1
|
-
@import '../common/index.wxss';.smart-bottom-sheet{color:var(--bottom-sheet-font-color,var(--app-B4-N1,#000));display:flex;flex-direction:column;max-height:var(--bottom-sheet-max-height,50%);min-height:var(--bottom-sheet-min-height,auto);padding-bottom:env(safe-area-inset-bottom);width:var(--bottom-sheet-width,100%)}.smart-bottom-sheet__header{color:var(--bottom-sheet-header-color,var(--app-B4-N1,#000));font-size:var(--bottom-sheet-header-font-size,17px);font-weight:var(--bottom-sheet-header-font-weight,600);line-height:var(--bottom-sheet-header-height,56px);padding:var(--bottom-sheet-header-padding,0 16px);text-align:center}.smart-bottom-sheet__content{overflow-y:auto;padding:var(--bottom-sheet-padding,0 16px);position:relative}.smart-bottom-sheet__icon{margin:var(--bottom-sheet-icon-margin,16px 16px 0 0);position:absolute;right:0;top:0}
|
1
|
+
@import '../common/index.wxss';.smart-bottom-sheet{color:var(--bottom-sheet-font-color,var(--app-B4-N1,#000));display:flex;flex-direction:column;max-height:var(--bottom-sheet-max-height,50%);min-height:var(--bottom-sheet-min-height,auto);padding-bottom:env(safe-area-inset-bottom);width:var(--bottom-sheet-width,100%)}.smart-bottom-sheet__header{color:var(--bottom-sheet-header-color,var(--app-B4-N1,#000));font-size:var(--bottom-sheet-header-font-size,17px);font-weight:var(--bottom-sheet-header-font-weight,600);line-height:var(--bottom-sheet-header-height,56px);padding:var(--bottom-sheet-header-padding,0 16px);text-align:center}.smart-bottom-sheet__content{box-sizing:border-box;overflow-y:auto;padding:var(--bottom-sheet-padding,0 16px);position:relative}.smart-bottom-sheet__icon{margin:var(--bottom-sheet-icon-margin,16px 16px 0 0);position:absolute;right:0;top:0}
|
package/lib/button/index.js
CHANGED
@@ -2,13 +2,8 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
var component_1 = require("../common/component");
|
4
4
|
var button_1 = require("../mixins/button");
|
5
|
-
// import { canIUseFormFieldButton } from '../common/version';
|
6
|
-
var mixins = [button_1.button];
|
7
|
-
// if (canIUseFormFieldButton()) {
|
8
|
-
// mixins.push('wx://form-field-button');
|
9
|
-
// }
|
10
5
|
(0, component_1.SmartComponent)({
|
11
|
-
mixins:
|
6
|
+
mixins: [button_1.button],
|
12
7
|
classes: ['hover-class', 'loading-class'],
|
13
8
|
data: {
|
14
9
|
baseStyle: '',
|
@@ -55,7 +50,7 @@ var mixins = [button_1.button];
|
|
55
50
|
var _this = this;
|
56
51
|
this.$emit('click', event);
|
57
52
|
var _a = this.data, canIUseGetUserProfile = _a.canIUseGetUserProfile, openType = _a.openType, getUserProfileDesc = _a.getUserProfileDesc, lang = _a.lang;
|
58
|
-
if (openType === 'getUserInfo' && canIUseGetUserProfile) {
|
53
|
+
if (openType === 'getUserInfo' && canIUseGetUserProfile && typeof wx !== 'undefined') {
|
59
54
|
wx.getUserProfile({
|
60
55
|
desc: getUserProfileDesc || ' ',
|
61
56
|
lang: lang || 'en',
|
package/lib/calendar/index.wxs
CHANGED
@@ -38,15 +38,15 @@ function getVisible(visibleIndex, curIndex) {
|
|
38
38
|
function formatMonthTitle(date, formatter = 'YYYY-MM') {
|
39
39
|
if (!date) return '';
|
40
40
|
date = getDate(date);
|
41
|
-
|
42
|
-
|
41
|
+
var year = date.getFullYear();
|
42
|
+
var month = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1 + '';
|
43
43
|
return formatter.replace('YYYY', year + '').replace('MM', month);
|
44
44
|
}
|
45
45
|
|
46
46
|
function formatYearTitle(date, offset, formatter = 'YYYY') {
|
47
47
|
if (!date) return '';
|
48
48
|
date = getDate(date);
|
49
|
-
|
49
|
+
var year = date.getFullYear();
|
50
50
|
return formatter.replace('YYYY', year + '');
|
51
51
|
}
|
52
52
|
|
@@ -8,13 +8,10 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
8
8
|
}
|
9
9
|
return to.concat(ar || Array.prototype.slice.call(from));
|
10
10
|
};
|
11
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
12
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
13
|
-
};
|
14
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
15
12
|
var component_1 = require("../common/component");
|
16
|
-
var
|
17
|
-
var
|
13
|
+
var icons_1 = require("@tuya-miniapp/icons");
|
14
|
+
var icons_2 = require("@tuya-miniapp/icons");
|
18
15
|
(0, component_1.SmartComponent)({
|
19
16
|
props: {
|
20
17
|
title: {
|
@@ -41,8 +38,8 @@ var Right_1 = __importDefault(require("@tuya-miniapp/icons/dist/svg/Right"));
|
|
41
38
|
},
|
42
39
|
data: {
|
43
40
|
weekdays: [],
|
44
|
-
LeftIcon:
|
45
|
-
RightIcon:
|
41
|
+
LeftIcon: icons_1.Left,
|
42
|
+
RightIcon: icons_2.Right,
|
46
43
|
},
|
47
44
|
created: function () {
|
48
45
|
this.initWeekDay();
|
@@ -48,8 +48,8 @@ function getDayStyle(type, index, date, rowHeight, color, firstDayOfWeek) {
|
|
48
48
|
|
49
49
|
function formatMonthTitle(date, formatter = 'YYYY-MM') {
|
50
50
|
date = getDate(date);
|
51
|
-
|
52
|
-
|
51
|
+
var year = date.getFullYear();
|
52
|
+
var month = date.getMonth() + 1 < 10 ? "0" + (date.getMonth() + 1) : date.getMonth() + 1 + "";
|
53
53
|
return formatter.replace('YYYY', year + '').replace('MM', month);
|
54
54
|
}
|
55
55
|
|
package/lib/cascader/index.js
CHANGED
@@ -8,12 +8,9 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
8
8
|
}
|
9
9
|
return to.concat(ar || Array.prototype.slice.call(from));
|
10
10
|
};
|
11
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
12
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
13
|
-
};
|
14
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
15
12
|
var component_1 = require("../common/component");
|
16
|
-
var
|
13
|
+
var icons_1 = require("@tuya-miniapp/icons");
|
17
14
|
(0, component_1.SmartComponent)({
|
18
15
|
props: {
|
19
16
|
title: String,
|
@@ -54,7 +51,7 @@ var Xmark_1 = __importDefault(require("@tuya-miniapp/icons/dist/svg/Xmark"));
|
|
54
51
|
},
|
55
52
|
closeIcon: {
|
56
53
|
type: String,
|
57
|
-
value:
|
54
|
+
value: icons_1.Xmark,
|
58
55
|
},
|
59
56
|
useTitleSlot: Boolean,
|
60
57
|
},
|
package/lib/cell/index.js
CHANGED
@@ -1,12 +1,9 @@
|
|
1
1
|
"use strict";
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
-
};
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
-
var
|
7
|
-
var
|
8
|
-
var
|
9
|
-
var
|
3
|
+
var icons_1 = require("@tuya-miniapp/icons");
|
4
|
+
var icons_2 = require("@tuya-miniapp/icons");
|
5
|
+
var icons_3 = require("@tuya-miniapp/icons");
|
6
|
+
var icons_4 = require("@tuya-miniapp/icons");
|
10
7
|
var link_1 = require("../mixins/link");
|
11
8
|
var component_1 = require("../common/component");
|
12
9
|
(0, component_1.SmartComponent)({
|
@@ -32,12 +29,12 @@ var component_1 = require("../common/component");
|
|
32
29
|
},
|
33
30
|
data: {
|
34
31
|
arrowIcons: {
|
35
|
-
up:
|
36
|
-
down:
|
37
|
-
left:
|
38
|
-
right:
|
32
|
+
up: icons_1.Up,
|
33
|
+
down: icons_2.Down,
|
34
|
+
left: icons_3.Left,
|
35
|
+
right: icons_4.Right,
|
39
36
|
},
|
40
|
-
arrowIcon:
|
37
|
+
arrowIcon: icons_4.Right,
|
41
38
|
},
|
42
39
|
methods: {
|
43
40
|
onClick: function (event) {
|
package/lib/checkbox/index.js
CHANGED
@@ -1,9 +1,6 @@
|
|
1
1
|
"use strict";
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
-
};
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
-
var
|
3
|
+
var icons_1 = require("@tuya-miniapp/icons");
|
7
4
|
var relation_1 = require("../common/relation");
|
8
5
|
var component_1 = require("../common/component");
|
9
6
|
function emit(target, value) {
|
@@ -36,7 +33,7 @@ function emit(target, value) {
|
|
36
33
|
data: {
|
37
34
|
parentDisabled: false,
|
38
35
|
direction: 'vertical',
|
39
|
-
icon:
|
36
|
+
icon: icons_1.Check,
|
40
37
|
},
|
41
38
|
methods: {
|
42
39
|
emitChange: function (value) {
|
package/lib/common/appLog.js
CHANGED
@@ -15,7 +15,7 @@ var init = function (tag) {
|
|
15
15
|
return Log;
|
16
16
|
}
|
17
17
|
// @ts-ignore
|
18
|
-
if (typeof ty !== 'undefined' && !ty.getLogManager) {
|
18
|
+
if (typeof ty === 'undefined' || (typeof ty !== 'undefined' && !ty.getLogManager)) {
|
19
19
|
// console.warn('不支持ty.getLogManager');
|
20
20
|
return null;
|
21
21
|
}
|
package/lib/common/ty.js
ADDED
@@ -0,0 +1,35 @@
|
|
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;
|
@@ -1,8 +1,6 @@
|
|
1
1
|
<view class="{{prefix}} {{prefix}}-container" style="{{inputContainerStyle}}">
|
2
2
|
<view class="{{prefix}}-textView" bind:tap="handlePassword">
|
3
|
-
<text class="{{prefix}}-pwdText {{currValue !== '' ? prefix + '-password' : null}}" style="{{valueTextStyle}}">
|
4
|
-
{{currValue || placeholder}}
|
5
|
-
</text>
|
3
|
+
<text class="{{prefix}}-pwdText {{currValue !== '' ? prefix + '-password' : null}}" style="{{valueTextStyle}}">{{currValue || placeholder}}</text>
|
6
4
|
</view>
|
7
5
|
<slot name="custom-button" />
|
8
6
|
</view>
|
@@ -14,7 +12,7 @@
|
|
14
12
|
>
|
15
13
|
<view class="{{prefix}}-popup-container">
|
16
14
|
<view class="{{prefix}}-number-wrap" style="height: {{row * 56}}px">
|
17
|
-
<view wx:for="{{numberArray}}" wx:key="index" bind:tap="changeValue" hover-class="{{prefix}}-hover-class" data-item="{{ item }}" class="{{prefix}}-number-item" style="{{(item === 0 || item === 10) && numberArray.length === 11 ? 'width:
|
15
|
+
<view wx:for="{{numberArray}}" wx:key="index" bind:tap="changeValue" hover-class="{{prefix}}-hover-class" data-item="{{ item }}" class="{{prefix}}-number-item" style="{{(item === 0 || item === 10) && numberArray.length === 11 ? 'width: 345rpx' : ''}}">
|
18
16
|
<view
|
19
17
|
wx:if="{{item === -2}}"
|
20
18
|
class="{{prefix}}-hidden-image"
|
@@ -39,9 +37,7 @@
|
|
39
37
|
bind:tap="confirm"
|
40
38
|
hover-class="{{prefix}}-hover-class"
|
41
39
|
>
|
42
|
-
<text class="{{prefix}}-confirm-text" style="{{confirmTextStyle}}">
|
43
|
-
{{confirmText}}
|
44
|
-
</text>
|
40
|
+
<text class="{{prefix}}-confirm-text" space="false" style="{{confirmTextStyle}}">{{confirmText}}</text>
|
45
41
|
</button >
|
46
42
|
</view>
|
47
43
|
</view>
|
package/lib/dialog/index.js
CHANGED
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
4
|
};
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
-
var
|
6
|
+
var icons_1 = require("@tuya-miniapp/icons");
|
7
7
|
var component_1 = require("../common/component");
|
8
8
|
var button_1 = require("../mixins/button");
|
9
9
|
var appLog_1 = __importDefault(require("../common/appLog"));
|
@@ -90,7 +90,7 @@ var dialog_1 = require("./dialog");
|
|
90
90
|
},
|
91
91
|
},
|
92
92
|
data: {
|
93
|
-
warningIcon:
|
93
|
+
warningIcon: icons_1.Warning,
|
94
94
|
inputValue: '',
|
95
95
|
loading: {
|
96
96
|
confirm: false,
|
@@ -5,7 +5,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
6
|
var relation_1 = require("../common/relation");
|
7
7
|
var component_1 = require("../common/component");
|
8
|
-
var
|
8
|
+
var icons_1 = require("@tuya-miniapp/icons");
|
9
|
+
var ty_1 = __importDefault(require("../common/ty"));
|
9
10
|
(0, component_1.SmartComponent)({
|
10
11
|
classes: ['item-title-class'],
|
11
12
|
field: true,
|
@@ -43,7 +44,7 @@ var Check_1 = __importDefault(require("@tuya-miniapp/icons/dist/svg/Check"));
|
|
43
44
|
},
|
44
45
|
},
|
45
46
|
data: {
|
46
|
-
checkMarkIcon:
|
47
|
+
checkMarkIcon: icons_1.Check,
|
47
48
|
checkMarkIconColor: '',
|
48
49
|
transition: true,
|
49
50
|
showPopup: false,
|
@@ -53,8 +54,7 @@ var Check_1 = __importDefault(require("@tuya-miniapp/icons/dist/svg/Check"));
|
|
53
54
|
},
|
54
55
|
mounted: function () {
|
55
56
|
var _a;
|
56
|
-
|
57
|
-
var themeInfo = (_a = ty === null || ty === void 0 ? void 0 : ty.getThemeInfo()) !== null && _a !== void 0 ? _a : {};
|
57
|
+
var themeInfo = (_a = ty_1.default.getThemeInfo()) !== null && _a !== void 0 ? _a : {};
|
58
58
|
var checkMarkIconColor = this.data.activeColor || themeInfo['--app-M1'] || '#3678E3';
|
59
59
|
this.setData({ checkMarkIconColor: checkMarkIconColor });
|
60
60
|
},
|
@@ -6,7 +6,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
var component_1 = require("../common/component");
|
7
7
|
var relation_1 = require("../common/relation");
|
8
8
|
var utils_1 = require("../common/utils");
|
9
|
-
var
|
9
|
+
var icons_1 = require("@tuya-miniapp/icons");
|
10
|
+
var ty_1 = __importDefault(require("../common/ty"));
|
10
11
|
var ARRAY = [];
|
11
12
|
(0, component_1.SmartComponent)({
|
12
13
|
field: true,
|
@@ -58,14 +59,13 @@ var ARRAY = [];
|
|
58
59
|
},
|
59
60
|
},
|
60
61
|
data: {
|
61
|
-
triangleDown:
|
62
|
+
triangleDown: icons_1.TriangleDown,
|
62
63
|
activeColorStatic: '',
|
63
64
|
itemListData: [],
|
64
65
|
},
|
65
66
|
mounted: function () {
|
66
67
|
var _a;
|
67
|
-
|
68
|
-
var themeInfo = (_a = ty === null || ty === void 0 ? void 0 : ty.getThemeInfo()) !== null && _a !== void 0 ? _a : {};
|
68
|
+
var themeInfo = (_a = ty_1.default.getThemeInfo()) !== null && _a !== void 0 ? _a : {};
|
69
69
|
var activeColorStatic = this.data.activeColor || themeInfo['--app-M1'] || '#3678E3';
|
70
70
|
this.setData({ activeColorStatic: activeColorStatic });
|
71
71
|
},
|
package/lib/field/index.js
CHANGED
@@ -10,14 +10,11 @@ var __assign = (this && this.__assign) || function () {
|
|
10
10
|
};
|
11
11
|
return __assign.apply(this, arguments);
|
12
12
|
};
|
13
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
14
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
15
|
-
};
|
16
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
17
14
|
var utils_1 = require("../common/utils");
|
18
15
|
var component_1 = require("../common/component");
|
19
16
|
var props_1 = require("./props");
|
20
|
-
var
|
17
|
+
var icons_1 = require("@tuya-miniapp/icons");
|
21
18
|
(0, component_1.SmartComponent)({
|
22
19
|
field: true,
|
23
20
|
classes: ['input-class', 'right-icon-class', 'label-class'],
|
@@ -40,7 +37,7 @@ var Xmark_1 = __importDefault(require("@tuya-miniapp/icons/dist/svg/Xmark"));
|
|
40
37
|
value: '6.2em',
|
41
38
|
}, clearIcon: {
|
42
39
|
type: String,
|
43
|
-
value:
|
40
|
+
value: icons_1.Xmark,
|
44
41
|
}, extraEventParams: {
|
45
42
|
type: Boolean,
|
46
43
|
value: false,
|
package/lib/image/index.js
CHANGED
@@ -1,11 +1,8 @@
|
|
1
1
|
"use strict";
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
-
};
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
3
|
var component_1 = require("../common/component");
|
7
4
|
var button_1 = require("../mixins/button");
|
8
|
-
var
|
5
|
+
var icons_1 = require("@tuya-miniapp/icons");
|
9
6
|
(0, component_1.SmartComponent)({
|
10
7
|
mixins: [button_1.button],
|
11
8
|
classes: ['custom-class', 'loading-class', 'error-class', 'image-class'],
|
@@ -51,7 +48,7 @@ var Loading_1 = __importDefault(require("@tuya-miniapp/icons/dist/svg/Loading"))
|
|
51
48
|
data: {
|
52
49
|
error: false,
|
53
50
|
loading: true,
|
54
|
-
loadingSvg:
|
51
|
+
loadingSvg: icons_1.Loading,
|
55
52
|
viewStyle: '',
|
56
53
|
},
|
57
54
|
methods: {
|
package/lib/image/index.wxs
CHANGED
@@ -30,7 +30,7 @@ function mode(fit) {
|
|
30
30
|
|
31
31
|
|
32
32
|
function maskStyle(url, color) {
|
33
|
-
|
33
|
+
var str = 'mask-image: url(' + url + ');-webkit-mask-image: url(' + url + ');background: ' + color + ';'
|
34
34
|
return str
|
35
35
|
}
|
36
36
|
|
package/lib/loading/index.wxs
CHANGED
@@ -3,7 +3,7 @@ var style = require('../wxs/style.wxs');
|
|
3
3
|
var addUnit = require('../wxs/add-unit.wxs');
|
4
4
|
|
5
5
|
function textStyle(data) {
|
6
|
-
|
6
|
+
var ret = style({
|
7
7
|
'font-size': addUnit(data.textSize),
|
8
8
|
color: data.color,
|
9
9
|
});
|
@@ -12,7 +12,7 @@ function textStyle(data) {
|
|
12
12
|
}
|
13
13
|
|
14
14
|
function loadingStyle(data) {
|
15
|
-
|
15
|
+
var iconSrc = ''
|
16
16
|
|
17
17
|
if (data.type === 'spinner') {
|
18
18
|
iconSrc = data.spinner
|
package/lib/mixins/transition.js
CHANGED
@@ -35,11 +35,15 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
35
35
|
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
36
36
|
}
|
37
37
|
};
|
38
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
39
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
40
|
+
};
|
38
41
|
Object.defineProperty(exports, "__esModule", { value: true });
|
39
42
|
exports.transition = void 0;
|
40
43
|
// @ts-nocheck
|
41
44
|
var utils_1 = require("../common/utils");
|
42
45
|
var validator_1 = require("../common/validator");
|
46
|
+
var ty_1 = __importDefault(require("../common/ty"));
|
43
47
|
var getClassNames = function (name) { return ({
|
44
48
|
enter: "smart-".concat(name, "-enter smart-").concat(name, "-enter-active enter-class enter-active-class"),
|
45
49
|
'enter-to': "smart-".concat(name, "-enter-to smart-").concat(name, "-enter-active enter-to-class enter-active-class"),
|
@@ -98,20 +102,19 @@ function transition(showDefaultValue) {
|
|
98
102
|
this.enterFinishedPromise = new Promise(function (resolve) { return __awaiter(_this, void 0, void 0, function () {
|
99
103
|
var _a, duration, name, classNames, currentDuration;
|
100
104
|
var _this = this;
|
101
|
-
|
102
|
-
|
103
|
-
switch (_c.label) {
|
105
|
+
return __generator(this, function (_b) {
|
106
|
+
switch (_b.label) {
|
104
107
|
case 0:
|
105
108
|
_a = this.data, duration = _a.duration, name = _a.name;
|
106
109
|
classNames = getClassNames(name);
|
107
110
|
currentDuration = (0, validator_1.isObj)(duration) ? duration.enter : duration;
|
108
111
|
this.$emit('before-enter');
|
109
112
|
if (this.data.nativeDisabled) {
|
110
|
-
|
113
|
+
ty_1.default.nativeDisabled(true);
|
111
114
|
}
|
112
115
|
return [4 /*yield*/, (0, utils_1.requestAnimationFrame)()];
|
113
116
|
case 1:
|
114
|
-
|
117
|
+
_b.sent();
|
115
118
|
this.$emit('enter');
|
116
119
|
this.setData({
|
117
120
|
inited: true,
|
@@ -121,7 +124,7 @@ function transition(showDefaultValue) {
|
|
121
124
|
});
|
122
125
|
return [4 /*yield*/, (0, utils_1.requestAnimationFrame)()];
|
123
126
|
case 2:
|
124
|
-
|
127
|
+
_b.sent();
|
125
128
|
this.transitionEnded = false;
|
126
129
|
this.setData({ classes: classNames['enter-to'] });
|
127
130
|
clearTimeout(this.timer);
|
@@ -179,11 +182,10 @@ function transition(showDefaultValue) {
|
|
179
182
|
this.transitionEnded = false;
|
180
183
|
clearTimeout(this.timer);
|
181
184
|
setTimeout(function () {
|
182
|
-
var _a;
|
183
185
|
_this.enterFinishedPromise = null;
|
184
186
|
_this.$emit('after-leave');
|
185
187
|
if (_this.data.nativeDisabled) {
|
186
|
-
|
188
|
+
ty_1.default.nativeDisabled(false);
|
187
189
|
}
|
188
190
|
_this.setData({
|
189
191
|
display: false,
|
@@ -197,13 +199,12 @@ function transition(showDefaultValue) {
|
|
197
199
|
});
|
198
200
|
}); })
|
199
201
|
.catch(function (err) {
|
200
|
-
var _a;
|
201
202
|
_this.enterFinishedPromise = null;
|
202
203
|
_this.setData({ animating: false });
|
203
204
|
console.log(err, '---error-leave');
|
204
205
|
_this.$emit('leave-error', err);
|
205
206
|
if (_this.data.nativeDisabled) {
|
206
|
-
|
207
|
+
ty_1.default.nativeDisabled(false);
|
207
208
|
}
|
208
209
|
});
|
209
210
|
return [2 /*return*/];
|
package/lib/nav-bar/index.js
CHANGED
@@ -1,9 +1,6 @@
|
|
1
1
|
"use strict";
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
-
};
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
-
var
|
3
|
+
var icons_1 = require("@tuya-miniapp/icons");
|
7
4
|
var component_1 = require("../common/component");
|
8
5
|
var utils_1 = require("../common/utils");
|
9
6
|
(0, component_1.SmartComponent)({
|
@@ -50,7 +47,7 @@ var utils_1 = require("../common/utils");
|
|
50
47
|
},
|
51
48
|
data: {
|
52
49
|
height: 46,
|
53
|
-
leftArrowIcon:
|
50
|
+
leftArrowIcon: icons_1.Left,
|
54
51
|
},
|
55
52
|
created: function () {
|
56
53
|
var statusBarHeight = (0, utils_1.getSystemInfoSync)().statusBarHeight;
|
package/lib/notice-bar/index.js
CHANGED
@@ -1,12 +1,9 @@
|
|
1
1
|
"use strict";
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
-
};
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
3
|
var component_1 = require("../common/component");
|
7
4
|
var utils_1 = require("../common/utils");
|
8
|
-
var
|
9
|
-
var
|
5
|
+
var icons_1 = require("@tuya-miniapp/icons");
|
6
|
+
var icons_2 = require("@tuya-miniapp/icons");
|
10
7
|
(0, component_1.SmartComponent)({
|
11
8
|
props: {
|
12
9
|
text: {
|
@@ -83,8 +80,8 @@ var Right_1 = __importDefault(require("@tuya-miniapp/icons/dist/svg/Right"));
|
|
83
80
|
wrapable: Boolean,
|
84
81
|
},
|
85
82
|
data: {
|
86
|
-
Xmark:
|
87
|
-
Right:
|
83
|
+
Xmark: icons_1.Xmark,
|
84
|
+
Right: icons_2.Right,
|
88
85
|
show: true,
|
89
86
|
},
|
90
87
|
created: function () {
|