@tuya-miniapp/smart-ui 1.3.1-beta-2 → 1.3.1-beta-4
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/action-sheet/demo/index.d.ts +1 -0
- package/dist/action-sheet/demo/index.js +101 -0
- package/dist/action-sheet/index.js +1 -1
- package/dist/area/demo/index.d.ts +1 -0
- package/dist/area/demo/index.js +41 -0
- package/dist/area/index.js +4 -5
- package/dist/battery/demo/index.d.ts +1 -0
- package/dist/battery/demo/index.js +2 -0
- package/dist/battery/index.js +1 -3
- package/dist/bottom-sheet/demo/index.d.ts +1 -0
- package/dist/bottom-sheet/demo/index.js +24 -0
- package/dist/bottom-sheet/index.css +1 -1
- package/dist/bottom-sheet/index.js +3 -2
- package/dist/bottom-sheet/index.wxml +3 -1
- package/dist/bottom-sheet/index.wxss +1 -1
- package/dist/button/demo/index.d.ts +1 -0
- package/dist/button/demo/index.js +9 -0
- package/dist/button/index.js +1 -1
- package/dist/calendar/calendar.wxml +13 -8
- package/dist/calendar/components/header/index.css +1 -1
- package/dist/calendar/components/header/index.js +7 -3
- package/dist/calendar/components/header/index.wxml +3 -3
- package/dist/calendar/components/header/index.wxss +1 -1
- package/dist/calendar/components/month/index.css +1 -1
- package/dist/calendar/components/month/index.js +3 -5
- package/dist/calendar/components/month/index.wxs +1 -4
- package/dist/calendar/components/month/index.wxss +1 -1
- package/dist/calendar/components/month-list/index.css +1 -1
- package/dist/calendar/components/month-list/index.js +26 -41
- package/dist/calendar/components/month-list/index.wxml +8 -2
- package/dist/calendar/components/month-list/index.wxss +1 -1
- package/dist/calendar/components/year-list/index.css +1 -1
- package/dist/calendar/components/year-list/index.js +17 -4
- package/dist/calendar/components/year-list/index.wxml +8 -2
- package/dist/calendar/components/year-list/index.wxss +1 -1
- package/dist/calendar/demo/index.d.ts +1 -0
- package/dist/calendar/demo/index.js +103 -0
- package/dist/calendar/index.js +32 -39
- package/dist/calendar/index.wxs +5 -8
- package/dist/calendar/utils.d.ts +4 -0
- package/dist/calendar/utils.js +30 -4
- package/dist/cascader/demo/index.d.ts +1 -0
- package/dist/cascader/demo/index.js +191 -0
- package/dist/cascader/index.js +3 -3
- package/dist/cell/demo/index.d.ts +1 -0
- package/dist/cell/demo/index.js +14 -0
- package/dist/cell/index.js +1 -7
- package/dist/checkbox/demo/index.d.ts +1 -0
- package/dist/checkbox/demo/index.js +34 -0
- package/dist/checkbox-group/index.js +1 -1
- package/dist/circle/demo/index.d.ts +1 -0
- package/dist/circle/demo/index.js +19 -0
- package/dist/col/demo/index.d.ts +1 -0
- package/dist/col/demo/index.js +4 -0
- package/dist/collapse/demo/index.d.ts +1 -0
- package/dist/collapse/demo/index.js +36 -0
- package/dist/collapse/index.js +1 -1
- package/dist/collapse-item/animate.js +1 -1
- package/dist/common/component.js +1 -1
- package/dist/common/utils.js +3 -3
- package/dist/config-provider/demo/index.d.ts +1 -0
- package/dist/config-provider/demo/index.js +22 -0
- package/dist/count-down/demo/index.d.ts +1 -0
- package/dist/count-down/demo/index.js +33 -0
- package/dist/custom-keyboard/demo/index.d.ts +1 -0
- package/dist/custom-keyboard/demo/index.js +17 -0
- package/dist/custom-keyboard/index.js +1 -3
- package/dist/datetime-picker/demo/index.d.ts +1 -0
- package/dist/datetime-picker/demo/index.js +63 -0
- package/dist/datetime-picker/index.js +4 -5
- package/dist/dialog/demo/index.d.ts +1 -0
- package/dist/dialog/demo/index.js +134 -0
- package/dist/dialog/dialog.js +3 -5
- package/dist/dialog/index.js +1 -1
- package/dist/divider/demo/index.d.ts +1 -0
- package/dist/divider/demo/index.js +4 -0
- package/dist/dropdown-item/index.js +3 -3
- package/dist/dropdown-item/index.wxml +1 -7
- package/dist/dropdown-menu/demo/index.d.ts +1 -0
- package/dist/dropdown-menu/demo/index.js +47 -0
- package/dist/dropdown-menu/index.js +8 -10
- package/dist/empty/demo/index.d.ts +1 -0
- package/dist/empty/demo/index.js +13 -0
- package/dist/empty/index.css +1 -1
- package/dist/empty/index.wxs +1 -1
- package/dist/empty/index.wxss +1 -1
- package/dist/field/demo/index.d.ts +1 -0
- package/dist/field/demo/index.js +21 -0
- package/dist/goods-action/demo/index.d.ts +1 -0
- package/dist/goods-action/demo/index.js +12 -0
- package/dist/goods-action/index.js +1 -1
- package/dist/grid/demo/index.d.ts +1 -0
- package/dist/grid/demo/index.js +9 -0
- package/dist/grid/index.js +1 -1
- package/dist/grid-item/index.js +1 -1
- package/dist/icon/demo/index.d.ts +1 -0
- package/dist/icon/demo/index.js +26 -0
- package/dist/image/demo/index.d.ts +1 -0
- package/dist/image/demo/index.js +15 -0
- package/dist/index-anchor/index.js +1 -1
- package/dist/index-bar/demo/index.d.ts +1 -0
- package/dist/index-bar/demo/index.js +21 -0
- package/dist/index-bar/index.js +9 -16
- package/dist/loading/demo/index.d.ts +1 -0
- package/dist/loading/demo/index.js +4 -0
- package/dist/loading/index.js +25 -1
- package/dist/loading/index.wxml +2 -2
- package/dist/loading/index.wxs +6 -21
- package/dist/mixins/basic.js +2 -2
- package/dist/mixins/link.js +1 -2
- package/dist/mixins/page-scroll.js +1 -1
- package/dist/mixins/touch.js +1 -2
- package/dist/mixins/transition.js +1 -1
- package/dist/nav-bar/demo/index.d.ts +1 -0
- package/dist/nav-bar/demo/index.js +26 -0
- package/dist/nav-bar/index.css +1 -1
- package/dist/nav-bar/index.js +1 -1
- package/dist/nav-bar/index.wxml +1 -1
- package/dist/nav-bar/index.wxss +1 -1
- package/dist/normal-slider/demo/index.d.ts +1 -0
- package/dist/normal-slider/demo/index.js +19 -0
- package/dist/notice-bar/demo/index.d.ts +1 -0
- package/dist/notice-bar/demo/index.js +11 -0
- package/dist/notice-bar/index.css +1 -1
- package/dist/notice-bar/index.js +3 -6
- package/dist/notice-bar/index.wxml +1 -5
- package/dist/notice-bar/index.wxss +1 -1
- package/dist/notify/demo/index.d.ts +1 -0
- package/dist/notify/demo/index.js +45 -0
- package/dist/overlay/demo/index.d.ts +1 -0
- package/dist/overlay/demo/index.js +22 -0
- package/dist/picker/demo/index.d.ts +1 -0
- package/dist/picker/demo/index.js +76 -0
- package/dist/picker/index.css +1 -1
- package/dist/picker/index.js +2 -2
- package/dist/picker/index.wxml +1 -0
- package/dist/picker/index.wxss +1 -1
- package/dist/picker-column/index.js +3 -8
- package/dist/popup/demo/index.d.ts +1 -0
- package/dist/popup/demo/index.js +79 -0
- package/dist/progress/demo/index.d.ts +1 -0
- package/dist/progress/demo/index.js +4 -0
- package/dist/progress/index.js +1 -4
- package/dist/radio/demo/index.d.ts +1 -0
- package/dist/radio/demo/index.js +31 -0
- package/dist/radio-group/index.js +1 -1
- package/dist/rate/demo/index.d.ts +1 -0
- package/dist/rate/demo/index.js +25 -0
- package/dist/rate/index.js +2 -2
- package/dist/row/index.js +1 -1
- package/dist/search/demo/index.d.ts +1 -0
- package/dist/search/demo/index.js +43 -0
- package/dist/search/index.css +1 -1
- package/dist/search/index.js +1 -5
- package/dist/search/index.wxml +1 -1
- package/dist/search/index.wxss +1 -1
- package/dist/sidebar/demo/index.d.ts +1 -0
- package/dist/sidebar/demo/index.js +9 -0
- package/dist/skeleton/demo/index.d.ts +1 -0
- package/dist/skeleton/demo/index.js +11 -0
- package/dist/slider/demo/index.d.ts +1 -0
- package/dist/slider/demo/index.js +19 -0
- package/dist/slider/index.js +5 -7
- package/dist/stepper/demo/index.d.ts +1 -0
- package/dist/stepper/demo/index.js +19 -0
- package/dist/steps/demo/index.d.ts +1 -0
- package/dist/steps/demo/index.js +42 -0
- package/dist/sticky/demo/index.d.ts +1 -0
- package/dist/sticky/demo/index.js +26 -0
- package/dist/sticky/index.js +2 -2
- package/dist/swipe-cell/demo/index.d.ts +1 -0
- package/dist/swipe-cell/demo/index.js +45 -0
- package/dist/swipe-cell/index.js +3 -5
- package/dist/switch/demo/index.d.ts +1 -0
- package/dist/switch/demo/index.js +29 -0
- package/dist/switch/index.css +1 -1
- package/dist/switch/index.wxss +1 -1
- package/dist/tab/demo/index.d.ts +1 -0
- package/dist/tab/demo/index.js +55 -0
- package/dist/tabbar/demo/index.d.ts +1 -0
- package/dist/tabbar/demo/index.js +34 -0
- package/dist/tabbar/index.js +1 -1
- package/dist/tabs/index.css +1 -1
- package/dist/tabs/index.js +7 -25
- package/dist/tabs/index.wxss +1 -1
- package/dist/tag/demo/index.d.ts +1 -0
- package/dist/tag/demo/index.js +16 -0
- package/dist/tag/index.css +1 -1
- package/dist/tag/index.wxss +1 -1
- package/dist/toast/demo/index.d.ts +1 -0
- package/dist/toast/demo/index.js +67 -0
- package/dist/toast/toast.js +5 -5
- package/dist/transition/demo/index.d.ts +1 -0
- package/dist/transition/demo/index.js +67 -0
- package/dist/tree-select/demo/index.d.ts +1 -0
- package/dist/tree-select/demo/index.js +113 -0
- package/dist/wxs/style.wxs +0 -7
- package/lib/action-sheet/demo/index.d.ts +1 -0
- package/lib/action-sheet/demo/index.js +115 -0
- package/lib/area/demo/index.d.ts +1 -0
- package/lib/area/demo/index.js +47 -0
- package/lib/area/index.js +1 -2
- package/lib/battery/demo/index.d.ts +1 -0
- package/lib/battery/demo/index.js +4 -0
- package/lib/battery/index.js +1 -3
- package/lib/bottom-sheet/demo/index.d.ts +1 -0
- package/lib/bottom-sheet/demo/index.js +27 -0
- package/lib/bottom-sheet/index.css +1 -1
- package/lib/bottom-sheet/index.js +3 -2
- package/lib/bottom-sheet/index.wxml +3 -1
- package/lib/bottom-sheet/index.wxss +1 -1
- package/lib/button/demo/index.d.ts +1 -0
- package/lib/button/demo/index.js +14 -0
- package/lib/calendar/calendar.wxml +13 -8
- package/lib/calendar/components/header/index.css +1 -1
- package/lib/calendar/components/header/index.js +6 -2
- package/lib/calendar/components/header/index.wxml +3 -3
- package/lib/calendar/components/header/index.wxss +1 -1
- package/lib/calendar/components/month/index.css +1 -1
- package/lib/calendar/components/month/index.js +2 -6
- package/lib/calendar/components/month/index.wxs +1 -4
- package/lib/calendar/components/month/index.wxss +1 -1
- package/lib/calendar/components/month-list/index.css +1 -1
- package/lib/calendar/components/month-list/index.js +25 -40
- package/lib/calendar/components/month-list/index.wxml +8 -2
- package/lib/calendar/components/month-list/index.wxss +1 -1
- package/lib/calendar/components/year-list/index.css +1 -1
- package/lib/calendar/components/year-list/index.js +15 -2
- package/lib/calendar/components/year-list/index.wxml +8 -2
- package/lib/calendar/components/year-list/index.wxss +1 -1
- package/lib/calendar/demo/index.d.ts +1 -0
- package/lib/calendar/demo/index.js +105 -0
- package/lib/calendar/index.js +29 -38
- package/lib/calendar/index.wxs +5 -8
- package/lib/calendar/utils.d.ts +4 -0
- package/lib/calendar/utils.js +31 -4
- package/lib/cascader/demo/index.d.ts +1 -0
- package/lib/cascader/demo/index.js +197 -0
- package/lib/cell/demo/index.d.ts +1 -0
- package/lib/cell/demo/index.js +39 -0
- package/lib/cell/index.js +1 -7
- package/lib/checkbox/demo/index.d.ts +1 -0
- package/lib/checkbox/demo/index.js +38 -0
- package/lib/circle/demo/index.d.ts +1 -0
- package/lib/circle/demo/index.js +21 -0
- package/lib/col/demo/index.d.ts +1 -0
- package/lib/col/demo/index.js +6 -0
- package/lib/collapse/demo/index.d.ts +1 -0
- package/lib/collapse/demo/index.js +42 -0
- package/lib/config-provider/demo/index.d.ts +1 -0
- package/lib/config-provider/demo/index.js +24 -0
- package/lib/count-down/demo/index.d.ts +1 -0
- package/lib/count-down/demo/index.js +38 -0
- package/lib/custom-keyboard/demo/index.d.ts +1 -0
- package/lib/custom-keyboard/demo/index.js +19 -0
- package/lib/custom-keyboard/index.js +1 -3
- package/lib/datetime-picker/demo/index.d.ts +1 -0
- package/lib/datetime-picker/demo/index.js +68 -0
- package/lib/datetime-picker/index.js +4 -3
- package/lib/dialog/demo/index.d.ts +1 -0
- package/lib/dialog/demo/index.js +144 -0
- package/lib/dialog/dialog.js +1 -3
- package/lib/divider/demo/index.d.ts +1 -0
- package/lib/divider/demo/index.js +6 -0
- package/lib/dropdown-item/index.wxml +1 -7
- package/lib/dropdown-menu/demo/index.d.ts +1 -0
- package/lib/dropdown-menu/demo/index.js +52 -0
- package/lib/dropdown-menu/index.js +2 -4
- package/lib/empty/demo/index.d.ts +1 -0
- package/lib/empty/demo/index.js +15 -0
- package/lib/empty/index.css +1 -1
- package/lib/empty/index.wxs +1 -1
- package/lib/empty/index.wxss +1 -1
- package/lib/field/demo/index.d.ts +1 -0
- package/lib/field/demo/index.js +23 -0
- package/lib/goods-action/demo/index.d.ts +1 -0
- package/lib/goods-action/demo/index.js +17 -0
- package/lib/grid/demo/index.d.ts +1 -0
- package/lib/grid/demo/index.js +11 -0
- package/lib/icon/demo/index.d.ts +1 -0
- package/lib/icon/demo/index.js +54 -0
- package/lib/image/demo/index.d.ts +1 -0
- package/lib/image/demo/index.js +17 -0
- package/lib/index-bar/demo/index.d.ts +1 -0
- package/lib/index-bar/demo/index.js +23 -0
- package/lib/index-bar/index.js +3 -10
- package/lib/loading/demo/index.d.ts +1 -0
- package/lib/loading/demo/index.js +6 -0
- package/lib/loading/index.js +27 -1
- package/lib/loading/index.wxml +2 -2
- package/lib/loading/index.wxs +6 -21
- package/lib/mixins/link.js +1 -2
- package/lib/mixins/touch.js +1 -2
- package/lib/nav-bar/demo/index.d.ts +1 -0
- package/lib/nav-bar/demo/index.js +31 -0
- package/lib/nav-bar/index.css +1 -1
- package/lib/nav-bar/index.wxml +1 -1
- package/lib/nav-bar/index.wxss +1 -1
- package/lib/normal-slider/demo/index.d.ts +1 -0
- package/lib/normal-slider/demo/index.js +21 -0
- package/lib/notice-bar/demo/index.d.ts +1 -0
- package/lib/notice-bar/demo/index.js +16 -0
- package/lib/notice-bar/index.css +1 -1
- package/lib/notice-bar/index.js +2 -5
- package/lib/notice-bar/index.wxml +1 -5
- package/lib/notice-bar/index.wxss +1 -1
- package/lib/notify/demo/index.d.ts +1 -0
- package/lib/notify/demo/index.js +50 -0
- package/lib/overlay/demo/index.d.ts +1 -0
- package/lib/overlay/demo/index.js +24 -0
- package/lib/picker/demo/index.d.ts +1 -0
- package/lib/picker/demo/index.js +82 -0
- package/lib/picker/index.css +1 -1
- package/lib/picker/index.js +1 -3
- package/lib/picker/index.wxml +1 -0
- package/lib/picker/index.wxss +1 -1
- package/lib/picker-column/index.js +2 -7
- package/lib/popup/demo/index.d.ts +1 -0
- package/lib/popup/demo/index.js +85 -0
- package/lib/progress/demo/index.d.ts +1 -0
- package/lib/progress/demo/index.js +6 -0
- package/lib/progress/index.js +1 -4
- package/lib/radio/demo/index.d.ts +1 -0
- package/lib/radio/demo/index.js +34 -0
- package/lib/rate/demo/index.d.ts +1 -0
- package/lib/rate/demo/index.js +30 -0
- package/lib/search/demo/index.d.ts +1 -0
- package/lib/search/demo/index.js +48 -0
- package/lib/search/index.css +1 -1
- package/lib/search/index.js +1 -5
- package/lib/search/index.wxml +1 -1
- package/lib/search/index.wxss +1 -1
- package/lib/sidebar/demo/index.d.ts +1 -0
- package/lib/sidebar/demo/index.js +14 -0
- package/lib/skeleton/demo/index.d.ts +1 -0
- package/lib/skeleton/demo/index.js +14 -0
- package/lib/slider/demo/index.d.ts +1 -0
- package/lib/slider/demo/index.js +21 -0
- package/lib/slider/index.js +1 -3
- package/lib/stepper/demo/index.d.ts +1 -0
- package/lib/stepper/demo/index.js +25 -0
- package/lib/steps/demo/index.d.ts +1 -0
- package/lib/steps/demo/index.js +47 -0
- package/lib/sticky/demo/index.d.ts +1 -0
- package/lib/sticky/demo/index.js +30 -0
- package/lib/sticky/index.js +3 -1
- package/lib/swipe-cell/demo/index.d.ts +1 -0
- package/lib/swipe-cell/demo/index.js +50 -0
- package/lib/swipe-cell/index.js +1 -3
- package/lib/switch/demo/index.d.ts +1 -0
- package/lib/switch/demo/index.js +37 -0
- package/lib/switch/index.css +1 -1
- package/lib/switch/index.wxss +1 -1
- package/lib/tab/demo/index.d.ts +1 -0
- package/lib/tab/demo/index.js +57 -0
- package/lib/tabbar/demo/index.d.ts +1 -0
- package/lib/tabbar/demo/index.js +41 -0
- package/lib/tabs/index.css +1 -1
- package/lib/tabs/index.js +6 -24
- package/lib/tabs/index.wxss +1 -1
- package/lib/tag/demo/index.d.ts +1 -0
- package/lib/tag/demo/index.js +19 -0
- package/lib/tag/index.css +1 -1
- package/lib/tag/index.wxss +1 -1
- package/lib/toast/demo/index.d.ts +1 -0
- package/lib/toast/demo/index.js +74 -0
- package/lib/toast/toast.js +3 -3
- package/lib/transition/demo/index.d.ts +1 -0
- package/lib/transition/demo/index.js +71 -0
- package/lib/tree-select/demo/index.d.ts +1 -0
- package/lib/tree-select/demo/index.js +130 -0
- package/lib/wxs/style.wxs +0 -7
- package/package.json +15 -3
@@ -0,0 +1,79 @@
|
|
1
|
+
import rightIcon from '@tuya-miniapp/icons/dist/svg/Right';
|
2
|
+
import { SmartComponent } from '../../common/component';
|
3
|
+
SmartComponent({
|
4
|
+
data: {
|
5
|
+
show: {
|
6
|
+
basic: false,
|
7
|
+
top: false,
|
8
|
+
bottom: false,
|
9
|
+
left: false,
|
10
|
+
right: false,
|
11
|
+
round: false,
|
12
|
+
closeIcon: false,
|
13
|
+
customCloseIcon: false,
|
14
|
+
customIconPosition: false,
|
15
|
+
},
|
16
|
+
rightIcon,
|
17
|
+
},
|
18
|
+
methods: {
|
19
|
+
toggle(type, show) {
|
20
|
+
this.setData({
|
21
|
+
[`show.${type}`]: show,
|
22
|
+
});
|
23
|
+
},
|
24
|
+
showBasic() {
|
25
|
+
this.toggle('basic', true);
|
26
|
+
},
|
27
|
+
hideBasic() {
|
28
|
+
this.toggle('basic', false);
|
29
|
+
},
|
30
|
+
showTop() {
|
31
|
+
this.toggle('top', true);
|
32
|
+
},
|
33
|
+
hideTop() {
|
34
|
+
this.toggle('top', false);
|
35
|
+
},
|
36
|
+
showLeft() {
|
37
|
+
this.toggle('left', true);
|
38
|
+
},
|
39
|
+
hideLeft() {
|
40
|
+
this.toggle('left', false);
|
41
|
+
},
|
42
|
+
showRight() {
|
43
|
+
this.toggle('right', true);
|
44
|
+
},
|
45
|
+
hideRight() {
|
46
|
+
this.toggle('right', false);
|
47
|
+
},
|
48
|
+
showBottom() {
|
49
|
+
this.toggle('bottom', true);
|
50
|
+
},
|
51
|
+
hideBottom() {
|
52
|
+
this.toggle('bottom', false);
|
53
|
+
},
|
54
|
+
showRound() {
|
55
|
+
this.toggle('round', true);
|
56
|
+
},
|
57
|
+
hideRound() {
|
58
|
+
this.toggle('round', false);
|
59
|
+
},
|
60
|
+
showCloseIcon() {
|
61
|
+
this.toggle('closeIcon', true);
|
62
|
+
},
|
63
|
+
hideCloseIcon() {
|
64
|
+
this.toggle('closeIcon', false);
|
65
|
+
},
|
66
|
+
showCustomCloseIcon() {
|
67
|
+
this.toggle('customCloseIcon', true);
|
68
|
+
},
|
69
|
+
hideCustomCloseIcon() {
|
70
|
+
this.toggle('customCloseIcon', false);
|
71
|
+
},
|
72
|
+
showCustomIconPosition() {
|
73
|
+
this.toggle('customIconPosition', true);
|
74
|
+
},
|
75
|
+
hideCustomIconPosition() {
|
76
|
+
this.toggle('customIconPosition', false);
|
77
|
+
},
|
78
|
+
},
|
79
|
+
});
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
package/dist/progress/index.js
CHANGED
@@ -36,10 +36,7 @@ SmartComponent({
|
|
36
36
|
},
|
37
37
|
methods: {
|
38
38
|
setLeft() {
|
39
|
-
Promise.all([
|
40
|
-
getRect(this, '.smart-progress'),
|
41
|
-
getRect(this, '.smart-progress__pivot'),
|
42
|
-
]).then(([portion, pivot]) => {
|
39
|
+
Promise.all([getRect(this, '.smart-progress'), getRect(this, '.smart-progress__pivot')]).then(([portion, pivot]) => {
|
43
40
|
if (portion && pivot) {
|
44
41
|
this.setData({
|
45
42
|
right: (pivot.width * (this.data.percentage - 100)) / 100,
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1,31 @@
|
|
1
|
+
import { SmartComponent } from '../../common/component';
|
2
|
+
SmartComponent({
|
3
|
+
data: {
|
4
|
+
radioBasic: '1',
|
5
|
+
radioDisabled: '2',
|
6
|
+
radioColor: '1',
|
7
|
+
radioText: '1',
|
8
|
+
radioHoriz: '1',
|
9
|
+
radioIcon: '1',
|
10
|
+
radioSize: '1',
|
11
|
+
radioLabel: '1',
|
12
|
+
radioShape: '1',
|
13
|
+
radioCell: '1',
|
14
|
+
icon: {
|
15
|
+
normal: 'https://images.tuyacn.com/content-platform/hestia/1729664215ebd89f13e54.png',
|
16
|
+
active: 'https://images.tuyacn.com/content-platform/hestia/1730877912e76cbdb7563.png',
|
17
|
+
},
|
18
|
+
},
|
19
|
+
methods: {
|
20
|
+
onChange(event) {
|
21
|
+
const { key } = event.currentTarget.dataset;
|
22
|
+
this.setData({ [key]: event.detail });
|
23
|
+
},
|
24
|
+
onClick(event) {
|
25
|
+
const { name } = event.currentTarget.dataset;
|
26
|
+
this.setData({
|
27
|
+
radioCell: name,
|
28
|
+
});
|
29
|
+
},
|
30
|
+
},
|
31
|
+
});
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1,25 @@
|
|
1
|
+
import Icloud from '@tuya-miniapp/icons/dist/svg/Icloud';
|
2
|
+
import XmarkIcloud from '@tuya-miniapp/icons/dist/svg/XmarkIcloud';
|
3
|
+
import { SmartComponent } from '../../common/component';
|
4
|
+
import Toast from '../../toast/toast';
|
5
|
+
SmartComponent({
|
6
|
+
data: {
|
7
|
+
value1: 3,
|
8
|
+
value2: 3,
|
9
|
+
value3: 3,
|
10
|
+
value4: 2.5,
|
11
|
+
value5: 4,
|
12
|
+
value6: 3,
|
13
|
+
value8: 2,
|
14
|
+
icon: Icloud,
|
15
|
+
voidIcon: XmarkIcloud,
|
16
|
+
},
|
17
|
+
methods: {
|
18
|
+
onChange(event) {
|
19
|
+
Toast({
|
20
|
+
context: this,
|
21
|
+
message: I18n.t('currentValue') + event.detail,
|
22
|
+
});
|
23
|
+
},
|
24
|
+
},
|
25
|
+
});
|
package/dist/rate/index.js
CHANGED
@@ -76,10 +76,10 @@ SmartComponent({
|
|
76
76
|
if (!touchable)
|
77
77
|
return;
|
78
78
|
const { clientX } = event.touches[0];
|
79
|
-
getAllRect(this, '.smart-rate__icon').then(
|
79
|
+
getAllRect(this, '.smart-rate__icon').then(list => {
|
80
80
|
const target = list
|
81
81
|
.sort((cur, next) => cur.dataset.score - next.dataset.score)
|
82
|
-
.find(
|
82
|
+
.find(item => clientX >= item.left && clientX <= item.right);
|
83
83
|
if (target != null) {
|
84
84
|
this.onSelect(Object.assign(Object.assign({}, event), { currentTarget: target }));
|
85
85
|
}
|
package/dist/row/index.js
CHANGED
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1,43 @@
|
|
1
|
+
import { SmartComponent } from '../../common/component';
|
2
|
+
import TriangleDown from '@tuya-miniapp/icons/dist/svg/TriangleDown';
|
3
|
+
SmartComponent({
|
4
|
+
data: {
|
5
|
+
value: '',
|
6
|
+
icon: TriangleDown,
|
7
|
+
},
|
8
|
+
methods: {
|
9
|
+
onChange(e) {
|
10
|
+
this.setData({
|
11
|
+
value: e.detail,
|
12
|
+
});
|
13
|
+
},
|
14
|
+
onSearch(event) {
|
15
|
+
if (event.detail) {
|
16
|
+
wx.showToast({
|
17
|
+
title: I18n.t('searchText') + ': ' + event.detail,
|
18
|
+
icon: 'none',
|
19
|
+
});
|
20
|
+
}
|
21
|
+
},
|
22
|
+
onClick() {
|
23
|
+
if (this.data.value) {
|
24
|
+
wx.showToast({
|
25
|
+
title: I18n.t('searchText') + ': ' + this.data.value,
|
26
|
+
icon: 'none',
|
27
|
+
});
|
28
|
+
}
|
29
|
+
},
|
30
|
+
onCancel() {
|
31
|
+
wx.showToast({
|
32
|
+
title: I18n.t('cancel'),
|
33
|
+
icon: 'none',
|
34
|
+
});
|
35
|
+
},
|
36
|
+
onClear() {
|
37
|
+
wx.showToast({
|
38
|
+
title: I18n.t('clear'),
|
39
|
+
icon: 'none',
|
40
|
+
});
|
41
|
+
},
|
42
|
+
},
|
43
|
+
});
|
package/dist/search/index.css
CHANGED
@@ -1 +1 @@
|
|
1
|
-
@import '../common/index.css';.smart-search{align-items:center;background-color:var(--search-background-color,var(--app-B3,#fff));box-sizing:border-box;display:flex;padding:var(--search-padding,12px 16px)}.smart-search__content{align-items:center;background-color:var(--search-body-background-color,var(--app-B4-N9,rgba(0,0,0,.05)));display:flex;flex:1;flex-direction:row;padding:12px 16px}.smart-search__content--round{border-radius:999px}.smart-search__label{color:var(--search-label-color,var(--app-B4-N1,#000));font-size:var(--search-label-font-size,14px);line-height:var(--search-input-height,24px);padding:var(--search-label-padding,0 5px)}.smart-search__field{flex:1}.smart-search__field__left-icon{--icon-color:var(--search-left-icon-color,var(--app-B4-N4,rgba(0,0,0,.4)));margin-left:2px}.smart-search__input{font-size:var(--search-value-font-size,14px)}.smart-search--withaction{padding-right:0}.smart-search__action{color:var(--search-action-text-color,var(--app-B4-N3,rgba(0,0,0,.5)));font-size:var(--search-action-font-size,14px);line-height:var(--search-input-height,24px)}.smart-search__action--hover{background-color:var(--app-B4-N9,rgba(0,0,0,.05));opacity
|
1
|
+
@import '../common/index.css';.smart-search{align-items:center;background-color:var(--search-background-color,var(--app-B3,#fff));box-sizing:border-box;display:flex;padding:var(--search-padding,12px 16px)}.smart-search__content{align-items:center;background-color:var(--search-body-background-color,var(--app-B4-N9,rgba(0,0,0,.05)));display:flex;flex:1;flex-direction:row;padding:12px 16px}.smart-search__content--round{border-radius:999px}.smart-search__label{color:var(--search-label-color,var(--app-B4-N1,#000));font-size:var(--search-label-font-size,14px);line-height:var(--search-input-height,24px);padding:var(--search-label-padding,0 5px)}.smart-search__field{flex:1}.smart-search__field__left-icon{--icon-color:var(--search-left-icon-color,var(--app-B4-N4,rgba(0,0,0,.4)));margin-left:2px}.smart-search__input{font-size:var(--search-value-font-size,14px)}.smart-search--withaction{padding-right:0}.smart-search__action{color:var(--search-action-text-color,var(--app-B4-N3,rgba(0,0,0,.5)));font-size:var(--search-action-font-size,14px);line-height:var(--search-input-height,24px)}.smart-search__action--hover{background-color:var(--app-B4-N9,rgba(0,0,0,.05));opacity:var(--search-btn-hover-opacity,.4)}.smart-search__action-button{padding:var(--search-action-padding,0 16px 0 12px)}.smart-search__hover{background-color:var(--app-B4-N9,rgba(0,0,0,.05));opacity:var(--search-btn-hover-opacity,.4)}.smart-search__submit{align-items:center;color:var(--search-submit-color,var(--app-M1,#3678e3));display:flex;flex-direction:row;font-size:var(--search-submit-font-size,14px)}.smart-search__submit:before{background-color:var(--search-submit-color,var(--app-M1,#3678e3));content:"";display:block;height:var(--search-submit-line-height,12px);margin-right:12px;width:var(--search-submit-line-width,1px)}
|
package/dist/search/index.js
CHANGED
@@ -27,11 +27,7 @@ SmartComponent({
|
|
27
27
|
rightIcon: String,
|
28
28
|
placeholder: String,
|
29
29
|
placeholderStyle: String,
|
30
|
-
searchText:
|
31
|
-
type: String,
|
32
|
-
value: 'Search',
|
33
|
-
},
|
34
|
-
showSearchButton: Boolean,
|
30
|
+
searchText: String,
|
35
31
|
background: String,
|
36
32
|
actionText: {
|
37
33
|
type: String,
|
package/dist/search/index.wxml
CHANGED
@@ -40,7 +40,7 @@
|
|
40
40
|
<smart-icon wx:if="{{ !useLeftIconSlot && leftIcon }}" size="18" name="{{ leftIcon }}" custom-class="smart-search__field__left-icon" slot="left-icon" />
|
41
41
|
<slot wx:if="{{ useLeftIconSlot }}" name="left-icon" slot="left-icon" />
|
42
42
|
<slot wx:if="{{ useRightIconSlot }}" name="right-icon" slot="right-icon" />
|
43
|
-
<view wx:if="{{
|
43
|
+
<view wx:if="{{ searchText }}" hover-class="smart-search__hover" bind:tap="goSearch" class="smart-search__submit" slot="button" >{{ searchText }}</view>
|
44
44
|
<slot name="search-button" slot="button" />
|
45
45
|
</smart-field>
|
46
46
|
</view>
|
package/dist/search/index.wxss
CHANGED
@@ -1 +1 @@
|
|
1
|
-
@import '../common/index.wxss';.smart-search{align-items:center;background-color:var(--search-background-color,var(--app-B3,#fff));box-sizing:border-box;display:flex;padding:var(--search-padding,12px 16px)}.smart-search__content{align-items:center;background-color:var(--search-body-background-color,var(--app-B4-N9,rgba(0,0,0,.05)));display:flex;flex:1;flex-direction:row;padding:12px 16px}.smart-search__content--round{border-radius:999px}.smart-search__label{color:var(--search-label-color,var(--app-B4-N1,#000));font-size:var(--search-label-font-size,14px);line-height:var(--search-input-height,24px);padding:var(--search-label-padding,0 5px)}.smart-search__field{flex:1}.smart-search__field__left-icon{--icon-color:var(--search-left-icon-color,var(--app-B4-N4,rgba(0,0,0,.4)));margin-left:2px}.smart-search__input{font-size:var(--search-value-font-size,14px)}.smart-search--withaction{padding-right:0}.smart-search__action{color:var(--search-action-text-color,var(--app-B4-N3,rgba(0,0,0,.5)));font-size:var(--search-action-font-size,14px);line-height:var(--search-input-height,24px)}.smart-search__action--hover{background-color:var(--app-B4-N9,rgba(0,0,0,.05));opacity
|
1
|
+
@import '../common/index.wxss';.smart-search{align-items:center;background-color:var(--search-background-color,var(--app-B3,#fff));box-sizing:border-box;display:flex;padding:var(--search-padding,12px 16px)}.smart-search__content{align-items:center;background-color:var(--search-body-background-color,var(--app-B4-N9,rgba(0,0,0,.05)));display:flex;flex:1;flex-direction:row;padding:12px 16px}.smart-search__content--round{border-radius:999px}.smart-search__label{color:var(--search-label-color,var(--app-B4-N1,#000));font-size:var(--search-label-font-size,14px);line-height:var(--search-input-height,24px);padding:var(--search-label-padding,0 5px)}.smart-search__field{flex:1}.smart-search__field__left-icon{--icon-color:var(--search-left-icon-color,var(--app-B4-N4,rgba(0,0,0,.4)));margin-left:2px}.smart-search__input{font-size:var(--search-value-font-size,14px)}.smart-search--withaction{padding-right:0}.smart-search__action{color:var(--search-action-text-color,var(--app-B4-N3,rgba(0,0,0,.5)));font-size:var(--search-action-font-size,14px);line-height:var(--search-input-height,24px)}.smart-search__action--hover{background-color:var(--app-B4-N9,rgba(0,0,0,.05));opacity:var(--search-btn-hover-opacity,.4)}.smart-search__action-button{padding:var(--search-action-padding,0 16px 0 12px)}.smart-search__hover{background-color:var(--app-B4-N9,rgba(0,0,0,.05));opacity:var(--search-btn-hover-opacity,.4)}.smart-search__submit{align-items:center;color:var(--search-submit-color,var(--app-M1,#3678e3));display:flex;flex-direction:row;font-size:var(--search-submit-font-size,14px)}.smart-search__submit:before{background-color:var(--search-submit-color,var(--app-M1,#3678e3));content:"";display:block;height:var(--search-submit-line-height,12px);margin-right:12px;width:var(--search-submit-line-width,1px)}
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import { SmartComponent } from '../../common/component';
|
2
|
+
SmartComponent({
|
3
|
+
data: {
|
4
|
+
currentValue: 50,
|
5
|
+
},
|
6
|
+
methods: {
|
7
|
+
onChange(event) {
|
8
|
+
wx.showToast({
|
9
|
+
icon: 'none',
|
10
|
+
title: `${I18n.t('currentValue')}${event.detail}`,
|
11
|
+
});
|
12
|
+
},
|
13
|
+
onDrag(event) {
|
14
|
+
this.setData({
|
15
|
+
currentValue: event.detail.value,
|
16
|
+
});
|
17
|
+
},
|
18
|
+
},
|
19
|
+
});
|
package/dist/slider/index.js
CHANGED
@@ -57,7 +57,7 @@ SmartComponent({
|
|
57
57
|
this.startValue = this.format(this.value);
|
58
58
|
this.newValue = this.value;
|
59
59
|
if (this.isRange(this.newValue)) {
|
60
|
-
this.startValue = this.newValue.map(
|
60
|
+
this.startValue = this.newValue.map(val => this.format(val));
|
61
61
|
}
|
62
62
|
else {
|
63
63
|
this.startValue = this.format(this.newValue);
|
@@ -72,7 +72,7 @@ SmartComponent({
|
|
72
72
|
}
|
73
73
|
this.touchMove(event);
|
74
74
|
this.dragStatus = DRAG_STATUS.MOVING;
|
75
|
-
getRect(this, '.smart-slider').then(
|
75
|
+
getRect(this, '.smart-slider').then(rect => {
|
76
76
|
const { vertical } = this.data;
|
77
77
|
const delta = vertical ? this.deltaY : this.deltaX;
|
78
78
|
const total = vertical ? rect.height : rect.width;
|
@@ -102,12 +102,10 @@ SmartComponent({
|
|
102
102
|
if (this.data.disabled)
|
103
103
|
return;
|
104
104
|
const { min } = this.data;
|
105
|
-
getRect(this, '.smart-slider').then(
|
105
|
+
getRect(this, '.smart-slider').then(rect => {
|
106
106
|
const { vertical } = this.data;
|
107
107
|
const touch = event.touches[0];
|
108
|
-
const delta = vertical
|
109
|
-
? touch.clientY - rect.top
|
110
|
-
: touch.clientX - rect.left;
|
108
|
+
const delta = vertical ? touch.clientY - rect.top : touch.clientX - rect.left;
|
111
109
|
const total = vertical ? rect.height : rect.width;
|
112
110
|
const value = Number(min) + (delta / total) * this.getRange();
|
113
111
|
if (this.isRange(this.value)) {
|
@@ -137,7 +135,7 @@ SmartComponent({
|
|
137
135
|
},
|
138
136
|
updateValue(value, end, drag) {
|
139
137
|
if (this.isRange(value)) {
|
140
|
-
value = this.handleOverlap(value).map(
|
138
|
+
value = this.handleOverlap(value).map(val => this.format(val));
|
141
139
|
}
|
142
140
|
else {
|
143
141
|
value = this.format(value);
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import { SmartComponent } from '../../common/component';
|
2
|
+
import Toast from '../../toast/toast';
|
3
|
+
SmartComponent({
|
4
|
+
data: {
|
5
|
+
value: 1,
|
6
|
+
},
|
7
|
+
methods: {
|
8
|
+
onChange(event) {
|
9
|
+
Toast.loading({
|
10
|
+
context: this,
|
11
|
+
forbidClick: true,
|
12
|
+
});
|
13
|
+
setTimeout(() => {
|
14
|
+
Toast.clear();
|
15
|
+
this.setData({ value: event.detail });
|
16
|
+
}, 500);
|
17
|
+
},
|
18
|
+
},
|
19
|
+
});
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1,42 @@
|
|
1
|
+
import { CheckmarkCircle, Right } from '@tuya-miniapp/icons';
|
2
|
+
import { SmartComponent } from '../../common/component';
|
3
|
+
import Toast from '../../toast/toast';
|
4
|
+
const steps = [
|
5
|
+
{
|
6
|
+
text: I18n.t('step1'),
|
7
|
+
desc: I18n.t('descriptionInformation'),
|
8
|
+
},
|
9
|
+
{
|
10
|
+
text: I18n.t('stepTwo'),
|
11
|
+
desc: I18n.t('descriptionInformation'),
|
12
|
+
},
|
13
|
+
{
|
14
|
+
text: I18n.t('stepThree'),
|
15
|
+
desc: I18n.t('descriptionInformation'),
|
16
|
+
},
|
17
|
+
{
|
18
|
+
text: I18n.t('stepFour'),
|
19
|
+
desc: I18n.t('descriptionInformation'),
|
20
|
+
},
|
21
|
+
];
|
22
|
+
SmartComponent({
|
23
|
+
data: {
|
24
|
+
active: 1,
|
25
|
+
steps,
|
26
|
+
customIcon: CheckmarkCircle,
|
27
|
+
inActiveIcon: Right,
|
28
|
+
},
|
29
|
+
methods: {
|
30
|
+
nextStep() {
|
31
|
+
this.setData({
|
32
|
+
active: ++this.data.active % 4,
|
33
|
+
});
|
34
|
+
},
|
35
|
+
onClick(event) {
|
36
|
+
Toast({
|
37
|
+
context: this,
|
38
|
+
message: `Index: ${event.detail}`,
|
39
|
+
});
|
40
|
+
},
|
41
|
+
},
|
42
|
+
});
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1,26 @@
|
|
1
|
+
import { SmartComponent } from '../../common/component';
|
2
|
+
SmartComponent({
|
3
|
+
data: {
|
4
|
+
container: () => { },
|
5
|
+
scrollTop: 0,
|
6
|
+
offsetTop: 0,
|
7
|
+
},
|
8
|
+
mounted() {
|
9
|
+
this.setData({
|
10
|
+
container: () => this.createSelectorQuery().select('#container'),
|
11
|
+
});
|
12
|
+
},
|
13
|
+
methods: {
|
14
|
+
onScroll(event) {
|
15
|
+
this.createSelectorQuery()
|
16
|
+
.select('#scroller')
|
17
|
+
.boundingClientRect((res) => {
|
18
|
+
this.setData({
|
19
|
+
scrollTop: event.detail.scrollTop,
|
20
|
+
offsetTop: res.top,
|
21
|
+
});
|
22
|
+
})
|
23
|
+
.exec();
|
24
|
+
},
|
25
|
+
},
|
26
|
+
});
|
package/dist/sticky/index.js
CHANGED
@@ -79,7 +79,7 @@ SmartComponent({
|
|
79
79
|
.catch(() => { });
|
80
80
|
return;
|
81
81
|
}
|
82
|
-
getRect(this, ROOT_ELEMENT).then(
|
82
|
+
getRect(this, ROOT_ELEMENT).then(root => {
|
83
83
|
if (!isDef(root) || (!root.width && !root.height)) {
|
84
84
|
return;
|
85
85
|
}
|
@@ -114,7 +114,7 @@ SmartComponent({
|
|
114
114
|
if (!nodesRef) {
|
115
115
|
return Promise.reject(new Error('not found container'));
|
116
116
|
}
|
117
|
-
return new Promise(
|
117
|
+
return new Promise(resolve => nodesRef.boundingClientRect(resolve).exec());
|
118
118
|
},
|
119
119
|
},
|
120
120
|
});
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1,45 @@
|
|
1
|
+
import { SmartComponent } from '../../common/component';
|
2
|
+
import Dialog from '../../dialog/dialog';
|
3
|
+
import Toast from '../../toast/toast';
|
4
|
+
SmartComponent({
|
5
|
+
methods: {
|
6
|
+
onClose(event) {
|
7
|
+
const { position, instance } = event.detail;
|
8
|
+
switch (position) {
|
9
|
+
case 'left':
|
10
|
+
case 'cell':
|
11
|
+
instance.close();
|
12
|
+
break;
|
13
|
+
case 'right':
|
14
|
+
Dialog.confirm({
|
15
|
+
context: this,
|
16
|
+
message: I18n.t('areYouSureYouWantToDelete'),
|
17
|
+
})
|
18
|
+
.then(() => {
|
19
|
+
instance.close();
|
20
|
+
})
|
21
|
+
.catch(() => {
|
22
|
+
console.log('cancel');
|
23
|
+
});
|
24
|
+
break;
|
25
|
+
}
|
26
|
+
},
|
27
|
+
onOpen(event) {
|
28
|
+
const { position, name } = event.detail;
|
29
|
+
switch (position) {
|
30
|
+
case 'left':
|
31
|
+
Toast({
|
32
|
+
context: this,
|
33
|
+
message: `${name}${position}${I18n.t('partialOpenEventTriggered')}`,
|
34
|
+
});
|
35
|
+
break;
|
36
|
+
case 'right':
|
37
|
+
Toast({
|
38
|
+
context: this,
|
39
|
+
message: `${name}${position}${I18n.t('partialDisplayOpenEventTriggered')}`,
|
40
|
+
});
|
41
|
+
break;
|
42
|
+
}
|
43
|
+
},
|
44
|
+
},
|
45
|
+
});
|
package/dist/swipe-cell/index.js
CHANGED
@@ -40,7 +40,7 @@ SmartComponent({
|
|
40
40
|
ARRAY.push(this);
|
41
41
|
},
|
42
42
|
destroyed() {
|
43
|
-
ARRAY = ARRAY.filter(
|
43
|
+
ARRAY = ARRAY.filter(item => item !== this);
|
44
44
|
},
|
45
45
|
methods: {
|
46
46
|
open(position) {
|
@@ -58,9 +58,7 @@ SmartComponent({
|
|
58
58
|
swipeMove(offset = 0) {
|
59
59
|
this.offset = range(offset, -this.data.rightWidth, this.data.leftWidth);
|
60
60
|
const transform = `translate3d(${this.offset}px, 0, 0)`;
|
61
|
-
const transition = this.dragging
|
62
|
-
? 'none'
|
63
|
-
: 'transform .6s cubic-bezier(0.18, 0.89, 0.32, 1)';
|
61
|
+
const transition = this.dragging ? 'none' : 'transform .6s cubic-bezier(0.18, 0.89, 0.32, 1)';
|
64
62
|
this.setData({
|
65
63
|
wrapperStyle: `
|
66
64
|
-webkit-transform: ${transform};
|
@@ -101,7 +99,7 @@ SmartComponent({
|
|
101
99
|
return;
|
102
100
|
}
|
103
101
|
this.dragging = true;
|
104
|
-
ARRAY.filter(
|
102
|
+
ARRAY.filter(item => item !== this && item.offset !== 0).forEach(item => item.close());
|
105
103
|
this.setData({ catchMove: true });
|
106
104
|
this.swipeMove(this.startOffset + this.deltaX);
|
107
105
|
},
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1,29 @@
|
|
1
|
+
import { SmartComponent } from '../../common/component';
|
2
|
+
import Dialog from '../../dialog/dialog';
|
3
|
+
SmartComponent({
|
4
|
+
data: {
|
5
|
+
checked: true,
|
6
|
+
checked2: true,
|
7
|
+
},
|
8
|
+
methods: {
|
9
|
+
onChange({ detail }) {
|
10
|
+
this.setData({ checked: detail });
|
11
|
+
},
|
12
|
+
onChange2({ detail }) {
|
13
|
+
Dialog.confirm({
|
14
|
+
context: this,
|
15
|
+
title: I18n.t('prompt'),
|
16
|
+
message: I18n.t('doYouWantToToggleTheSwitch'),
|
17
|
+
}).then(() => {
|
18
|
+
this.setData({ checked2: detail });
|
19
|
+
});
|
20
|
+
},
|
21
|
+
onClick() {
|
22
|
+
Dialog.confirm({
|
23
|
+
context: this,
|
24
|
+
title: I18n.t('hint'),
|
25
|
+
message: I18n.t('bubbleEvent'),
|
26
|
+
});
|
27
|
+
},
|
28
|
+
},
|
29
|
+
});
|
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:var(--switch-border,1px solid rgba(0,0,0,.1));border-radius:var(--switch-node-size,1em);box-sizing:initial;display:inline-block;height:var(--switch-height,1em);position:relative;transition:background-color var(--switch-transition-duration,.3s);width:var(--switch-width,1.667em)}.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,1em);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,1em);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{transform:translateX(calc(var(--switch-width, 1.667em) - var(--switch-node-size, 1em)))}.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:var(--switch-border,1px solid rgba(0,0,0,.1));border-color:transparent;border-radius:var(--switch-node-size,1em);box-sizing:initial;display:inline-block;height:var(--switch-height,1em);position:relative;transition:background-color var(--switch-transition-duration,.3s);width:var(--switch-width,1.667em)}.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,1em);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,1em);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{transform:translateX(calc(var(--switch-width, 1.667em) - var(--switch-node-size, 1em)))}.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:var(--switch-border,1px solid rgba(0,0,0,.1));border-radius:var(--switch-node-size,1em);box-sizing:initial;display:inline-block;height:var(--switch-height,1em);position:relative;transition:background-color var(--switch-transition-duration,.3s);width:var(--switch-width,1.667em)}.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,1em);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,1em);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{transform:translateX(calc(var(--switch-width, 1.667em) - var(--switch-node-size, 1em)))}.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:var(--switch-border,1px solid rgba(0,0,0,.1));border-color:transparent;border-radius:var(--switch-node-size,1em);box-sizing:initial;display:inline-block;height:var(--switch-height,1em);position:relative;transition:background-color var(--switch-transition-duration,.3s);width:var(--switch-width,1.667em)}.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,1em);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,1em);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{transform:translateX(calc(var(--switch-width, 1.667em) - var(--switch-node-size, 1em)))}.smart-switch--disabled{opacity:var(--switch-disabled-opacity,.4)}
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|