@tuya-miniapp/smart-ui 1.3.1-beta-3 → 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/components/header/index.css +1 -1
- package/dist/calendar/components/header/index.js +1 -1
- 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 +4 -17
- package/dist/calendar/components/month-list/index.wxml +15 -13
- 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 +3 -3
- package/dist/calendar/components/year-list/index.wxml +1 -1
- 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 +9 -14
- package/dist/calendar/index.wxs +4 -7
- package/dist/calendar/utils.js +2 -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.js +3 -6
- package/dist/notice-bar/index.wxml +1 -5
- 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/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.js +7 -25
- 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 +3 -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/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/components/header/index.css +1 -1
- 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 +3 -16
- package/lib/calendar/components/month-list/index.wxml +15 -13
- 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 +1 -1
- package/lib/calendar/components/year-list/index.wxml +1 -1
- 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 +7 -14
- package/lib/calendar/index.wxs +4 -7
- package/lib/calendar/utils.js +1 -3
- 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.js +2 -5
- package/lib/notice-bar/index.wxml +1 -5
- 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/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.js +6 -24
- 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 +1 -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/package.json +1 -1
package/lib/loading/index.wxs
CHANGED
@@ -11,37 +11,22 @@ function textStyle(data) {
|
|
11
11
|
return ret;
|
12
12
|
}
|
13
13
|
|
14
|
-
const createSvgIcon = (svg) =>
|
15
|
-
`data:image/svg+xml,${encodeURIComponent(
|
16
|
-
`<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">${svg}`
|
17
|
-
)}`;
|
18
|
-
|
19
|
-
const CircularLoading = ({ color }) =>
|
20
|
-
createSvgIcon(
|
21
|
-
`<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="24" height="24" viewBox="0 0 24 24"><defs><clipPath id="master_svg0_452_31565"><rect x="0" y="0" width="24" height="24" rx="0"/></clipPath><linearGradient x1="0.5" y1="0.5" x2="0.5" y2="0.8999999761581421" id="master_svg1_452_31641"><stop offset="0%" stop-color="${color}" stop-opacity="1"/><stop offset="100%" stop-color="${color}" stop-opacity="0"/></linearGradient></defs><g clip-path="url(#master_svg0_452_31565)"><g style="opacity:0.20000000298023224;"><path d="M12,18.4C15.5346,18.4,18.4,15.5346,18.4,12C18.4,8.46538,15.5346,5.6,12,5.6C8.46538,5.6,5.6,8.46538,5.6,12C5.6,15.5346,8.46538,18.4,12,18.4ZM12,20C16.418300000000002,20,20,16.418300000000002,20,12C20,7.58172,16.418300000000002,4,12,4C7.58172,4,4,7.58172,4,12C4,16.418300000000002,7.58172,20,12,20Z" fill-rule="evenodd" fill="${color}" fill-opacity="1"/></g><g><path d="M12,5.6C8.46538,5.6,5.6,8.46538,5.6,12C5.6,15.5346,8.46538,18.4,12,18.4C12.44183,18.4,12.8,18.758200000000002,12.8,19.2C12.8,19.6418,12.44183,20,12,20C7.58172,20,4,16.418300000000002,4,12C4,7.58172,7.58172,4,12,4C16.418300000000002,4,20,7.58172,20,12C20,12.44183,19.6418,12.8,19.2,12.8C18.758200000000002,12.8,18.4,12.44183,18.4,12C18.4,8.46538,15.5346,5.6,12,5.6Z" fill-rule="evenodd" fill="url(#master_svg1_452_31641)" fill-opacity="1"/></g></g></svg>`
|
22
|
-
);
|
23
|
-
|
24
|
-
const SpinnerLoading = ({ color }) =>
|
25
|
-
createSvgIcon(
|
26
|
-
`<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="32" height="32" viewBox="0 0 32 32"><g><g><g></g><g><g><path d="M23.5413973046875,21.023418836669922L21.6560673046875,19.138091836669922C21.1360673046875,18.618087836669922,20.2933963046875,18.618087836669922,19.7707393046875,19.138091836669922C19.2507363046875,19.658095836669922,19.2507363046875,20.503418836669923,19.7707393046875,21.023418836669922L21.6560673046875,22.908748836669922C22.1760673046875,23.42875883666992,23.0213873046875,23.42875883666992,23.5413973046875,22.908748836669922C24.0613973046875,22.388748836669922,24.0613973046875,21.54342883666992,23.5413973046875,21.023418836669922Z" fill-rule="evenodd" fill="${color}" fill-opacity="1"/></g><g style="opacity:0.699999988079071;"><path d="M15,6.3333200000000005L15,8.99994C15,9.7359,15.597301,10.33326,16.33332,10.33326C17.06927,10.33326,17.66664,9.73596,17.66664,8.99994L17.66664,6.3333200000000005C17.66664,5.597364,17.06927,5,16.33332,5C15.597363,5,15,5.597301,15,6.3333200000000005Z" fill="${color}" fill-opacity="1"/></g><g style="opacity:0.6000000238418579;"><path d="M8.390002,8.389983926513672C7.869999,8.909987926513672,7.869999,9.755310926513673,8.390002,10.275310926513672L10.27533,12.160640926513672C10.79533,12.680650926513671,11.638,12.680650926513671,12.16066,12.160640926513672C12.68066,11.640640926513672,12.68066,10.795320926513671,12.16066,10.275310926513672L10.27533,8.389983926513672C9.75533,7.869979926513672,8.910006,7.869979926513672,8.390002,8.389983926513672Z" fill="${color}" fill-opacity="1"/></g><g transform="matrix(-1,0,0,1,49.101318359375,0)" style="opacity:0.800000011920929;"><path d="M24.9406611796875,8.389983926513672C24.4206581796875,8.909987926513672,24.4206581796875,9.755310926513673,24.9406611796875,10.275310926513672L26.8259891796875,12.160640926513672C27.3459891796875,12.680650926513671,28.188659179687498,12.680650926513671,28.7113191796875,12.160640926513672C29.2313191796875,11.640640926513672,29.2313191796875,10.795320926513671,28.7113191796875,10.275310926513672L26.8259891796875,8.389983926513672C26.3059891796875,7.869979926513672,25.4606651796875,7.869979926513672,24.9406611796875,8.389983926513672Z" fill="${color}" fill-opacity="1"/></g><g style="opacity:0.5;"><path d="M6,15.666644432373047C6,16.402604432373046,6.5973,16.999964432373048,7.3333200000000005,16.999964432373048L9.99994,16.999964432373048C10.735890000000001,16.999964432373048,11.33325,16.402664432373047,11.33325,15.666644432373047C11.33325,14.930688432373048,10.735949999999999,14.333324432373047,9.99994,14.333324432373047L7.3333200000000005,14.333324432373047C6.597364,14.333324432373047,6,14.930688432373048,6,15.666644432373047Z" fill="${color}" fill-opacity="1"/></g><g style="opacity:0.8999999761581421;"><path d="M21,15.666644432373047C21,16.402604432373046,21.5973,16.999964432373048,22.33332,16.999964432373048L24.99994,16.999964432373048C25.73589,16.999964432373048,26.33325,16.402664432373047,26.33325,15.666644432373047C26.33325,14.930688432373048,25.73595,14.333324432373047,24.99994,14.333324432373047L22.33332,14.333324432373047C21.597364,14.333324432373047,21,14.930688432373048,21,15.666644432373047Z" fill="${color}" fill-opacity="1"/></g><g style="opacity:0.4000000059604645;"><path d="M8.45866655078125,21.023418836669922C7.93866355078125,21.54342883666992,7.93866355078125,22.388748836669922,8.45866655078125,22.908748836669922C8.97867055078125,23.42875883666992,9.82399455078125,23.42875883666992,10.34399455078125,22.908748836669922L12.22932455078125,21.023418836669922C12.74932455078125,20.503418836669923,12.74932455078125,19.658095836669922,12.22932455078125,19.138091836669922C11.70931455078125,18.618087836669922,10.86399455078125,18.618087836669922,10.34399455078125,19.138091836669922L8.45866655078125,21.023418836669922Z" fill="${color}" fill-opacity="1"/></g><g style="opacity:0.20000000298023224;"><path d="M15,22.33332L15,24.99994C15,25.7359,15.597301,26.33326,16.33332,26.33326C17.06927,26.33326,17.66664,25.73596,17.66664,24.99994L17.66664,22.33332C17.66664,21.597364,17.06927,21,16.33332,21C15.597363,21,15,21.597301,15,22.33332Z" fill="${color}" fill-opacity="1"/></g></g></g></g></svg>`
|
27
|
-
);
|
28
|
-
|
29
14
|
function loadingStyle(data) {
|
30
|
-
let iconSrc = ''
|
15
|
+
let iconSrc = ''
|
31
16
|
|
32
17
|
if (data.type === 'spinner') {
|
33
|
-
iconSrc =
|
18
|
+
iconSrc = data.spinner
|
34
19
|
}
|
35
20
|
|
36
21
|
if (data.type === 'circular') {
|
37
|
-
iconSrc =
|
22
|
+
iconSrc = data.circular
|
38
23
|
}
|
39
24
|
|
40
|
-
|
41
|
-
'background-image':
|
25
|
+
var ret = style({
|
26
|
+
'background-image': "url('".concat(iconSrc, "')"),
|
42
27
|
width: addUnit(data.size),
|
43
28
|
height: addUnit(data.size),
|
44
|
-
'background-size': addUnit(data.size)
|
29
|
+
'background-size': addUnit(data.size)
|
45
30
|
});
|
46
31
|
|
47
32
|
return ret;
|
package/lib/mixins/link.js
CHANGED
@@ -14,8 +14,7 @@ exports.link = Behavior({
|
|
14
14
|
if (urlKey === void 0) { urlKey = 'url'; }
|
15
15
|
var url = this.data[urlKey];
|
16
16
|
if (url) {
|
17
|
-
if (this.data.linkType === 'navigateTo' &&
|
18
|
-
getCurrentPages().length > 9) {
|
17
|
+
if (this.data.linkType === 'navigateTo' && getCurrentPages().length > 9) {
|
19
18
|
wx.redirectTo({ url: url });
|
20
19
|
}
|
21
20
|
else {
|
package/lib/mixins/touch.js
CHANGED
@@ -33,8 +33,7 @@ exports.touch = Behavior({
|
|
33
33
|
this.deltaY = touch.clientY - this.startY;
|
34
34
|
this.offsetX = Math.abs(this.deltaX);
|
35
35
|
this.offsetY = Math.abs(this.deltaY);
|
36
|
-
this.direction =
|
37
|
-
this.direction || getDirection(this.offsetX, this.offsetY);
|
36
|
+
this.direction = this.direction || getDirection(this.offsetX, this.offsetY);
|
38
37
|
},
|
39
38
|
},
|
40
39
|
});
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1,31 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
+
};
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
+
var Plus_1 = __importDefault(require("@tuya-miniapp/icons/dist/svg/Plus"));
|
7
|
+
var House_1 = __importDefault(require("@tuya-miniapp/icons/dist/svg/House"));
|
8
|
+
var component_1 = require("../../common/component");
|
9
|
+
(0, component_1.SmartComponent)({
|
10
|
+
data: {
|
11
|
+
iconPlus: Plus_1.default,
|
12
|
+
iconHouse: House_1.default,
|
13
|
+
},
|
14
|
+
methods: {
|
15
|
+
onClickLeft: function () {
|
16
|
+
wx.showToast({ title: I18n.t('clickToReturn'), icon: 'none' });
|
17
|
+
},
|
18
|
+
onClickLeftIcon: function () {
|
19
|
+
wx.showToast({ title: I18n.t('clickToLeftIcon'), icon: 'none' });
|
20
|
+
},
|
21
|
+
onClickLeftText: function () {
|
22
|
+
wx.showToast({ title: I18n.t('clickToLeftText'), icon: 'none' });
|
23
|
+
},
|
24
|
+
onClickTitle: function () {
|
25
|
+
wx.showToast({ title: I18n.t('clickToTitle'), icon: 'none' });
|
26
|
+
},
|
27
|
+
onClickRight: function () {
|
28
|
+
wx.showToast({ title: I18n.t('clickToRight'), icon: 'none' });
|
29
|
+
},
|
30
|
+
},
|
31
|
+
});
|
package/lib/nav-bar/index.css
CHANGED
@@ -1 +1 @@
|
|
1
|
-
@import '../common/index.css';.smart-nav-bar{background-color:var(--nav-bar-background-color,var(--app-B2,#fff));box-sizing:initial;height:var(--nav-bar-height,46px);line-height:var(--nav-bar-height,46px);position:relative;text-align:center;-webkit-user-select:none;user-select:none}.smart-nav-bar__content{height:100%;position:relative}.smart-nav-bar__text{color:var(--nav-bar-text-color,var(--app-B2-N1,#000));display:inline-block;margin:0 calc(var(--padding-md, 16px)*-1);padding:0 var(--padding-md,16px);vertical-align:middle}.smart-nav-bar__text--hover{background-color:#f2f3f5}.smart-nav-bar__text--home{color:var(--nav-bar-home-text-color,var(--app-B2-N1,#000));font-size:var(--nav-bar-home-font-size,22px);font-weight:var(--nav-bar-home-font-weight,600)}.smart-nav-bar__text--title{color:var(--nav-bar-title-text-color,var(--app-B2-N1,#000));font-size:var(--nav-bar-title-font-size,16px);font-weight:var(--nav-bar-title-font-weight,600)}.smart-nav-bar__arrow{vertical-align:middle}.smart-nav-bar__arrow>view{background:var(--nav-bar-arrow-color,var(--app-B2-N1,#000))}.smart-nav-
|
1
|
+
@import '../common/index.css';.smart-nav-bar{background-color:var(--nav-bar-background-color,var(--app-B2,#fff));box-sizing:initial;height:var(--nav-bar-height,46px);line-height:var(--nav-bar-height,46px);position:relative;text-align:center;-webkit-user-select:none;user-select:none}.smart-nav-bar__content{height:100%;position:relative}.smart-nav-bar__text{color:var(--nav-bar-text-color,var(--app-B2-N1,#000));display:inline-block;margin:0 calc(var(--padding-md, 16px)*-1);padding:0 var(--padding-md,16px);vertical-align:middle}.smart-nav-bar__text--hover{background-color:#f2f3f5}.smart-nav-bar__text--home{color:var(--nav-bar-home-text-color,var(--app-B2-N1,#000));font-size:var(--nav-bar-home-font-size,22px);font-weight:var(--nav-bar-home-font-weight,600)}.smart-nav-bar__text--title{color:var(--nav-bar-title-text-color,var(--app-B2-N1,#000));font-size:var(--nav-bar-title-font-size,16px);font-weight:var(--nav-bar-title-font-weight,600)}.smart-nav-bar__arrow{vertical-align:middle}.smart-nav-bar__arrow>view{background:var(--nav-bar-arrow-color,var(--app-B2-N1,#000))}.smart-nav-bar__icon-wrap{align-items:center;display:flex;height:var(--nav-bar-icon-size,32px);justify-content:center;margin:var(--nav-bar-icon-margin,0);width:var(--nav-bar-icon-size,32px)}.smart-nav-bar__icon>view{background:var(--nav-bar-icon-color,var(--app-B2-N1,#000))}.smart-nav-bar--fixed{left:0;position:fixed;top:0;width:100%}.smart-nav-bar__title{color:var(--nav-bar-title-text-color,var(--app-B2-N1,#000));font-size:var(--nav-bar-title-font-size,16px);font-weight:var(--nav-bar-title-font-weight,600);margin:0 auto;max-width:60%}.smart-nav-bar__left,.smart-nav-bar__right{align-items:center;bottom:0;display:flex;font-size:var(--font-size-md,14px);position:absolute;top:0}.smart-nav-bar__left{left:var(--padding-md,16px)}.smart-nav-bar__right{right:var(--padding-md,16px)}
|
package/lib/nav-bar/index.wxml
CHANGED
@@ -23,7 +23,7 @@
|
|
23
23
|
class="smart-nav-bar__icon-wrap"
|
24
24
|
catch:tap="onClickLeftIcon"
|
25
25
|
>
|
26
|
-
<smart-icon class="left-icon-class" size="{{ leftIconSize }}" name="{{ leftIcon }}" />
|
26
|
+
<smart-icon class="left-icon-class" custom-class="smart-nav-bar__icon" size="{{ leftIconSize }}" name="{{ leftIcon }}" />
|
27
27
|
</view>
|
28
28
|
<view
|
29
29
|
wx:if="{{ leftText }}"
|
package/lib/nav-bar/index.wxss
CHANGED
@@ -1 +1 @@
|
|
1
|
-
@import '../common/index.wxss';.smart-nav-bar{background-color:var(--nav-bar-background-color,var(--app-B2,#fff));box-sizing:initial;height:var(--nav-bar-height,46px);line-height:var(--nav-bar-height,46px);position:relative;text-align:center;-webkit-user-select:none;user-select:none}.smart-nav-bar__content{height:100%;position:relative}.smart-nav-bar__text{color:var(--nav-bar-text-color,var(--app-B2-N1,#000));display:inline-block;margin:0 calc(var(--padding-md, 16px)*-1);padding:0 var(--padding-md,16px);vertical-align:middle}.smart-nav-bar__text--hover{background-color:#f2f3f5}.smart-nav-bar__text--home{color:var(--nav-bar-home-text-color,var(--app-B2-N1,#000));font-size:var(--nav-bar-home-font-size,22px);font-weight:var(--nav-bar-home-font-weight,600)}.smart-nav-bar__text--title{color:var(--nav-bar-title-text-color,var(--app-B2-N1,#000));font-size:var(--nav-bar-title-font-size,16px);font-weight:var(--nav-bar-title-font-weight,600)}.smart-nav-bar__arrow{vertical-align:middle}.smart-nav-bar__arrow>view{background:var(--nav-bar-arrow-color,var(--app-B2-N1,#000))}.smart-nav-
|
1
|
+
@import '../common/index.wxss';.smart-nav-bar{background-color:var(--nav-bar-background-color,var(--app-B2,#fff));box-sizing:initial;height:var(--nav-bar-height,46px);line-height:var(--nav-bar-height,46px);position:relative;text-align:center;-webkit-user-select:none;user-select:none}.smart-nav-bar__content{height:100%;position:relative}.smart-nav-bar__text{color:var(--nav-bar-text-color,var(--app-B2-N1,#000));display:inline-block;margin:0 calc(var(--padding-md, 16px)*-1);padding:0 var(--padding-md,16px);vertical-align:middle}.smart-nav-bar__text--hover{background-color:#f2f3f5}.smart-nav-bar__text--home{color:var(--nav-bar-home-text-color,var(--app-B2-N1,#000));font-size:var(--nav-bar-home-font-size,22px);font-weight:var(--nav-bar-home-font-weight,600)}.smart-nav-bar__text--title{color:var(--nav-bar-title-text-color,var(--app-B2-N1,#000));font-size:var(--nav-bar-title-font-size,16px);font-weight:var(--nav-bar-title-font-weight,600)}.smart-nav-bar__arrow{vertical-align:middle}.smart-nav-bar__arrow>view{background:var(--nav-bar-arrow-color,var(--app-B2-N1,#000))}.smart-nav-bar__icon-wrap{align-items:center;display:flex;height:var(--nav-bar-icon-size,32px);justify-content:center;margin:var(--nav-bar-icon-margin,0);width:var(--nav-bar-icon-size,32px)}.smart-nav-bar__icon>view{background:var(--nav-bar-icon-color,var(--app-B2-N1,#000))}.smart-nav-bar--fixed{left:0;position:fixed;top:0;width:100%}.smart-nav-bar__title{color:var(--nav-bar-title-text-color,var(--app-B2-N1,#000));font-size:var(--nav-bar-title-font-size,16px);font-weight:var(--nav-bar-title-font-weight,600);margin:0 auto;max-width:60%}.smart-nav-bar__left,.smart-nav-bar__right{align-items:center;bottom:0;display:flex;font-size:var(--font-size-md,14px);position:absolute;top:0}.smart-nav-bar__left{left:var(--padding-md,16px)}.smart-nav-bar__right{right:var(--padding-md,16px)}
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1,21 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
var component_1 = require("../../common/component");
|
4
|
+
(0, component_1.SmartComponent)({
|
5
|
+
data: {
|
6
|
+
currentValue: 50,
|
7
|
+
range: [10, 40],
|
8
|
+
},
|
9
|
+
methods: {
|
10
|
+
onChange: function (event) {
|
11
|
+
this.setData({
|
12
|
+
currentValue: event.detail.value,
|
13
|
+
});
|
14
|
+
},
|
15
|
+
onRangeChange: function (event) {
|
16
|
+
this.setData({
|
17
|
+
range: event.detail,
|
18
|
+
});
|
19
|
+
},
|
20
|
+
},
|
21
|
+
});
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1,16 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
+
};
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
+
var component_1 = require("../../common/component");
|
7
|
+
var Warning_1 = __importDefault(require("@tuya-miniapp/icons/dist/svg/Warning"));
|
8
|
+
var SpeakerWaveLoud_1 = __importDefault(require("@tuya-miniapp/icons/dist/svg/SpeakerWaveLoud"));
|
9
|
+
(0, component_1.SmartComponent)({
|
10
|
+
data: {
|
11
|
+
Warning: Warning_1.default,
|
12
|
+
SpeakerWaveLoud: SpeakerWaveLoud_1.default,
|
13
|
+
text: I18n.t('noticebartip'),
|
14
|
+
shortText: I18n.t('noticebartip2'),
|
15
|
+
},
|
16
|
+
});
|
package/lib/notice-bar/index.js
CHANGED
@@ -30,7 +30,7 @@ var Right_1 = __importDefault(require("@tuya-miniapp/icons/dist/svg/Right"));
|
|
30
30
|
},
|
31
31
|
type: {
|
32
32
|
type: String,
|
33
|
-
value: 'info'
|
33
|
+
value: 'info',
|
34
34
|
},
|
35
35
|
url: {
|
36
36
|
type: String,
|
@@ -144,10 +144,7 @@ var Right_1 = __importDefault(require("@tuya-miniapp/icons/dist/svg/Right"));
|
|
144
144
|
});
|
145
145
|
(0, utils_1.requestAnimationFrame)(function () {
|
146
146
|
_this.setData({
|
147
|
-
animationData: _this.animation
|
148
|
-
.translateX(-_this.contentWidth)
|
149
|
-
.step()
|
150
|
-
.export(),
|
147
|
+
animationData: _this.animation.translateX(-_this.contentWidth).step().export(),
|
151
148
|
});
|
152
149
|
});
|
153
150
|
this.timer = setTimeout(function () {
|
@@ -3,11 +3,7 @@
|
|
3
3
|
|
4
4
|
<view
|
5
5
|
wx:if="{{ show }}"
|
6
|
-
class="custom-class {{ utils.bem('notice-bar', {
|
7
|
-
wrapable,
|
8
|
-
warning: type === 'warning',
|
9
|
-
error: type === 'error'
|
10
|
-
}) }}"
|
6
|
+
class="custom-class {{ utils.bem('notice-bar', { wrapable, warning: type === 'warning', error: type === 'error' }) }}"
|
11
7
|
hover-class="{{ mode === 'link' ? 'smart-notice-bar--hover' : ''}} {{ customHoverClass }}"
|
12
8
|
style="{{ computed.rootStyle([{ color, background }, customStyle]) }}"
|
13
9
|
bind:tap="onClick"
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1,50 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
+
};
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
+
var component_1 = require("../../common/component");
|
7
|
+
var notify_1 = __importDefault(require("../../notify/notify"));
|
8
|
+
(0, component_1.SmartComponent)({
|
9
|
+
methods: {
|
10
|
+
showNotify: function () {
|
11
|
+
(0, notify_1.default)({
|
12
|
+
context: this,
|
13
|
+
message: I18n.t('notificationContent'),
|
14
|
+
duration: 0,
|
15
|
+
transition: 'fade',
|
16
|
+
});
|
17
|
+
},
|
18
|
+
showCustomColor: function () {
|
19
|
+
(0, notify_1.default)({
|
20
|
+
context: this,
|
21
|
+
message: I18n.t('customColor'),
|
22
|
+
color: '#ad0000',
|
23
|
+
background: '#ffe1e1',
|
24
|
+
});
|
25
|
+
notify_1.default.clear();
|
26
|
+
},
|
27
|
+
showCustomDuration: function () {
|
28
|
+
(0, notify_1.default)({
|
29
|
+
context: this,
|
30
|
+
duration: 1000,
|
31
|
+
message: I18n.t('customDuration'),
|
32
|
+
});
|
33
|
+
},
|
34
|
+
showNotifyByType: function (event) {
|
35
|
+
var type = event.currentTarget.dataset.type;
|
36
|
+
(0, notify_1.default)({
|
37
|
+
type: type,
|
38
|
+
context: this,
|
39
|
+
message: I18n.t('notificationContent'),
|
40
|
+
});
|
41
|
+
},
|
42
|
+
showSafe: function () {
|
43
|
+
(0, notify_1.default)({
|
44
|
+
context: this,
|
45
|
+
message: I18n.t('notificationContent'),
|
46
|
+
safeAreaInsetTop: true,
|
47
|
+
});
|
48
|
+
},
|
49
|
+
},
|
50
|
+
});
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1,24 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
var component_1 = require("../../common/component");
|
4
|
+
(0, component_1.SmartComponent)({
|
5
|
+
data: {
|
6
|
+
show: false,
|
7
|
+
showEmbedded: false,
|
8
|
+
},
|
9
|
+
methods: {
|
10
|
+
onClickShow: function () {
|
11
|
+
this.setData({ show: true });
|
12
|
+
},
|
13
|
+
onClickHide: function () {
|
14
|
+
this.setData({ show: false });
|
15
|
+
},
|
16
|
+
onClickShowEmbedded: function () {
|
17
|
+
this.setData({ showEmbedded: true });
|
18
|
+
},
|
19
|
+
onClickHideEmbedded: function () {
|
20
|
+
this.setData({ showEmbedded: false });
|
21
|
+
},
|
22
|
+
noop: function () { },
|
23
|
+
},
|
24
|
+
});
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1,82 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
+
};
|
5
|
+
var _a;
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
7
|
+
var component_1 = require("../../common/component");
|
8
|
+
var toast_1 = __importDefault(require("../../toast/toast"));
|
9
|
+
(0, component_1.SmartComponent)({
|
10
|
+
data: {
|
11
|
+
activeIndex: 3,
|
12
|
+
column1: [I18n.t('hangzhou'), I18n.t('ningbo'), I18n.t('wenzhou'), I18n.t('jiaxing'), I18n.t('huzhou')],
|
13
|
+
column2: [
|
14
|
+
{ text: I18n.t('hangzhou'), disabled: true },
|
15
|
+
{ text: I18n.t('ningbo') },
|
16
|
+
{ text: I18n.t('wenzhou') },
|
17
|
+
],
|
18
|
+
column3: (_a = {},
|
19
|
+
_a[I18n.t('zhejiang')] = [I18n.t('hangzhou'), I18n.t('ningbo'), I18n.t('wenzhou'), I18n.t('jiaxing'), I18n.t('huzhou')],
|
20
|
+
_a[I18n.t('fujian')] = [I18n.t('fuzhou'), I18n.t('xiamen'), I18n.t('putian'), I18n.t('sanming'), I18n.t('quanzhou')],
|
21
|
+
_a),
|
22
|
+
column4: [
|
23
|
+
{
|
24
|
+
values: [I18n.t('zhejiang'), I18n.t('fujian')],
|
25
|
+
className: 'column1',
|
26
|
+
unit: I18n.t('province'),
|
27
|
+
},
|
28
|
+
{
|
29
|
+
values: [I18n.t('hangzhou'), I18n.t('ningbo'), I18n.t('wenzhou'), I18n.t('jiaxing'), I18n.t('huzhou')],
|
30
|
+
className: 'column2',
|
31
|
+
defaultIndex: 2,
|
32
|
+
unit: I18n.t('city'),
|
33
|
+
},
|
34
|
+
],
|
35
|
+
column5: [
|
36
|
+
{
|
37
|
+
values: new Array(100).fill(1).map(function (x, i) { return i; }),
|
38
|
+
style: 'flex: none;width: auto;min-width: 61px;'
|
39
|
+
},
|
40
|
+
{
|
41
|
+
values: ['.'],
|
42
|
+
style: 'flex: none;width: 8px;display:flex;justify-content: center;'
|
43
|
+
},
|
44
|
+
{
|
45
|
+
values: new Array(20).fill(1).map(function (x, i) { return i; }),
|
46
|
+
style: 'flex: none;width: auto;min-width: 61px;',
|
47
|
+
unit: 'Kg',
|
48
|
+
},
|
49
|
+
],
|
50
|
+
},
|
51
|
+
methods: {
|
52
|
+
onChange1: function (event) {
|
53
|
+
var _a = event.detail, value = _a.value, index = _a.index;
|
54
|
+
(0, toast_1.default)({
|
55
|
+
context: this,
|
56
|
+
message: "Value: ".concat(value, ", Index\uFF1A").concat(index),
|
57
|
+
});
|
58
|
+
// this.setData({
|
59
|
+
// column1: new Array(200).fill(1).map((v, i) => `杭州${i}`),
|
60
|
+
// activeIndex: 50,
|
61
|
+
// });
|
62
|
+
},
|
63
|
+
onConfirm: function (event) {
|
64
|
+
var _a = event.detail, value = _a.value, index = _a.index;
|
65
|
+
(0, toast_1.default)({
|
66
|
+
context: this,
|
67
|
+
message: "Value: ".concat(value, ", Index\uFF1A").concat(index),
|
68
|
+
});
|
69
|
+
},
|
70
|
+
onCancel: function () {
|
71
|
+
(0, toast_1.default)({
|
72
|
+
context: this,
|
73
|
+
message: I18n.t('cancel'),
|
74
|
+
});
|
75
|
+
},
|
76
|
+
onChange2: function (event) {
|
77
|
+
var _a = event.detail, picker = _a.picker, value = _a.value;
|
78
|
+
picker.setColumnValues(1, this.data.column3[value[0]]);
|
79
|
+
getApp().picker = picker;
|
80
|
+
},
|
81
|
+
},
|
82
|
+
});
|
package/lib/picker/index.css
CHANGED
@@ -1 +1 @@
|
|
1
|
-
@import '../common/index.css';.smart-picker{-webkit-text-size-adjust:100%;background-color:var(--picker-background-color,var(--app-B4,#fff));overflow:hidden;position:relative;-webkit-user-select:none;user-select:none}.smart-picker__toolbar{display:flex;height:var(--picker-toolbar-height,44px);justify-content:space-between;line-height:var(--picker-toolbar-height,44px)}.smart-picker__cancel,.smart-picker__confirm{font-size:var(--picker-action-font-size,14px);padding:var(--picker-action-padding,0 16px)}.smart-picker__cancel--hover,.smart-picker__confirm--hover{opacity:.7}.smart-picker__confirm{color:var(--picker-confirm-action-color,#576b95)}.smart-picker__cancel{color:var(--picker-cancel-action-color,#969799)}.smart-picker__title{font-size:var(--picker-option-font-size,16px);font-weight:var(--font-weight-bolder,700);max-width:50%;text-align:center}.smart-picker__columns{display:flex;-webkit-mask-image:linear-gradient(0deg,transparent,#000 50%,transparent);mask-image:linear-gradient(0deg,transparent,#000 50%,transparent);-webkit-mask-position:top,bottom;mask-position:top,bottom;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;overflow:hidden;padding:0 var(--picker-padding,16px);position:relative}.smart-picker__column{flex:1 1;width:0}.smart-picker__loading{align-items:center;background-color:var(--picker-loading-mask-color,var(--app-B4,#fff));bottom:0;display:flex;justify-content:center;left:0;opacity:.9;position:absolute;right:0;top:0;z-index:4}.smart-picker__frame{left:var(--picker-padding,16px);pointer-events:none;position:absolute;right:var(--picker-padding,16px);top:50%;transform:translateY(-50%);z-index:1}
|
1
|
+
@import '../common/index.css';.smart-picker{-webkit-text-size-adjust:100%;background-color:var(--picker-background-color,var(--app-B4,#fff));overflow:hidden;position:relative;-webkit-user-select:none;user-select:none}.smart-picker__toolbar{display:flex;height:var(--picker-toolbar-height,44px);justify-content:space-between;line-height:var(--picker-toolbar-height,44px)}.smart-picker__cancel,.smart-picker__confirm{font-size:var(--picker-action-font-size,14px);padding:var(--picker-action-padding,0 16px)}.smart-picker__cancel--hover,.smart-picker__confirm--hover{opacity:.7}.smart-picker__confirm{color:var(--picker-confirm-action-color,#576b95)}.smart-picker__cancel{color:var(--picker-cancel-action-color,#969799)}.smart-picker__title{font-size:var(--picker-option-font-size,16px);font-weight:var(--font-weight-bolder,700);max-width:50%;text-align:center}.smart-picker__columns{display:flex;justify-content:center;-webkit-mask-image:linear-gradient(0deg,transparent,#000 50%,transparent);mask-image:linear-gradient(0deg,transparent,#000 50%,transparent);-webkit-mask-position:top,bottom;mask-position:top,bottom;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;overflow:hidden;padding:0 var(--picker-padding,16px);position:relative}.smart-picker__column{flex:1 1;width:0}.smart-picker__loading{align-items:center;background-color:var(--picker-loading-mask-color,var(--app-B4,#fff));bottom:0;display:flex;justify-content:center;left:0;opacity:.9;position:absolute;right:0;top:0;z-index:4}.smart-picker__frame{left:var(--picker-padding,16px);pointer-events:none;position:absolute;right:var(--picker-padding,16px);top:50%;transform:translateY(-50%);z-index:1}
|
package/lib/picker/index.js
CHANGED
@@ -146,9 +146,7 @@ var shared_1 = require("./shared");
|
|
146
146
|
// set values of all columns
|
147
147
|
setValues: function (values) {
|
148
148
|
var _this = this;
|
149
|
-
var stack = values.map(function (value, index) {
|
150
|
-
return _this.setColumnValue(index, value);
|
151
|
-
});
|
149
|
+
var stack = values.map(function (value, index) { return _this.setColumnValue(index, value); });
|
152
150
|
return Promise.all(stack);
|
153
151
|
},
|
154
152
|
// get indexes of all columns
|
package/lib/picker/index.wxml
CHANGED
package/lib/picker/index.wxss
CHANGED
@@ -1 +1 @@
|
|
1
|
-
@import '../common/index.wxss';.smart-picker{-webkit-text-size-adjust:100%;background-color:var(--picker-background-color,var(--app-B4,#fff));overflow:hidden;position:relative;-webkit-user-select:none;user-select:none}.smart-picker__toolbar{display:flex;height:var(--picker-toolbar-height,44px);justify-content:space-between;line-height:var(--picker-toolbar-height,44px)}.smart-picker__cancel,.smart-picker__confirm{font-size:var(--picker-action-font-size,14px);padding:var(--picker-action-padding,0 16px)}.smart-picker__cancel--hover,.smart-picker__confirm--hover{opacity:.7}.smart-picker__confirm{color:var(--picker-confirm-action-color,#576b95)}.smart-picker__cancel{color:var(--picker-cancel-action-color,#969799)}.smart-picker__title{font-size:var(--picker-option-font-size,16px);font-weight:var(--font-weight-bolder,700);max-width:50%;text-align:center}.smart-picker__columns{display:flex;-webkit-mask-image:linear-gradient(0deg,transparent,#000 50%,transparent);mask-image:linear-gradient(0deg,transparent,#000 50%,transparent);-webkit-mask-position:top,bottom;mask-position:top,bottom;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;overflow:hidden;padding:0 var(--picker-padding,16px);position:relative}.smart-picker__column{flex:1 1;width:0}.smart-picker__loading{align-items:center;background-color:var(--picker-loading-mask-color,var(--app-B4,#fff));bottom:0;display:flex;justify-content:center;left:0;opacity:.9;position:absolute;right:0;top:0;z-index:4}.smart-picker__frame{left:var(--picker-padding,16px);pointer-events:none;position:absolute;right:var(--picker-padding,16px);top:50%;transform:translateY(-50%);z-index:1}
|
1
|
+
@import '../common/index.wxss';.smart-picker{-webkit-text-size-adjust:100%;background-color:var(--picker-background-color,var(--app-B4,#fff));overflow:hidden;position:relative;-webkit-user-select:none;user-select:none}.smart-picker__toolbar{display:flex;height:var(--picker-toolbar-height,44px);justify-content:space-between;line-height:var(--picker-toolbar-height,44px)}.smart-picker__cancel,.smart-picker__confirm{font-size:var(--picker-action-font-size,14px);padding:var(--picker-action-padding,0 16px)}.smart-picker__cancel--hover,.smart-picker__confirm--hover{opacity:.7}.smart-picker__confirm{color:var(--picker-confirm-action-color,#576b95)}.smart-picker__cancel{color:var(--picker-cancel-action-color,#969799)}.smart-picker__title{font-size:var(--picker-option-font-size,16px);font-weight:var(--font-weight-bolder,700);max-width:50%;text-align:center}.smart-picker__columns{display:flex;justify-content:center;-webkit-mask-image:linear-gradient(0deg,transparent,#000 50%,transparent);mask-image:linear-gradient(0deg,transparent,#000 50%,transparent);-webkit-mask-position:top,bottom;mask-position:top,bottom;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;overflow:hidden;padding:0 var(--picker-padding,16px);position:relative}.smart-picker__column{flex:1 1;width:0}.smart-picker__loading{align-items:center;background-color:var(--picker-loading-mask-color,var(--app-B4,#fff));bottom:0;display:flex;justify-content:center;left:0;opacity:.9;position:absolute;right:0;top:0;z-index:4}.smart-picker__frame{left:var(--picker-padding,16px);pointer-events:none;position:absolute;right:var(--picker-padding,16px);top:50%;transform:translateY(-50%);z-index:1}
|
@@ -105,9 +105,7 @@ var DEFAULT_DURATION = 200;
|
|
105
105
|
var maxText_1 = '';
|
106
106
|
options.forEach(function (option) {
|
107
107
|
var _a;
|
108
|
-
var value = (0, validator_1.isObj)(option)
|
109
|
-
? (_a = option[valueKey]) === null || _a === void 0 ? void 0 : _a.toString()
|
110
|
-
: option === null || option === void 0 ? void 0 : option.toString();
|
108
|
+
var value = (0, validator_1.isObj)(option) ? (_a = option[valueKey]) === null || _a === void 0 ? void 0 : _a.toString() : option === null || option === void 0 ? void 0 : option.toString();
|
111
109
|
if (maxText_1.length < value.length) {
|
112
110
|
maxText_1 = value;
|
113
111
|
}
|
@@ -157,9 +155,7 @@ var DEFAULT_DURATION = 200;
|
|
157
155
|
},
|
158
156
|
getOptionText: function (option) {
|
159
157
|
var data = this.data;
|
160
|
-
return (0, validator_1.isObj)(option) && data.valueKey in option
|
161
|
-
? option[data.valueKey]
|
162
|
-
: option;
|
158
|
+
return (0, validator_1.isObj)(option) && data.valueKey in option ? option[data.valueKey] : option;
|
163
159
|
},
|
164
160
|
setIndex: function (index, userAction, animate) {
|
165
161
|
var _this = this;
|
@@ -183,7 +179,6 @@ var DEFAULT_DURATION = 200;
|
|
183
179
|
_this.$emit('change', index);
|
184
180
|
return;
|
185
181
|
}
|
186
|
-
;
|
187
182
|
_this.fireChange = true;
|
188
183
|
});
|
189
184
|
});
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1,85 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
+
};
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
+
var Right_1 = __importDefault(require("@tuya-miniapp/icons/dist/svg/Right"));
|
7
|
+
var component_1 = require("../../common/component");
|
8
|
+
(0, component_1.SmartComponent)({
|
9
|
+
data: {
|
10
|
+
show: {
|
11
|
+
basic: false,
|
12
|
+
top: false,
|
13
|
+
bottom: false,
|
14
|
+
left: false,
|
15
|
+
right: false,
|
16
|
+
round: false,
|
17
|
+
closeIcon: false,
|
18
|
+
customCloseIcon: false,
|
19
|
+
customIconPosition: false,
|
20
|
+
},
|
21
|
+
rightIcon: Right_1.default,
|
22
|
+
},
|
23
|
+
methods: {
|
24
|
+
toggle: function (type, show) {
|
25
|
+
var _a;
|
26
|
+
this.setData((_a = {},
|
27
|
+
_a["show.".concat(type)] = show,
|
28
|
+
_a));
|
29
|
+
},
|
30
|
+
showBasic: function () {
|
31
|
+
this.toggle('basic', true);
|
32
|
+
},
|
33
|
+
hideBasic: function () {
|
34
|
+
this.toggle('basic', false);
|
35
|
+
},
|
36
|
+
showTop: function () {
|
37
|
+
this.toggle('top', true);
|
38
|
+
},
|
39
|
+
hideTop: function () {
|
40
|
+
this.toggle('top', false);
|
41
|
+
},
|
42
|
+
showLeft: function () {
|
43
|
+
this.toggle('left', true);
|
44
|
+
},
|
45
|
+
hideLeft: function () {
|
46
|
+
this.toggle('left', false);
|
47
|
+
},
|
48
|
+
showRight: function () {
|
49
|
+
this.toggle('right', true);
|
50
|
+
},
|
51
|
+
hideRight: function () {
|
52
|
+
this.toggle('right', false);
|
53
|
+
},
|
54
|
+
showBottom: function () {
|
55
|
+
this.toggle('bottom', true);
|
56
|
+
},
|
57
|
+
hideBottom: function () {
|
58
|
+
this.toggle('bottom', false);
|
59
|
+
},
|
60
|
+
showRound: function () {
|
61
|
+
this.toggle('round', true);
|
62
|
+
},
|
63
|
+
hideRound: function () {
|
64
|
+
this.toggle('round', false);
|
65
|
+
},
|
66
|
+
showCloseIcon: function () {
|
67
|
+
this.toggle('closeIcon', true);
|
68
|
+
},
|
69
|
+
hideCloseIcon: function () {
|
70
|
+
this.toggle('closeIcon', false);
|
71
|
+
},
|
72
|
+
showCustomCloseIcon: function () {
|
73
|
+
this.toggle('customCloseIcon', true);
|
74
|
+
},
|
75
|
+
hideCustomCloseIcon: function () {
|
76
|
+
this.toggle('customCloseIcon', false);
|
77
|
+
},
|
78
|
+
showCustomIconPosition: function () {
|
79
|
+
this.toggle('customIconPosition', true);
|
80
|
+
},
|
81
|
+
hideCustomIconPosition: function () {
|
82
|
+
this.toggle('customIconPosition', false);
|
83
|
+
},
|
84
|
+
},
|
85
|
+
});
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
package/lib/progress/index.js
CHANGED
@@ -39,10 +39,7 @@ var utils_1 = require("../common/utils");
|
|
39
39
|
methods: {
|
40
40
|
setLeft: function () {
|
41
41
|
var _this = this;
|
42
|
-
Promise.all([
|
43
|
-
(0, utils_1.getRect)(this, '.smart-progress'),
|
44
|
-
(0, utils_1.getRect)(this, '.smart-progress__pivot'),
|
45
|
-
]).then(function (_a) {
|
42
|
+
Promise.all([(0, utils_1.getRect)(this, '.smart-progress'), (0, utils_1.getRect)(this, '.smart-progress__pivot')]).then(function (_a) {
|
46
43
|
var portion = _a[0], pivot = _a[1];
|
47
44
|
if (portion && pivot) {
|
48
45
|
_this.setData({
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1,34 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
var component_1 = require("../../common/component");
|
4
|
+
(0, component_1.SmartComponent)({
|
5
|
+
data: {
|
6
|
+
radioBasic: '1',
|
7
|
+
radioDisabled: '2',
|
8
|
+
radioColor: '1',
|
9
|
+
radioText: '1',
|
10
|
+
radioHoriz: '1',
|
11
|
+
radioIcon: '1',
|
12
|
+
radioSize: '1',
|
13
|
+
radioLabel: '1',
|
14
|
+
radioShape: '1',
|
15
|
+
radioCell: '1',
|
16
|
+
icon: {
|
17
|
+
normal: 'https://images.tuyacn.com/content-platform/hestia/1729664215ebd89f13e54.png',
|
18
|
+
active: 'https://images.tuyacn.com/content-platform/hestia/1730877912e76cbdb7563.png',
|
19
|
+
},
|
20
|
+
},
|
21
|
+
methods: {
|
22
|
+
onChange: function (event) {
|
23
|
+
var _a;
|
24
|
+
var key = event.currentTarget.dataset.key;
|
25
|
+
this.setData((_a = {}, _a[key] = event.detail, _a));
|
26
|
+
},
|
27
|
+
onClick: function (event) {
|
28
|
+
var name = event.currentTarget.dataset.name;
|
29
|
+
this.setData({
|
30
|
+
radioCell: name,
|
31
|
+
});
|
32
|
+
},
|
33
|
+
},
|
34
|
+
});
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|