@tuya-miniapp/smart-ui 2.5.1-beta-2 → 2.5.1-beta-3
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 +1 -1
- package/dist/picker-column/index.wxs +4 -4
- 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 +5 -2
- package/lib/picker-column/index.wxs +4 -4
- 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/dist/popup/index.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import closeIcon from '@tuya-miniapp/icons
|
1
|
+
import { Xmark as closeIcon } from '@tuya-miniapp/icons';
|
2
2
|
import { SmartComponent } from '../common/component';
|
3
3
|
import { transition } from '../mixins/transition';
|
4
4
|
import { getSafeBottomOffset } from '../common/utils';
|
package/dist/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
|
{
|
package/dist/popup/index.wxss
CHANGED
@@ -1 +1 @@
|
|
1
|
-
@import '../common/index.wxss';.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.wxss';.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/dist/radio/index.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import
|
1
|
+
import { Check } from '@tuya-miniapp/icons';
|
2
2
|
import { canIUseModel } from '../common/version';
|
3
3
|
import { SmartComponent } from '../common/component';
|
4
4
|
import { useParent } from '../common/relation';
|
@@ -31,7 +31,7 @@ SmartComponent({
|
|
31
31
|
data: {
|
32
32
|
direction: '',
|
33
33
|
parentDisabled: false,
|
34
|
-
icon:
|
34
|
+
icon: Check,
|
35
35
|
preventDefault: false,
|
36
36
|
},
|
37
37
|
methods: {
|
package/dist/rate/index.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
import CheckmarkCircle from '@tuya-miniapp/icons
|
2
|
-
import CheckmarkCircleVoid from '@tuya-miniapp/icons
|
1
|
+
import { CheckmarkCircle } from '@tuya-miniapp/icons';
|
2
|
+
import { CheckmarkCircleVoid } from '@tuya-miniapp/icons';
|
3
3
|
import { getAllRect } from '../common/utils';
|
4
4
|
import { SmartComponent } from '../common/component';
|
5
5
|
import { canIUseModel } from '../common/version';
|
package/dist/search/index.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
import { SmartComponent } from '../common/component';
|
2
2
|
import { canIUseModel } from '../common/version';
|
3
|
-
import SearchIcon from '@tuya-miniapp/icons
|
4
|
-
import CloseIcon from '@tuya-miniapp/icons
|
3
|
+
import { Search as SearchIcon } from '@tuya-miniapp/icons';
|
4
|
+
import { Close as CloseIcon } from '@tuya-miniapp/icons';
|
5
5
|
SmartComponent({
|
6
6
|
field: true,
|
7
7
|
classes: ['field-class', 'input-class', 'cancel-class'],
|
package/dist/skeleton/index.css
CHANGED
@@ -1 +1 @@
|
|
1
|
-
@import '../common/index.css';.smart-skeleton{box-sizing:border-box;display:flex;padding:var(--skeleton-padding,0 16px);width:100%}.smart-skeleton__avatar{background-color:var(--skeleton-avatar-background-color,var(--app-B3,#fff));flex-shrink:0;margin-right:var(--padding-md,16px)}.smart-skeleton__avatar--round{border-radius:100%}.smart-skeleton__content{flex:1}.smart-skeleton__avatar+.smart-skeleton__content{padding-top:var(--padding-xs,8px)}.smart-skeleton__row,.smart-skeleton__title{background-color:var(--skeleton-row-background-color,var(--app-B3,#fff));height:var(--skeleton-row-height,16px)}.smart-skeleton__title{margin:0}.smart-skeleton__row:not(:first-child){margin-top:var(--skeleton-row-margin-top,12px)}.smart-skeleton__title+.smart-skeleton__row{margin-top:20px}.smart-skeleton--animate{animation:smart-skeleton-blink 1.2s ease-in-out infinite}@keyframes smart-skeleton-blink{50%{opacity:.
|
1
|
+
@import '../common/index.css';.smart-skeleton{box-sizing:border-box;display:flex;padding:var(--skeleton-padding,0 16px);width:100%}.smart-skeleton__avatar{background-color:var(--skeleton-avatar-background-color,var(--app-B3,#fff));flex-shrink:0;margin-right:var(--padding-md,16px)}.smart-skeleton__avatar--round{border-radius:100%}.smart-skeleton__content{flex:1}.smart-skeleton__avatar+.smart-skeleton__content{padding-top:var(--padding-xs,8px)}.smart-skeleton__row,.smart-skeleton__title{background-color:var(--skeleton-row-background-color,var(--app-B3,#fff));height:var(--skeleton-row-height,16px)}.smart-skeleton__title{margin:0}.smart-skeleton__row:not(:first-child){margin-top:var(--skeleton-row-margin-top,12px)}.smart-skeleton__title+.smart-skeleton__row{margin-top:20px}.smart-skeleton--animate{animation:smart-skeleton-blink 1.2s ease-in-out infinite}@keyframes smart-skeleton-blink{0%{opacity:1;transform:scale(1)}50%{opacity:.4;transform:scale(1.02)}to{opacity:1;transform:scale(1)}}
|
package/dist/skeleton/index.wxss
CHANGED
@@ -1 +1 @@
|
|
1
|
-
@import '../common/index.wxss';.smart-skeleton{box-sizing:border-box;display:flex;padding:var(--skeleton-padding,0 16px);width:100%}.smart-skeleton__avatar{background-color:var(--skeleton-avatar-background-color,var(--app-B3,#fff));flex-shrink:0;margin-right:var(--padding-md,16px)}.smart-skeleton__avatar--round{border-radius:100%}.smart-skeleton__content{flex:1}.smart-skeleton__avatar+.smart-skeleton__content{padding-top:var(--padding-xs,8px)}.smart-skeleton__row,.smart-skeleton__title{background-color:var(--skeleton-row-background-color,var(--app-B3,#fff));height:var(--skeleton-row-height,16px)}.smart-skeleton__title{margin:0}.smart-skeleton__row:not(:first-child){margin-top:var(--skeleton-row-margin-top,12px)}.smart-skeleton__title+.smart-skeleton__row{margin-top:20px}.smart-skeleton--animate{animation:smart-skeleton-blink 1.2s ease-in-out infinite}@keyframes smart-skeleton-blink{50%{opacity:.
|
1
|
+
@import '../common/index.wxss';.smart-skeleton{box-sizing:border-box;display:flex;padding:var(--skeleton-padding,0 16px);width:100%}.smart-skeleton__avatar{background-color:var(--skeleton-avatar-background-color,var(--app-B3,#fff));flex-shrink:0;margin-right:var(--padding-md,16px)}.smart-skeleton__avatar--round{border-radius:100%}.smart-skeleton__content{flex:1}.smart-skeleton__avatar+.smart-skeleton__content{padding-top:var(--padding-xs,8px)}.smart-skeleton__row,.smart-skeleton__title{background-color:var(--skeleton-row-background-color,var(--app-B3,#fff));height:var(--skeleton-row-height,16px)}.smart-skeleton__title{margin:0}.smart-skeleton__row:not(:first-child){margin-top:var(--skeleton-row-margin-top,12px)}.smart-skeleton__title+.smart-skeleton__row{margin-top:20px}.smart-skeleton--animate{animation:smart-skeleton-blink 1.2s ease-in-out infinite}@keyframes smart-skeleton-blink{0%{opacity:1;transform:scale(1)}50%{opacity:.4;transform:scale(1.02)}to{opacity:1;transform:scale(1)}}
|
package/dist/stepper/index.js
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
import { SmartComponent } from '../common/component';
|
2
2
|
import { isDef } from '../common/validator';
|
3
|
-
import
|
4
|
-
import
|
3
|
+
import ty from '../common/ty';
|
4
|
+
import { Minus } from '@tuya-miniapp/icons';
|
5
|
+
import { Plus } from '@tuya-miniapp/icons';
|
5
6
|
const LONG_PRESS_START_TIME = 600;
|
6
7
|
const LONG_PRESS_INTERVAL = 200;
|
7
8
|
// add num and avoid float number
|
@@ -151,7 +152,6 @@ SmartComponent({
|
|
151
152
|
const value = this.format(add(+this.data.currentValue, diff));
|
152
153
|
this.emitChange(value);
|
153
154
|
this.$emit(type);
|
154
|
-
// @ts-ignore
|
155
155
|
ty.vibrateShort({ type: 'light' });
|
156
156
|
},
|
157
157
|
longPressStep() {
|
package/dist/steps/index.js
CHANGED
package/dist/switch/index.css
CHANGED
@@ -1 +1 @@
|
|
1
|
-
@import '../common/index.css';.smart-switch{background-color:var(--switch-background-color,var(--app-B4-N6,rgba(0,0,0,.2)));border-radius:var(--switch-node-size,.867em);height:var(--switch-height,.867em);padding:var(--switch-padding,.08em);transition:background-color var(--switch-transition-duration,.3s);vertical-align:middle;width:var(--switch-width,1.5338em)}.smart-switch,.smart-switch__center{box-sizing:initial;display:inline-block}.smart-switch__center{height:100%;position:relative;vertical-align:top;width:100%}.smart-switch__node{background-color:var(--switch-node-background-color,#fff);border-radius:100%;box-shadow:var(--switch-node-box-shadow,0 3px 1px 0 rgba(0,0,0,.05),0 2px 2px 0 rgba(0,0,0,.1),0 3px 3px 0 rgba(0,0,0,.05));height:var(--switch-node-size,.867em);left:0;position:absolute;top:0;transition:var(--switch-transition-duration,.3s) cubic-bezier(.3,1.05,.4,1.05);width:var(--switch-node-size,.867em);z-index:var(--switch-node-z-index,1)}.smart-switch__loading{left:50%;position:absolute!important;top:50%;transform:translate(-50%,-50%)}.smart-switch--on{background-color:var(--switch-on-background-color,#1989fa)}.smart-switch--on .smart-switch__node{background-color:var(--switch-node-on-background-color,var(--switch-node-background-color,#fff));transform:translateX(calc(var(--switch-width, 1.5338em) - var(--switch-node-size, .867em)))}.smart-switch--disabled{opacity:var(--switch-disabled-opacity,.4)}
|
1
|
+
@import '../common/index.css';.smart-switch{background-color:var(--switch-background-color,var(--app-B4-N6,rgba(0,0,0,.2)));border-radius:var(--switch-node-size,.867em);height:var(--switch-height,.867em);padding:var(--switch-border,var(--switch-padding,.08em));transition:background-color var(--switch-transition-duration,.3s);vertical-align:middle;width:var(--switch-width,1.5338em)}.smart-switch,.smart-switch__center{box-sizing:initial;display:inline-block}.smart-switch__center{height:100%;position:relative;vertical-align:top;width:100%}.smart-switch__node{background-color:var(--switch-node-background-color,#fff);border-radius:100%;box-shadow:var(--switch-node-box-shadow,0 3px 1px 0 rgba(0,0,0,.05),0 2px 2px 0 rgba(0,0,0,.1),0 3px 3px 0 rgba(0,0,0,.05));height:var(--switch-node-size,.867em);left:0;position:absolute;top:0;transition:var(--switch-transition-duration,.3s) cubic-bezier(.3,1.05,.4,1.05);width:var(--switch-node-size,.867em);z-index:var(--switch-node-z-index,1)}.smart-switch__loading{left:50%;position:absolute!important;top:50%;transform:translate(-50%,-50%)}.smart-switch--on{background-color:var(--switch-on-background-color,#1989fa)}.smart-switch--on .smart-switch__node{background-color:var(--switch-node-on-background-color,var(--switch-node-background-color,#fff));transform:translateX(calc(var(--switch-width, 1.5338em) - var(--switch-node-size, .867em)))}.smart-switch--disabled{opacity:var(--switch-disabled-opacity,.4)}
|
package/dist/switch/index.wxss
CHANGED
@@ -1 +1 @@
|
|
1
|
-
@import '../common/index.wxss';.smart-switch{background-color:var(--switch-background-color,var(--app-B4-N6,rgba(0,0,0,.2)));border-radius:var(--switch-node-size,.867em);height:var(--switch-height,.867em);padding:var(--switch-padding,.08em);transition:background-color var(--switch-transition-duration,.3s);vertical-align:middle;width:var(--switch-width,1.5338em)}.smart-switch,.smart-switch__center{box-sizing:initial;display:inline-block}.smart-switch__center{height:100%;position:relative;vertical-align:top;width:100%}.smart-switch__node{background-color:var(--switch-node-background-color,#fff);border-radius:100%;box-shadow:var(--switch-node-box-shadow,0 3px 1px 0 rgba(0,0,0,.05),0 2px 2px 0 rgba(0,0,0,.1),0 3px 3px 0 rgba(0,0,0,.05));height:var(--switch-node-size,.867em);left:0;position:absolute;top:0;transition:var(--switch-transition-duration,.3s) cubic-bezier(.3,1.05,.4,1.05);width:var(--switch-node-size,.867em);z-index:var(--switch-node-z-index,1)}.smart-switch__loading{left:50%;position:absolute!important;top:50%;transform:translate(-50%,-50%)}.smart-switch--on{background-color:var(--switch-on-background-color,#1989fa)}.smart-switch--on .smart-switch__node{background-color:var(--switch-node-on-background-color,var(--switch-node-background-color,#fff));transform:translateX(calc(var(--switch-width, 1.5338em) - var(--switch-node-size, .867em)))}.smart-switch--disabled{opacity:var(--switch-disabled-opacity,.4)}
|
1
|
+
@import '../common/index.wxss';.smart-switch{background-color:var(--switch-background-color,var(--app-B4-N6,rgba(0,0,0,.2)));border-radius:var(--switch-node-size,.867em);height:var(--switch-height,.867em);padding:var(--switch-border,var(--switch-padding,.08em));transition:background-color var(--switch-transition-duration,.3s);vertical-align:middle;width:var(--switch-width,1.5338em)}.smart-switch,.smart-switch__center{box-sizing:initial;display:inline-block}.smart-switch__center{height:100%;position:relative;vertical-align:top;width:100%}.smart-switch__node{background-color:var(--switch-node-background-color,#fff);border-radius:100%;box-shadow:var(--switch-node-box-shadow,0 3px 1px 0 rgba(0,0,0,.05),0 2px 2px 0 rgba(0,0,0,.1),0 3px 3px 0 rgba(0,0,0,.05));height:var(--switch-node-size,.867em);left:0;position:absolute;top:0;transition:var(--switch-transition-duration,.3s) cubic-bezier(.3,1.05,.4,1.05);width:var(--switch-node-size,.867em);z-index:var(--switch-node-z-index,1)}.smart-switch__loading{left:50%;position:absolute!important;top:50%;transform:translate(-50%,-50%)}.smart-switch--on{background-color:var(--switch-on-background-color,#1989fa)}.smart-switch--on .smart-switch__node{background-color:var(--switch-node-on-background-color,var(--switch-node-background-color,#fff));transform:translateX(calc(var(--switch-width, 1.5338em) - var(--switch-node-size, .867em)))}.smart-switch--disabled{opacity:var(--switch-disabled-opacity,.4)}
|
package/dist/tag/index.js
CHANGED
package/dist/toast/icons.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
import Warning from '@tuya-miniapp/icons
|
2
|
-
import CheckmarkCircle from '@tuya-miniapp/icons
|
3
|
-
import Cancel from '@tuya-miniapp/icons
|
1
|
+
import { Warning } from '@tuya-miniapp/icons';
|
2
|
+
import { CheckmarkCircle } from '@tuya-miniapp/icons';
|
3
|
+
import { Cancel } from '@tuya-miniapp/icons';
|
4
4
|
export const Success = CheckmarkCircle;
|
5
5
|
export const Alarm = Warning;
|
6
6
|
export const Error = Cancel;
|
package/dist/toast/index.css
CHANGED
@@ -1 +1 @@
|
|
1
|
-
@import '../common/index.css';.smart-toast{word-wrap:break-word;align-items:center;background-color:var(--toast-background-color,rgba(0,0,0,.7));border-radius:var(--toast-border-radius,10px);box-sizing:initial;color:var(--toast-text-color,#fff);display:flex;flex-direction:column;font-size:var(--toast-font-size,14px);justify-content:center;line-height:var(--toast-line-height,20px);white-space:pre-wrap}.smart-toast__container{left:50%;max-width:var(--toast-max-width,70%);position:fixed;right:-1000px;top:50%;transform:translate(-50%,-50%);width:-webkit-fit-content;width:fit-content}.smart-toast--text{min-width:var(--toast-text-min-width,96px);padding:var(--toast-text-padding,8px 12px)}.smart-toast--icon{min-height:var(--toast-default-min-height,88px);padding:var(--toast-default-padding,16px);width:var(--toast-default-width,88px)}.smart-toast--icon .smart-toast__icon{font-size:var(--toast-icon-size,36px)}.smart-toast--icon .smart-toast__text{padding-top:8px}.smart-toast__loading{margin:10px 0}.smart-toast--top{transform:translateY(-30vh) translate(-50%,-50%)}.smart-toast--bottom{transform:translateY(30vh) translate(-50%,-50%)}
|
1
|
+
@import '../common/index.css';.smart-toast{word-wrap:break-word;align-items:center;background-color:var(--toast-background-color,rgba(0,0,0,.7));border-radius:var(--toast-border-radius,10px);box-sizing:initial;color:var(--toast-text-color,#fff);display:flex;flex-direction:column;font-size:var(--toast-font-size,14px);justify-content:center;line-height:var(--toast-line-height,20px);white-space:pre-wrap}.smart-toast__container{left:50%;max-width:var(--toast-max-width,70%);position:fixed;right:-1000px;top:50%;transform:translate(-50%,-50%);width:-webkit-fit-content;width:fit-content}.smart-toast--text{min-width:var(--toast-text-min-width,96px);padding:var(--toast-text-padding,8px 12px)}.smart-toast--icon{min-height:var(--toast-default-min-height,88px);padding:var(--toast-default-padding,16px);width:var(--toast-default-width,88px)}.smart-toast--icon .smart-toast__icon{font-size:var(--toast-icon-size,36px)}.smart-toast--icon .smart-toast__text{padding-top:8px;text-align:center}.smart-toast__loading{margin:10px 0}.smart-toast--top{transform:translateY(-30vh) translate(-50%,-50%)}.smart-toast--bottom{transform:translateY(30vh) translate(-50%,-50%)}
|
package/dist/toast/index.wxml
CHANGED
@@ -16,7 +16,7 @@
|
|
16
16
|
>
|
17
17
|
|
18
18
|
<!-- text only -->
|
19
|
-
<text wx:if="{{ type === 'text' }}">{{ message }}</text>
|
19
|
+
<text class="smart-toast__text" wx:if="{{ type === 'text' }}">{{ message }}</text>
|
20
20
|
|
21
21
|
<!-- html only -->
|
22
22
|
<rich-text wx:elif="{{ type === 'html' }}" nodes="{{ message }}"></rich-text>
|
package/dist/toast/index.wxss
CHANGED
@@ -1 +1 @@
|
|
1
|
-
@import '../common/index.wxss';.smart-toast{word-wrap:break-word;align-items:center;background-color:var(--toast-background-color,rgba(0,0,0,.7));border-radius:var(--toast-border-radius,10px);box-sizing:initial;color:var(--toast-text-color,#fff);display:flex;flex-direction:column;font-size:var(--toast-font-size,14px);justify-content:center;line-height:var(--toast-line-height,20px);white-space:pre-wrap}.smart-toast__container{left:50%;max-width:var(--toast-max-width,70%);position:fixed;right:-1000px;top:50%;transform:translate(-50%,-50%);width:-webkit-fit-content;width:fit-content}.smart-toast--text{min-width:var(--toast-text-min-width,96px);padding:var(--toast-text-padding,8px 12px)}.smart-toast--icon{min-height:var(--toast-default-min-height,88px);padding:var(--toast-default-padding,16px);width:var(--toast-default-width,88px)}.smart-toast--icon .smart-toast__icon{font-size:var(--toast-icon-size,36px)}.smart-toast--icon .smart-toast__text{padding-top:8px}.smart-toast__loading{margin:10px 0}.smart-toast--top{transform:translateY(-30vh) translate(-50%,-50%)}.smart-toast--bottom{transform:translateY(30vh) translate(-50%,-50%)}
|
1
|
+
@import '../common/index.wxss';.smart-toast{word-wrap:break-word;align-items:center;background-color:var(--toast-background-color,rgba(0,0,0,.7));border-radius:var(--toast-border-radius,10px);box-sizing:initial;color:var(--toast-text-color,#fff);display:flex;flex-direction:column;font-size:var(--toast-font-size,14px);justify-content:center;line-height:var(--toast-line-height,20px);white-space:pre-wrap}.smart-toast__container{left:50%;max-width:var(--toast-max-width,70%);position:fixed;right:-1000px;top:50%;transform:translate(-50%,-50%);width:-webkit-fit-content;width:fit-content}.smart-toast--text{min-width:var(--toast-text-min-width,96px);padding:var(--toast-text-padding,8px 12px)}.smart-toast--icon{min-height:var(--toast-default-min-height,88px);padding:var(--toast-default-padding,16px);width:var(--toast-default-width,88px)}.smart-toast--icon .smart-toast__icon{font-size:var(--toast-icon-size,36px)}.smart-toast--icon .smart-toast__text{padding-top:8px;text-align:center}.smart-toast__loading{margin:10px 0}.smart-toast--top{transform:translateY(-30vh) translate(-50%,-50%)}.smart-toast--bottom{transform:translateY(30vh) translate(-50%,-50%)}
|
package/dist/toast/toast.js
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
import appLog from '../common/appLog';
|
2
2
|
import { getCurrentPage } from '../common/utils';
|
3
3
|
import { isObj } from '../common/validator';
|
4
|
+
import ty from '../common/ty';
|
4
5
|
const defaultOptions = {
|
5
6
|
type: 'text',
|
6
7
|
mask: false,
|
@@ -31,7 +32,6 @@ export const contextRef = {
|
|
31
32
|
value: {},
|
32
33
|
};
|
33
34
|
function Toast(toastOptions) {
|
34
|
-
var _a, _b;
|
35
35
|
const options = Object.assign(Object.assign({}, currentOptions), parseOptions(toastOptions));
|
36
36
|
appLog.info('start open Toast');
|
37
37
|
const context = (typeof options.context === 'function' ? options.context() : options.context) ||
|
@@ -48,11 +48,9 @@ function Toast(toastOptions) {
|
|
48
48
|
delete options.context;
|
49
49
|
delete options.selector;
|
50
50
|
toast.clear = () => {
|
51
|
-
var _a;
|
52
51
|
toast.setData({ show: false });
|
53
52
|
if (options.nativeDisabled) {
|
54
|
-
|
55
|
-
(_a = ty === null || ty === void 0 ? void 0 : ty.nativeDisabled) === null || _a === void 0 ? void 0 : _a.call(ty, false);
|
53
|
+
ty.nativeDisabled(false);
|
56
54
|
}
|
57
55
|
preDisRef.value[options.selector] = false;
|
58
56
|
if (options.onClose) {
|
@@ -62,12 +60,10 @@ function Toast(toastOptions) {
|
|
62
60
|
queueRef.value.push(toast);
|
63
61
|
toast.setData(options);
|
64
62
|
if (options.nativeDisabled) {
|
65
|
-
|
66
|
-
(_a = ty === null || ty === void 0 ? void 0 : ty.nativeDisabled) === null || _a === void 0 ? void 0 : _a.call(ty, true);
|
63
|
+
ty.nativeDisabled(true);
|
67
64
|
}
|
68
65
|
if (preDisRef.value[options.selector] && !options.nativeDisabled) {
|
69
|
-
|
70
|
-
(_b = ty === null || ty === void 0 ? void 0 : ty.nativeDisabled) === null || _b === void 0 ? void 0 : _b.call(ty, false);
|
66
|
+
ty.nativeDisabled(false);
|
71
67
|
}
|
72
68
|
preDisRef.value[options.selector] = options.nativeDisabled || false;
|
73
69
|
clearTimeout(toast.timer);
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import
|
1
|
+
import { Check } from '@tuya-miniapp/icons';
|
2
2
|
import { SmartComponent } from '../common/component';
|
3
3
|
SmartComponent({
|
4
4
|
classes: [
|
@@ -30,7 +30,7 @@ SmartComponent({
|
|
30
30
|
},
|
31
31
|
selectedIcon: {
|
32
32
|
type: String,
|
33
|
-
value:
|
33
|
+
value: Check,
|
34
34
|
},
|
35
35
|
},
|
36
36
|
data: {
|
@@ -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%)
|
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,
|
@@ -15,6 +16,7 @@ var component_1 = require("../common/component");
|
|
15
16
|
type: null,
|
16
17
|
value: 24,
|
17
18
|
},
|
19
|
+
contentHeight: null,
|
18
20
|
round: {
|
19
21
|
type: Boolean,
|
20
22
|
value: true,
|
@@ -37,13 +39,11 @@ var component_1 = require("../common/component");
|
|
37
39
|
},
|
38
40
|
},
|
39
41
|
data: {
|
40
|
-
xmarkIcon:
|
42
|
+
xmarkIcon: icons_1.Xmark,
|
41
43
|
xmarkIconColor: 'rgba(0, 0, 0, 0.5)',
|
42
44
|
},
|
43
45
|
mounted: function () {
|
44
|
-
var
|
45
|
-
// @ts-ignore
|
46
|
-
var themeInfo = (_a = ty === null || ty === void 0 ? void 0 : ty.getThemeInfo()) !== null && _a !== void 0 ? _a : {};
|
46
|
+
var themeInfo = ty_1.default.getThemeInfo() || {};
|
47
47
|
var xmarkIconColor = this.data.iconColor || themeInfo['--app-B4-N3'] || 'rgba(0, 0, 0, 0.5)';
|
48
48
|
this.setData({ xmarkIconColor: xmarkIconColor });
|
49
49
|
},
|
@@ -1,4 +1,5 @@
|
|
1
1
|
<wxs src="../wxs/utils.wxs" module="utils" />
|
2
|
+
<wxs src="./index.wxs" module="computed" />
|
2
3
|
|
3
4
|
<smart-popup
|
4
5
|
show="{{ show }}"
|
@@ -8,6 +9,7 @@
|
|
8
9
|
overlay="{{ overlay }}"
|
9
10
|
custom-class="smart-bottom-sheet custom-class"
|
10
11
|
native-disabled="{{ nativeDisabled }}"
|
12
|
+
customStyle="{{contentHeight ? 'max-height: fit-content;' : ''}}"
|
11
13
|
safe-area-inset-bottom="{{false}}"
|
12
14
|
close-on-click-overlay="{{ closeOnClickOverlay }}"
|
13
15
|
root-portal="{{ rootPortal }}"
|
@@ -23,7 +25,11 @@
|
|
23
25
|
{{ title }}
|
24
26
|
<smart-icon bind:click="onClose" name="{{ xmarkIcon }}" class="smart-bottom-sheet__icon" size="{{ iconSize }}" color="{{ xmarkIconColor }}" />
|
25
27
|
</view>
|
26
|
-
|
28
|
+
|
29
|
+
<view wx:if="{{ contentHeight !== null }}" class="smart-bottom-sheet__content" style="{{computed.getHeight(contentHeight)}}">
|
27
30
|
<slot />
|
28
31
|
</view>
|
32
|
+
<scroll-view wx:else class="smart-bottom-sheet__content">
|
33
|
+
<slot />
|
34
|
+
</scroll-view>
|
29
35
|
</smart-popup>
|
@@ -0,0 +1,12 @@
|
|
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
|
+
};
|
@@ -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%)
|
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/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;
|