@tuya-miniapp/smart-ui 2.5.1-beta-2 → 2.5.1-beta-4
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 +4 -4
- package/dist/bottom-sheet/index.wxml +7 -1
- package/dist/bottom-sheet/index.wxs +12 -0
- package/dist/bottom-sheet/index.wxss +1 -1
- package/dist/button/index.js +2 -7
- 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 +2 -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/config-provider/index.wxml +1 -1
- package/dist/custom-keyboard/index.wxml +3 -7
- 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 -8
- package/dist/nav-bar/index.js +1 -1
- package/dist/notice-bar/index.js +2 -2
- package/dist/picker-column/index.js +6 -8
- package/dist/picker-column/index.wxml +1 -1
- package/dist/picker-column/index.wxs +8 -11
- package/dist/popover/index.js +5 -0
- package/dist/popover/index.wxml +10 -2
- 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 +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 +5 -5
- package/lib/bottom-sheet/index.wxml +7 -1
- package/lib/bottom-sheet/index.wxs +12 -0
- package/lib/bottom-sheet/index.wxss +1 -1
- package/lib/button/index.js +2 -7
- package/lib/calendar/calendar.wxml +1 -1
- 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/circle/index.rjs +2 -1
- package/lib/common/appLog.js +1 -1
- package/lib/common/ty.d.ts +7 -0
- package/lib/common/ty.js +35 -0
- package/lib/config-provider/index.wxml +1 -1
- package/lib/custom-keyboard/index.wxml +3 -7
- 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 +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 +13 -12
- package/lib/nav-bar/index.js +2 -5
- package/lib/notice-bar/index.js +4 -7
- package/lib/picker-column/index.js +10 -9
- package/lib/picker-column/index.wxml +1 -1
- package/lib/picker-column/index.wxs +8 -11
- package/lib/popover/index.js +5 -0
- package/lib/popover/index.wxml +10 -2
- package/lib/popup/index.css +1 -1
- package/lib/popup/index.js +3 -6
- package/lib/popup/index.wxs +1 -1
- package/lib/popup/index.wxss +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/skeleton/index.css +1 -1
- package/lib/skeleton/index.wxss +1 -1
- package/lib/stepper/index.js +6 -6
- package/lib/steps/index.js +2 -5
- package/lib/switch/index.css +1 -1
- package/lib/switch/index.wxss +1 -1
- package/lib/tag/index.js +2 -5
- package/lib/toast/icons.js +6 -9
- 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 +4 -8
- package/lib/tree-select/index.js +2 -5
- package/package.json +1 -1
package/lib/circle/index.rjs
CHANGED
@@ -190,7 +190,7 @@ export default Render({
|
|
190
190
|
ctx.stroke();
|
191
191
|
|
192
192
|
// 绘制进度条
|
193
|
-
const progressAngle = progress * (Math.PI * 2); // 根据进度计算角度
|
193
|
+
const progressAngle = progress * (Math.PI * 2.12); // 根据进度计算角度
|
194
194
|
ctx.beginPath();
|
195
195
|
ctx.arc(this.width / 2, this.height / 2, radius, startAngle, startAngle + progressAngle);
|
196
196
|
ctx.lineWidth = lineWidth;
|
@@ -217,6 +217,7 @@ export default Render({
|
|
217
217
|
drawProgressBar(progress, this.fillColor); // 25%的蓝色进度条
|
218
218
|
},
|
219
219
|
render(val) {
|
220
|
+
val = Math.min(Math.max(0, val), 100)
|
220
221
|
if (this.mode === 'basic') {
|
221
222
|
this.renderAll(val / 100, this.round ? { lineCap: 'round' } : { lineCap: '' });
|
222
223
|
}
|
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.css
CHANGED
@@ -1 +1 @@
|
|
1
|
-
@import '../common/index.css';.smart-dialog{background-color:var(--dialog-background-color,var(--app-B4,#fff));border-radius:var(--dialog-border-radius,16px);font-size:var(--dialog-font-size,16px);overflow:hidden;top:45%!important;width:var(--dialog-width,311px)}@media (max-width:321px){.smart-dialog{width:var(--dialog-small-screen-width,90%)}}.smart-dialog__header{color:var(--dialog-header-font-color,var(--app-B4-N1,#000));font-weight:var(--dialog-header-font-weight,400);line-height:var(--dialog-header-line-height,24px);padding:var(--dialog-header-padding,0);padding-top:var(--dialog-header-padding-top,24px);text-align:center}.smart-dialog__header-icon{border-radius:100%;display:block;font-size:var(--dialog-header-icon-size,39px);height:var(--dialog-header-icon-size,39px);margin:auto auto 12px;width:var(--dialog-header-icon-size,39px)}.smart-dialog__header--isolated{padding:var(--dialog-header-isolated-padding,24px 0)}.smart-dialog__message{-webkit-overflow-scrolling:touch;color:var(--dialog-message-text-color,var(--app-B4-N1,#000));font-size:var(--dialog-message-font-size,16px);line-height:var(--dialog-message-line-height,20px);max-height:var(--dialog-message-max-height,60vh);overflow-y:auto;padding:var(--dialog-message-padding,24px);text-align:center}.smart-dialog__message-text{word-wrap:break-word}.smart-dialog__message--hasTitle{color:var(--dialog-has-title-message-text-color,var(--app-B4-N3,rgba(0,0,0,.5)));font-size:var(--dialog-has-title-message-font-size,14px);padding-top:var(--dialog-has-title-message-padding-top,8px)}.smart-dialog__message--round-button{padding-bottom:16px}.smart-dialog__message--left{text-align:left}.smart-dialog__message--right{text-align:right}.smart-dialog__message--justify{text-align:justify}.smart-dialog__input{background-color:var(--dialog-input-background-color,var(--app-B4-N9,rgba(0,0,0,.05)));border-radius:var(--dialog-input-border-radius,10px);font-size:var(--dialog-input-font-size,14px);height:var(--dialog-input-height,40px);margin:var(--dialog-input-margin,0 16px 24px);padding:var(--dialog-input-padding,0 10px)}.smart-dialog__footer{display:flex}.smart-dialog__footer--round-button{height:40px!important;padding:8px 20px 16px!important;position:relative!important}.smart-dialog__button{flex:1}.smart-dialog-bounce-enter{opacity:0;transform:translate3d(-50%,-50%,0) scale(.7)}.smart-dialog-bounce-leave-active{opacity:0;transform:translate3d(-50%,-50%,0) scale(.9)}.smart-dialog--round-button .smart-dialog__cancel,.smart-dialog--round-button .smart-dialog__confirm{border-radius:var(--dialog--round-button-border-radius,20px)!important}
|
1
|
+
@import '../common/index.css';.smart-dialog{background-color:var(--dialog-background-color,var(--app-B4,#fff));border-radius:var(--dialog-border-radius,16px);font-size:var(--dialog-font-size,16px);overflow:hidden;top:45%!important;width:var(--dialog-width,311px)}@media (max-width:321px){.smart-dialog{width:var(--dialog-small-screen-width,90%)}}.smart-dialog__header{color:var(--dialog-header-font-color,var(--app-B4-N1,#000));font-weight:var(--dialog-header-font-weight,400);line-height:var(--dialog-header-line-height,24px);padding:var(--dialog-header-padding,0);padding-top:var(--dialog-header-padding-top,24px);text-align:center}.smart-dialog__header-icon{border-radius:100%;display:block;font-size:var(--dialog-header-icon-size,39px);height:var(--dialog-header-icon-size,39px);margin:auto auto 12px;width:var(--dialog-header-icon-size,39px)}.smart-dialog__header--isolated{padding:var(--dialog-header-isolated-padding,24px 0)}.smart-dialog__message{-webkit-overflow-scrolling:touch;color:var(--dialog-message-text-color,var(--app-B4-N1,#000));font-size:var(--dialog-message-font-size,16px);line-height:var(--dialog-message-line-height,20px);max-height:var(--dialog-message-max-height,60vh);overflow-y:auto;padding:var(--dialog-message-padding,24px);text-align:center}.smart-dialog__message-text{word-wrap:break-word}.smart-dialog__message--hasTitle{color:var(--dialog-has-title-message-text-color,var(--app-B4-N3,rgba(0,0,0,.5)));font-size:var(--dialog-has-title-message-font-size,14px);padding-top:var(--dialog-has-title-message-padding-top,8px)}.smart-dialog__message--round-button{--hairline-right-width:0;padding-bottom:16px}.smart-dialog__message--left{text-align:left}.smart-dialog__message--right{text-align:right}.smart-dialog__message--justify{text-align:justify}.smart-dialog__input{background-color:var(--dialog-input-background-color,var(--app-B4-N9,rgba(0,0,0,.05)));border-radius:var(--dialog-input-border-radius,10px);font-size:var(--dialog-input-font-size,14px);height:var(--dialog-input-height,40px);margin:var(--dialog-input-margin,0 16px 24px);padding:var(--dialog-input-padding,0 10px)}.smart-dialog__footer{display:flex}.smart-dialog__footer--round-button{--hairline-right-width:0;height:40px!important;padding:8px 20px 16px!important;position:relative!important}.smart-dialog__button{flex:1}.smart-dialog__cancel,.smart-dialog__confirm{border:0!important;border-radius:0!important}.smart-dialog-bounce-enter{opacity:0;transform:translate3d(-50%,-50%,0) scale(.7)}.smart-dialog-bounce-leave-active{opacity:0;transform:translate3d(-50%,-50%,0) scale(.9)}.smart-dialog--round-button .smart-dialog__cancel,.smart-dialog--round-button .smart-dialog__confirm{border-radius:var(--dialog--round-button-border-radius,20px)!important}
|
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,
|
package/lib/dialog/index.wxss
CHANGED
@@ -1 +1 @@
|
|
1
|
-
@import '../common/index.wxss';.smart-dialog{background-color:var(--dialog-background-color,var(--app-B4,#fff));border-radius:var(--dialog-border-radius,16px);font-size:var(--dialog-font-size,16px);overflow:hidden;top:45%!important;width:var(--dialog-width,311px)}@media (max-width:321px){.smart-dialog{width:var(--dialog-small-screen-width,90%)}}.smart-dialog__header{color:var(--dialog-header-font-color,var(--app-B4-N1,#000));font-weight:var(--dialog-header-font-weight,400);line-height:var(--dialog-header-line-height,24px);padding:var(--dialog-header-padding,0);padding-top:var(--dialog-header-padding-top,24px);text-align:center}.smart-dialog__header-icon{border-radius:100%;display:block;font-size:var(--dialog-header-icon-size,39px);height:var(--dialog-header-icon-size,39px);margin:auto auto 12px;width:var(--dialog-header-icon-size,39px)}.smart-dialog__header--isolated{padding:var(--dialog-header-isolated-padding,24px 0)}.smart-dialog__message{-webkit-overflow-scrolling:touch;color:var(--dialog-message-text-color,var(--app-B4-N1,#000));font-size:var(--dialog-message-font-size,16px);line-height:var(--dialog-message-line-height,20px);max-height:var(--dialog-message-max-height,60vh);overflow-y:auto;padding:var(--dialog-message-padding,24px);text-align:center}.smart-dialog__message-text{word-wrap:break-word}.smart-dialog__message--hasTitle{color:var(--dialog-has-title-message-text-color,var(--app-B4-N3,rgba(0,0,0,.5)));font-size:var(--dialog-has-title-message-font-size,14px);padding-top:var(--dialog-has-title-message-padding-top,8px)}.smart-dialog__message--round-button{padding-bottom:16px}.smart-dialog__message--left{text-align:left}.smart-dialog__message--right{text-align:right}.smart-dialog__message--justify{text-align:justify}.smart-dialog__input{background-color:var(--dialog-input-background-color,var(--app-B4-N9,rgba(0,0,0,.05)));border-radius:var(--dialog-input-border-radius,10px);font-size:var(--dialog-input-font-size,14px);height:var(--dialog-input-height,40px);margin:var(--dialog-input-margin,0 16px 24px);padding:var(--dialog-input-padding,0 10px)}.smart-dialog__footer{display:flex}.smart-dialog__footer--round-button{height:40px!important;padding:8px 20px 16px!important;position:relative!important}.smart-dialog__button{flex:1}.smart-dialog-bounce-enter{opacity:0;transform:translate3d(-50%,-50%,0) scale(.7)}.smart-dialog-bounce-leave-active{opacity:0;transform:translate3d(-50%,-50%,0) scale(.9)}.smart-dialog--round-button .smart-dialog__cancel,.smart-dialog--round-button .smart-dialog__confirm{border-radius:var(--dialog--round-button-border-radius,20px)!important}
|
1
|
+
@import '../common/index.wxss';.smart-dialog{background-color:var(--dialog-background-color,var(--app-B4,#fff));border-radius:var(--dialog-border-radius,16px);font-size:var(--dialog-font-size,16px);overflow:hidden;top:45%!important;width:var(--dialog-width,311px)}@media (max-width:321px){.smart-dialog{width:var(--dialog-small-screen-width,90%)}}.smart-dialog__header{color:var(--dialog-header-font-color,var(--app-B4-N1,#000));font-weight:var(--dialog-header-font-weight,400);line-height:var(--dialog-header-line-height,24px);padding:var(--dialog-header-padding,0);padding-top:var(--dialog-header-padding-top,24px);text-align:center}.smart-dialog__header-icon{border-radius:100%;display:block;font-size:var(--dialog-header-icon-size,39px);height:var(--dialog-header-icon-size,39px);margin:auto auto 12px;width:var(--dialog-header-icon-size,39px)}.smart-dialog__header--isolated{padding:var(--dialog-header-isolated-padding,24px 0)}.smart-dialog__message{-webkit-overflow-scrolling:touch;color:var(--dialog-message-text-color,var(--app-B4-N1,#000));font-size:var(--dialog-message-font-size,16px);line-height:var(--dialog-message-line-height,20px);max-height:var(--dialog-message-max-height,60vh);overflow-y:auto;padding:var(--dialog-message-padding,24px);text-align:center}.smart-dialog__message-text{word-wrap:break-word}.smart-dialog__message--hasTitle{color:var(--dialog-has-title-message-text-color,var(--app-B4-N3,rgba(0,0,0,.5)));font-size:var(--dialog-has-title-message-font-size,14px);padding-top:var(--dialog-has-title-message-padding-top,8px)}.smart-dialog__message--round-button{--hairline-right-width:0;padding-bottom:16px}.smart-dialog__message--left{text-align:left}.smart-dialog__message--right{text-align:right}.smart-dialog__message--justify{text-align:justify}.smart-dialog__input{background-color:var(--dialog-input-background-color,var(--app-B4-N9,rgba(0,0,0,.05)));border-radius:var(--dialog-input-border-radius,10px);font-size:var(--dialog-input-font-size,14px);height:var(--dialog-input-height,40px);margin:var(--dialog-input-margin,0 16px 24px);padding:var(--dialog-input-padding,0 10px)}.smart-dialog__footer{display:flex}.smart-dialog__footer--round-button{--hairline-right-width:0;height:40px!important;padding:8px 20px 16px!important;position:relative!important}.smart-dialog__button{flex:1}.smart-dialog__cancel,.smart-dialog__confirm{border:0!important;border-radius:0!important}.smart-dialog-bounce-enter{opacity:0;transform:translate3d(-50%,-50%,0) scale(.7)}.smart-dialog-bounce-leave-active{opacity:0;transform:translate3d(-50%,-50%,0) scale(.9)}.smart-dialog--round-button .smart-dialog__cancel,.smart-dialog--round-button .smart-dialog__confirm{border-radius:var(--dialog--round-button-border-radius,20px)!important}
|
@@ -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
|
-
this.$emit('before-enter');
|
109
111
|
if (this.data.nativeDisabled) {
|
110
|
-
|
112
|
+
ty_1.default.nativeDisabled(true);
|
111
113
|
}
|
114
|
+
this.$emit('before-enter');
|
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,12 +182,11 @@ 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
|
-
_this.$emit('after-leave');
|
185
186
|
if (_this.data.nativeDisabled) {
|
186
|
-
|
187
|
+
ty_1.default.nativeDisabled(false);
|
187
188
|
}
|
189
|
+
_this.$emit('after-leave');
|
188
190
|
_this.setData({
|
189
191
|
display: false,
|
190
192
|
animating: 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 () {
|
@@ -44,10 +44,14 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
44
44
|
}
|
45
45
|
return to.concat(ar || Array.prototype.slice.call(from));
|
46
46
|
};
|
47
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
48
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
49
|
+
};
|
47
50
|
Object.defineProperty(exports, "__esModule", { value: true });
|
48
51
|
var component_1 = require("../common/component");
|
49
52
|
var utils_1 = require("../common/utils");
|
50
53
|
var validator_1 = require("../common/validator");
|
54
|
+
var ty_1 = __importDefault(require("../common/ty"));
|
51
55
|
var DEFAULT_DURATION = 400;
|
52
56
|
(0, component_1.SmartComponent)({
|
53
57
|
classes: ['active-class'],
|
@@ -173,10 +177,10 @@ var DEFAULT_DURATION = 400;
|
|
173
177
|
// @ts-ignore
|
174
178
|
this.vibrateShort();
|
175
179
|
}
|
176
|
-
|
180
|
+
var animationIndex = Math.abs(-offset / data.itemHeight);
|
177
181
|
this.setData({
|
178
182
|
offset: offset,
|
179
|
-
|
183
|
+
animationIndex: animationIndex,
|
180
184
|
preOffsetList: __spreadArray(__spreadArray([], data.preOffsetList, true), [offset], false),
|
181
185
|
animate: false,
|
182
186
|
});
|
@@ -219,7 +223,7 @@ var DEFAULT_DURATION = 400;
|
|
219
223
|
// 最终定位索引
|
220
224
|
this.setData({
|
221
225
|
duration: isSameTouch ? 150 : data.animationTime,
|
222
|
-
|
226
|
+
animationIndex: index,
|
223
227
|
offset: offsetData,
|
224
228
|
animate: true,
|
225
229
|
});
|
@@ -265,8 +269,7 @@ var DEFAULT_DURATION = 400;
|
|
265
269
|
var _this = this;
|
266
270
|
if (time === void 0) { time = 1000; }
|
267
271
|
if (!count) {
|
268
|
-
|
269
|
-
ty.vibrateShort({ type: 'light' });
|
272
|
+
ty_1.default.vibrateShort({ type: 'light' });
|
270
273
|
return;
|
271
274
|
}
|
272
275
|
var has = 0;
|
@@ -365,7 +368,7 @@ var DEFAULT_DURATION = 400;
|
|
365
368
|
if (animate) {
|
366
369
|
return this.set({
|
367
370
|
currentIndex: index,
|
368
|
-
|
371
|
+
animationIndex: index,
|
369
372
|
offset: offset,
|
370
373
|
animate: true,
|
371
374
|
duration: time,
|
@@ -385,11 +388,9 @@ var DEFAULT_DURATION = 400;
|
|
385
388
|
});
|
386
389
|
}
|
387
390
|
return this.set({
|
388
|
-
optionsV: data.options,
|
389
391
|
offset: offset,
|
390
392
|
currentIndex: index,
|
391
|
-
|
392
|
-
renderStart: 0,
|
393
|
+
animationIndex: index,
|
393
394
|
animate: !!animate,
|
394
395
|
}).then(function () {
|
395
396
|
if (!userAction) {
|
@@ -16,7 +16,7 @@
|
|
16
16
|
wx:for-item="option"
|
17
17
|
wx:key="index"
|
18
18
|
data-index="{{ renderStart + index }}"
|
19
|
-
style="{{computed.wrapperItemStyle({ itemHeight, fontStyle, activeStyle: renderStart + index === currentIndex ? activeStyle : ''})}}"
|
19
|
+
style="{{computed.wrapperItemStyle({ itemHeight, fontStyle, activeStyle: renderStart + index === currentIndex ? activeStyle : '', animationIndex, index: renderStart + index })}}"
|
20
20
|
class="smart-ellipsis {{ utils.bem('picker-column__item', { disabled: option && option.disabled, selected: renderStart + index === currentIndex }) }} {{ renderStart + index === currentIndex ? 'active-class' : '' }}"
|
21
21
|
>
|
22
22
|
{{ computed.optionText(option, valueKey) }}
|
@@ -48,20 +48,17 @@ function wrapperItemStyle(data) {
|
|
48
48
|
var heightStyleStr = "height: " + data.itemHeight + 'px;'
|
49
49
|
var fontStyleStr = style(data.fontStyle);
|
50
50
|
var activeStyleStr = style(data.activeStyle);
|
51
|
+
|
52
|
+
// var offsetIndex = data.animationIndex - data.index;
|
53
|
+
// var scale = Math.min(Math.abs(offsetIndex * 0.05), 0.05 * 2)
|
54
|
+
// var rotateX = offsetIndex * 25 > 0 ? Math.min(offsetIndex * 25, 25 * 2) : Math.max(offsetIndex * 25, -25 * 2)
|
55
|
+
// const transStyle = style({
|
56
|
+
// transform: `rotateX(${rotateX}deg) scale(${1 - scale})`
|
57
|
+
// });
|
58
|
+
// return trans + ';' + heightStyleStr + (fontStyleStr ? fontStyleStr + ';' : fontStyleStr) + activeStyleStr
|
51
59
|
return heightStyleStr + (fontStyleStr ? fontStyleStr + ';' : fontStyleStr) + activeStyleStr
|
52
60
|
}
|
53
61
|
|
54
|
-
// function wrapperItemStyle(data) {
|
55
|
-
// const { index, animationIndex: currentIndex } = data;
|
56
|
-
// const offsetIndex = currentIndex - index;
|
57
|
-
// const rotateX = offsetIndex * 25 > 0 ? Math.min(offsetIndex * 25, 25 * 2) : Math.max(offsetIndex * 25, -25 * 2)
|
58
|
-
// const scale = Math.min(Math.abs(offsetIndex * 0.05), 0.05 * 2)
|
59
|
-
// return style({
|
60
|
-
// transition: 'transform ' + data.duration + 'ms ease-out',
|
61
|
-
// transform: `rotateX(${rotateX}deg) scale(${1 - scale})`
|
62
|
-
// });
|
63
|
-
// }
|
64
|
-
|
65
62
|
module.exports = {
|
66
63
|
optionText: optionText,
|
67
64
|
rootStyle: rootStyle,
|
package/lib/popover/index.js
CHANGED
package/lib/popover/index.wxml
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
<view class="smart-popover">
|
1
|
+
<view class="smart-popover custom-class">
|
2
2
|
|
3
3
|
<smart-overlay
|
4
4
|
show="{{ currentShow }}"
|
@@ -12,7 +12,15 @@
|
|
12
12
|
|
13
13
|
</smart-overlay>
|
14
14
|
|
15
|
-
<view class="smart-popover-button" catch:
|
15
|
+
<view wx:if="{{trigger === 'longpress'}}" class="smart-popover-button" catch:longpress="onClick">
|
16
|
+
<slot />
|
17
|
+
<view catch:tap="noop" wx:if="{{currentShow}}" class="smart-popover-overlay" style="left: {{left}};top: {{top}}; bottom:{{bottom}};right:{{right}}; transform:{{transform}}; {{customStyle}}; {{showStyle}}">
|
18
|
+
<slot name="overlay" />
|
19
|
+
<smart-icon class="smart-popover-overlay-arrow" name="{{iconSrc}}" style=" transform: {{iconTransform}}; {{iconPos}}: {{iconPosVal}}px;background-size: {{iconWidth}} {{iconHeight}};{{iconStyle}}"></smart-icon>
|
20
|
+
</view>
|
21
|
+
</view>
|
22
|
+
|
23
|
+
<view wx:else class="smart-popover-button" catch:tap="onClick">
|
16
24
|
<slot />
|
17
25
|
<view catch:tap="noop" wx:if="{{currentShow}}" class="smart-popover-overlay" style="left: {{left}};top: {{top}}; bottom:{{bottom}};right:{{right}}; transform:{{transform}}; {{customStyle}}; {{showStyle}}">
|
18
26
|
<slot name="overlay" />
|
package/lib/popup/index.css
CHANGED
@@ -1 +1 @@
|
|
1
|
-
@import '../common/index.css';.smart-popup{-webkit-overflow-scrolling:touch;animation:ease both;background-color:var(--popup-background-color,var(--app-B4,#fff));box-sizing:border-box;max-height:100%;position:fixed;transition-timing-function:ease}.smart-popup--center{left:50%;top:50%;transform:translate3d(-50%,-50%,0)}.smart-popup--center.smart-popup--round{border-radius:var(--popup-round-border-radius,16px)}.smart-popup--top{left:0;top:0;width:100%}.smart-popup--top.smart-popup--round{border-radius:0 0 var(--popup-round-border-radius,var(--popup-round-border-radius,16px)) var(--popup-round-border-radius,var(--popup-round-border-radius,16px))}.smart-popup--right{right:0;top:50%;transform:translate3d(0,-50%,0)}.smart-popup--right.smart-popup--round{border-radius:var(--popup-round-border-radius,var(--popup-round-border-radius,16px)) 0 0 var(--popup-round-border-radius,var(--popup-round-border-radius,16px))}.smart-popup--bottom{bottom:0;left:0;width:100%}.smart-popup--bottom.smart-popup--round{border-radius:var(--popup-round-border-radius,var(--popup-round-border-radius,16px)) var(--popup-round-border-radius,var(--popup-round-border-radius,16px)) 0 0}.smart-popup--left{left:0;top:50%;transform:translate3d(0,-50%,0)}.smart-popup--left.smart-popup--round{border-radius:0 var(--popup-round-border-radius,var(--popup-round-border-radius,16px)) var(--popup-round-border-radius,var(--popup-round-border-radius,16px)) 0}.smart-popup--bottom.smart-popup--safeTabBar,.smart-popup--top.smart-popup--safeTabBar{bottom:var(--tabbar-height,55px)}.smart-popup--safeTop{padding-top:env(safe-area-inset-top)}.smart-popup__close-icon{color:var(--popup-close-icon-color,#969799);font-size:var(--popup-close-icon-size,24px);position:absolute;z-index:var(--popup-close-icon-z-index,1)}.smart-popup__close-icon--top-left{left:var(--popup-close-icon-margin,12px);top:var(--popup-close-icon-margin,12px)}.smart-popup__close-icon--top-right{right:var(--popup-close-icon-margin,12px);top:var(--popup-close-icon-margin,12px)}.smart-popup__close-icon--bottom-left{bottom:var(--popup-close-icon-margin,12px);left:var(--popup-close-icon-margin,12px)}.smart-popup__close-icon--bottom-right{bottom:var(--popup-close-icon-margin,12px);right:var(--popup-close-icon-margin,12px)}.smart-popup__close-icon:active{opacity:.6}.smart-scale-enter-active,.smart-scale-leave-active{transition-property:opacity,transform}.smart-scale-enter,.smart-scale-leave-to{opacity:0;transform:translate3d(-50%,-50%,0) scale(.7)}.smart-fade-enter-active,.smart-fade-leave-active{transition-property:opacity}.smart-fade-enter,.smart-fade-leave-to{opacity:0}.smart-center-enter-active,.smart-center-leave-active{transition-property:opacity}.smart-center-enter,.smart-center-leave-to{opacity:0}.smart-bottom-enter-active,.smart-bottom-leave-active,.smart-left-enter-active,.smart-left-leave-active,.smart-right-enter-active,.smart-right-leave-active,.smart-top-enter-active,.smart-top-leave-active{transition-property:transform}.smart-bottom-enter,.smart-bottom-leave-to{transform:translate3d(0,100%,0)}.smart-top-enter,.smart-top-leave-to{transform:translate3d(0,-100%,0)}.smart-left-enter,.smart-left-leave-to{transform:translate3d(-100%,-50%,0)}.smart-right-enter,.smart-right-leave-to{transform:translate3d(100%,-50%,0)}
|
1
|
+
@import '../common/index.css';.smart-popup{-webkit-overflow-scrolling:touch;animation:ease both;background-color:var(--popup-background-color,var(--app-B4,#fff));box-sizing:border-box;max-height:100%;position:fixed;transition-timing-function:ease}.smart-popup--center{left:50%;top:50%;transform:translate3d(-50%,-50%,0)}.smart-popup--center.smart-popup--round{border-radius:var(--popup-round-border-radius,16px);overflow:hidden}.smart-popup--top{left:0;top:0;width:100%}.smart-popup--top.smart-popup--round{border-radius:0 0 var(--popup-round-border-radius,var(--popup-round-border-radius,16px)) var(--popup-round-border-radius,var(--popup-round-border-radius,16px));overflow:hidden}.smart-popup--right{right:0;top:50%;transform:translate3d(0,-50%,0)}.smart-popup--right.smart-popup--round{border-radius:var(--popup-round-border-radius,var(--popup-round-border-radius,16px)) 0 0 var(--popup-round-border-radius,var(--popup-round-border-radius,16px));overflow:hidden}.smart-popup--bottom{bottom:0;left:0;width:100%}.smart-popup--bottom.smart-popup--round{border-radius:var(--popup-round-border-radius,var(--popup-round-border-radius,16px)) var(--popup-round-border-radius,var(--popup-round-border-radius,16px)) 0 0;overflow:hidden}.smart-popup--left{left:0;top:50%;transform:translate3d(0,-50%,0)}.smart-popup--left.smart-popup--round{border-radius:0 var(--popup-round-border-radius,var(--popup-round-border-radius,16px)) var(--popup-round-border-radius,var(--popup-round-border-radius,16px)) 0;overflow:hidden}.smart-popup--bottom.smart-popup--safeTabBar,.smart-popup--top.smart-popup--safeTabBar{bottom:var(--tabbar-height,55px)}.smart-popup--safeTop{padding-top:env(safe-area-inset-top)}.smart-popup__close-icon{color:var(--popup-close-icon-color,#969799);font-size:var(--popup-close-icon-size,24px);position:absolute;z-index:var(--popup-close-icon-z-index,1)}.smart-popup__close-icon--top-left{left:var(--popup-close-icon-margin,12px);top:var(--popup-close-icon-margin,12px)}.smart-popup__close-icon--top-right{right:var(--popup-close-icon-margin,12px);top:var(--popup-close-icon-margin,12px)}.smart-popup__close-icon--bottom-left{bottom:var(--popup-close-icon-margin,12px);left:var(--popup-close-icon-margin,12px)}.smart-popup__close-icon--bottom-right{bottom:var(--popup-close-icon-margin,12px);right:var(--popup-close-icon-margin,12px)}.smart-popup__close-icon:active{opacity:.6}.smart-scale-enter-active,.smart-scale-leave-active{transition-property:opacity,transform}.smart-scale-enter,.smart-scale-leave-to{opacity:0;transform:translate3d(-50%,-50%,0) scale(.7)}.smart-fade-enter-active,.smart-fade-leave-active{transition-property:opacity}.smart-fade-enter,.smart-fade-leave-to{opacity:0}.smart-center-enter-active,.smart-center-leave-active{transition-property:opacity}.smart-center-enter,.smart-center-leave-to{opacity:0}.smart-bottom-enter-active,.smart-bottom-leave-active,.smart-left-enter-active,.smart-left-leave-active,.smart-right-enter-active,.smart-right-leave-active,.smart-top-enter-active,.smart-top-leave-active{transition-property:transform}.smart-bottom-enter,.smart-bottom-leave-to{transform:translate3d(0,100%,0)}.smart-top-enter,.smart-top-leave-to{transform:translate3d(0,-100%,0)}.smart-left-enter,.smart-left-leave-to{transform:translate3d(-100%,-50%,0)}.smart-right-enter,.smart-right-leave-to{transform:translate3d(100%,-50%,0)}
|
package/lib/popup/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 transition_1 = require("../mixins/transition");
|
9
6
|
var utils_1 = require("../common/utils");
|
@@ -37,7 +34,7 @@ var utils_1 = require("../common/utils");
|
|
37
34
|
},
|
38
35
|
closeIcon: {
|
39
36
|
type: String,
|
40
|
-
value:
|
37
|
+
value: icons_1.Xmark,
|
41
38
|
},
|
42
39
|
closeIconPosition: {
|
43
40
|
type: String,
|
@@ -78,7 +75,7 @@ var utils_1 = require("../common/utils");
|
|
78
75
|
},
|
79
76
|
},
|
80
77
|
data: {
|
81
|
-
closeIcon:
|
78
|
+
closeIcon: icons_1.Xmark,
|
82
79
|
bottomSafeHeight: 0,
|
83
80
|
},
|
84
81
|
mounted: function () {
|
package/lib/popup/index.wxs
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
var style = require('../wxs/style.wxs');
|
3
3
|
|
4
4
|
function popupStyle(data) {
|
5
|
-
|
5
|
+
var transformStyle = data.position === 'bottom' ? "transform: translate3d(0, calc(100% + " + data.bottomSafeHeight + "px), 0)" : null;
|
6
6
|
|
7
7
|
return style([
|
8
8
|
{
|