@tuya-miniapp/smart-ui 0.0.1-beta-1
Sign up to get free protection for your applications and to get access to all the features.
- package/LICENSE +23 -0
- package/README.md +68 -0
- package/dist/action-sheet/index.css +1 -0
- package/dist/action-sheet/index.d.ts +1 -0
- package/dist/action-sheet/index.js +101 -0
- package/dist/action-sheet/index.json +8 -0
- package/dist/action-sheet/index.wxml +84 -0
- package/dist/action-sheet/index.wxss +1 -0
- package/dist/area/index.css +1 -0
- package/dist/area/index.d.ts +1 -0
- package/dist/area/index.js +220 -0
- package/dist/area/index.json +6 -0
- package/dist/area/index.wxml +20 -0
- package/dist/area/index.wxs +8 -0
- package/dist/area/index.wxss +1 -0
- package/dist/battery/index.d.ts +1 -0
- package/dist/battery/index.js +108 -0
- package/dist/battery/index.json +4 -0
- package/dist/battery/index.wxml +1 -0
- package/dist/button/index.css +1 -0
- package/dist/button/index.d.ts +1 -0
- package/dist/button/index.js +65 -0
- package/dist/button/index.json +7 -0
- package/dist/button/index.wxml +64 -0
- package/dist/button/index.wxs +39 -0
- package/dist/button/index.wxss +1 -0
- package/dist/calendar/calendar.wxml +70 -0
- package/dist/calendar/components/header/index.css +1 -0
- package/dist/calendar/components/header/index.d.ts +1 -0
- package/dist/calendar/components/header/index.js +37 -0
- package/dist/calendar/components/header/index.json +3 -0
- package/dist/calendar/components/header/index.wxml +16 -0
- package/dist/calendar/components/header/index.wxss +1 -0
- package/dist/calendar/components/month/index.css +1 -0
- package/dist/calendar/components/month/index.d.ts +6 -0
- package/dist/calendar/components/month/index.js +154 -0
- package/dist/calendar/components/month/index.json +3 -0
- package/dist/calendar/components/month/index.wxml +39 -0
- package/dist/calendar/components/month/index.wxs +71 -0
- package/dist/calendar/components/month/index.wxss +1 -0
- package/dist/calendar/index.css +1 -0
- package/dist/calendar/index.d.ts +1 -0
- package/dist/calendar/index.js +360 -0
- package/dist/calendar/index.json +10 -0
- package/dist/calendar/index.wxml +27 -0
- package/dist/calendar/index.wxs +37 -0
- package/dist/calendar/index.wxss +1 -0
- package/dist/calendar/utils.d.ts +12 -0
- package/dist/calendar/utils.js +83 -0
- package/dist/calendar/utils.wxs +25 -0
- package/dist/cascader/index.css +1 -0
- package/dist/cascader/index.d.ts +1 -0
- package/dist/cascader/index.js +182 -0
- package/dist/cascader/index.json +8 -0
- package/dist/cascader/index.wxml +54 -0
- package/dist/cascader/index.wxs +21 -0
- package/dist/cascader/index.wxss +1 -0
- package/dist/cell/index.css +1 -0
- package/dist/cell/index.d.ts +1 -0
- package/dist/cell/index.js +49 -0
- package/dist/cell/index.json +6 -0
- package/dist/cell/index.wxml +47 -0
- package/dist/cell/index.wxs +17 -0
- package/dist/cell/index.wxss +1 -0
- package/dist/cell-group/index.css +1 -0
- package/dist/cell-group/index.d.ts +1 -0
- package/dist/cell-group/index.js +11 -0
- package/dist/cell-group/index.json +3 -0
- package/dist/cell-group/index.wxml +11 -0
- package/dist/cell-group/index.wxss +1 -0
- package/dist/checkbox/index.css +1 -0
- package/dist/checkbox/index.d.ts +1 -0
- package/dist/checkbox/index.js +79 -0
- package/dist/checkbox/index.json +6 -0
- package/dist/checkbox/index.wxml +32 -0
- package/dist/checkbox/index.wxs +20 -0
- package/dist/checkbox/index.wxss +1 -0
- package/dist/checkbox-group/index.css +1 -0
- package/dist/checkbox-group/index.d.ts +1 -0
- package/dist/checkbox-group/index.js +36 -0
- package/dist/checkbox-group/index.json +3 -0
- package/dist/checkbox-group/index.wxml +5 -0
- package/dist/checkbox-group/index.wxss +1 -0
- package/dist/circle/index.css +1 -0
- package/dist/circle/index.d.ts +1 -0
- package/dist/circle/index.js +46 -0
- package/dist/circle/index.json +3 -0
- package/dist/circle/index.wxml +13 -0
- package/dist/circle/index.wxss +1 -0
- package/dist/col/index.css +1 -0
- package/dist/col/index.d.ts +1 -0
- package/dist/col/index.js +9 -0
- package/dist/col/index.json +3 -0
- package/dist/col/index.wxml +9 -0
- package/dist/col/index.wxs +18 -0
- package/dist/col/index.wxss +1 -0
- package/dist/collapse/index.css +1 -0
- package/dist/collapse/index.d.ts +1 -0
- package/dist/collapse/index.js +46 -0
- package/dist/collapse/index.json +3 -0
- package/dist/collapse/index.wxml +3 -0
- package/dist/collapse/index.wxss +1 -0
- package/dist/collapse-item/animate.d.ts +2 -0
- package/dist/collapse-item/animate.js +39 -0
- package/dist/collapse-item/index.css +1 -0
- package/dist/collapse-item/index.d.ts +1 -0
- package/dist/collapse-item/index.js +60 -0
- package/dist/collapse-item/index.json +6 -0
- package/dist/collapse-item/index.wxml +45 -0
- package/dist/collapse-item/index.wxss +1 -0
- package/dist/common/color.d.ts +7 -0
- package/dist/common/color.js +7 -0
- package/dist/common/component.d.ts +4 -0
- package/dist/common/component.js +46 -0
- package/dist/common/index.css +1 -0
- package/dist/common/index.wxss +1 -0
- package/dist/common/relation.d.ts +15 -0
- package/dist/common/relation.js +56 -0
- package/dist/common/style/clearfix.css +1 -0
- package/dist/common/style/clearfix.wxss +1 -0
- package/dist/common/style/ellipsis.css +1 -0
- package/dist/common/style/ellipsis.wxss +1 -0
- package/dist/common/style/hairline.css +1 -0
- package/dist/common/style/hairline.wxss +1 -0
- package/dist/common/style/mixins/clearfix.css +0 -0
- package/dist/common/style/mixins/clearfix.wxss +0 -0
- package/dist/common/style/mixins/ellipsis.css +0 -0
- package/dist/common/style/mixins/ellipsis.wxss +0 -0
- package/dist/common/style/mixins/hairline.css +0 -0
- package/dist/common/style/mixins/hairline.wxss +0 -0
- package/dist/common/style/var.css +0 -0
- package/dist/common/style/var.wxss +0 -0
- package/dist/common/utils.d.ts +21 -0
- package/dist/common/utils.js +86 -0
- package/dist/common/validator.d.ts +9 -0
- package/dist/common/validator.js +31 -0
- package/dist/common/version.d.ts +15 -0
- package/dist/common/version.js +59 -0
- package/dist/config-provider/index.d.ts +1 -0
- package/dist/config-provider/index.js +9 -0
- package/dist/config-provider/index.json +3 -0
- package/dist/config-provider/index.wxml +5 -0
- package/dist/config-provider/index.wxs +29 -0
- package/dist/count-down/index.css +1 -0
- package/dist/count-down/index.d.ts +1 -0
- package/dist/count-down/index.js +100 -0
- package/dist/count-down/index.json +3 -0
- package/dist/count-down/index.wxml +4 -0
- package/dist/count-down/index.wxss +1 -0
- package/dist/count-down/utils.d.ts +10 -0
- package/dist/count-down/utils.js +57 -0
- package/dist/custom-keyboard/index.css +1 -0
- package/dist/custom-keyboard/index.d.ts +1 -0
- package/dist/custom-keyboard/index.js +164 -0
- package/dist/custom-keyboard/index.json +9 -0
- package/dist/custom-keyboard/index.wxml +48 -0
- package/dist/custom-keyboard/index.wxss +1 -0
- package/dist/datetime-picker/index.css +1 -0
- package/dist/datetime-picker/index.d.ts +1 -0
- package/dist/datetime-picker/index.js +298 -0
- package/dist/datetime-picker/index.json +6 -0
- package/dist/datetime-picker/index.wxml +16 -0
- package/dist/datetime-picker/index.wxss +1 -0
- package/dist/definitions/index.d.ts +28 -0
- package/dist/definitions/index.js +1 -0
- package/dist/dialog/dialog.d.ts +60 -0
- package/dist/dialog/dialog.js +83 -0
- package/dist/dialog/index.css +1 -0
- package/dist/dialog/index.d.ts +1 -0
- package/dist/dialog/index.js +147 -0
- package/dist/dialog/index.json +10 -0
- package/dist/dialog/index.wxml +135 -0
- package/dist/dialog/index.wxss +1 -0
- package/dist/divider/index.css +1 -0
- package/dist/divider/index.d.ts +1 -0
- package/dist/divider/index.js +12 -0
- package/dist/divider/index.json +4 -0
- package/dist/divider/index.wxml +9 -0
- package/dist/divider/index.wxs +18 -0
- package/dist/divider/index.wxss +1 -0
- package/dist/dropdown-item/index.css +1 -0
- package/dist/dropdown-item/index.d.ts +1 -0
- package/dist/dropdown-item/index.js +130 -0
- package/dist/dropdown-item/index.json +8 -0
- package/dist/dropdown-item/index.wxml +50 -0
- package/dist/dropdown-item/index.wxss +1 -0
- package/dist/dropdown-item/shared.d.ts +5 -0
- package/dist/dropdown-item/shared.js +1 -0
- package/dist/dropdown-menu/index.css +1 -0
- package/dist/dropdown-menu/index.d.ts +1 -0
- package/dist/dropdown-menu/index.js +117 -0
- package/dist/dropdown-menu/index.json +3 -0
- package/dist/dropdown-menu/index.wxml +23 -0
- package/dist/dropdown-menu/index.wxs +16 -0
- package/dist/dropdown-menu/index.wxss +1 -0
- package/dist/empty/index.css +1 -0
- package/dist/empty/index.d.ts +1 -0
- package/dist/empty/index.js +10 -0
- package/dist/empty/index.json +4 -0
- package/dist/empty/index.wxml +22 -0
- package/dist/empty/index.wxs +25 -0
- package/dist/empty/index.wxss +1 -0
- package/dist/field/index.css +1 -0
- package/dist/field/index.d.ts +1 -0
- package/dist/field/index.js +126 -0
- package/dist/field/index.json +7 -0
- package/dist/field/index.wxml +56 -0
- package/dist/field/index.wxs +18 -0
- package/dist/field/index.wxss +1 -0
- package/dist/field/input.wxml +31 -0
- package/dist/field/props.d.ts +4 -0
- package/dist/field/props.js +64 -0
- package/dist/field/textarea.wxml +32 -0
- package/dist/field/types.d.ts +8 -0
- package/dist/field/types.js +1 -0
- package/dist/goods-action/index.css +1 -0
- package/dist/goods-action/index.d.ts +1 -0
- package/dist/goods-action/index.js +15 -0
- package/dist/goods-action/index.json +3 -0
- package/dist/goods-action/index.wxml +5 -0
- package/dist/goods-action/index.wxss +1 -0
- package/dist/goods-action-button/index.css +1 -0
- package/dist/goods-action-button/index.d.ts +1 -0
- package/dist/goods-action-button/index.js +44 -0
- package/dist/goods-action-button/index.json +6 -0
- package/dist/goods-action-button/index.wxml +35 -0
- package/dist/goods-action-button/index.wxss +1 -0
- package/dist/goods-action-icon/index.css +1 -0
- package/dist/goods-action-icon/index.d.ts +1 -0
- package/dist/goods-action-icon/index.js +27 -0
- package/dist/goods-action-icon/index.json +7 -0
- package/dist/goods-action-icon/index.wxml +41 -0
- package/dist/goods-action-icon/index.wxss +1 -0
- package/dist/grid/index.css +1 -0
- package/dist/grid/index.d.ts +1 -0
- package/dist/grid/index.js +55 -0
- package/dist/grid/index.json +3 -0
- package/dist/grid/index.wxml +8 -0
- package/dist/grid/index.wxs +13 -0
- package/dist/grid/index.wxss +1 -0
- package/dist/grid-item/index.css +1 -0
- package/dist/grid-item/index.d.ts +1 -0
- package/dist/grid-item/index.js +52 -0
- package/dist/grid-item/index.json +6 -0
- package/dist/grid-item/index.wxml +27 -0
- package/dist/grid-item/index.wxs +32 -0
- package/dist/grid-item/index.wxss +1 -0
- package/dist/icon/index.css +1 -0
- package/dist/icon/index.d.ts +1 -0
- package/dist/icon/index.js +21 -0
- package/dist/icon/index.json +6 -0
- package/dist/icon/index.wxml +25 -0
- package/dist/icon/index.wxs +75 -0
- package/dist/icon/index.wxss +1 -0
- package/dist/image/index.css +1 -0
- package/dist/image/index.d.ts +1 -0
- package/dist/image/index.js +64 -0
- package/dist/image/index.json +7 -0
- package/dist/image/index.wxml +35 -0
- package/dist/image/index.wxs +32 -0
- package/dist/image/index.wxss +1 -0
- package/dist/index-anchor/index.css +1 -0
- package/dist/index-anchor/index.d.ts +1 -0
- package/dist/index-anchor/index.js +25 -0
- package/dist/index-anchor/index.json +3 -0
- package/dist/index-anchor/index.wxml +14 -0
- package/dist/index-anchor/index.wxss +1 -0
- package/dist/index-bar/index.css +1 -0
- package/dist/index-bar/index.d.ts +1 -0
- package/dist/index-bar/index.js +246 -0
- package/dist/index-bar/index.json +3 -0
- package/dist/index-bar/index.wxml +22 -0
- package/dist/index-bar/index.wxss +1 -0
- package/dist/info/index.css +1 -0
- package/dist/info/index.d.ts +1 -0
- package/dist/info/index.js +8 -0
- package/dist/info/index.json +3 -0
- package/dist/info/index.wxml +7 -0
- package/dist/info/index.wxss +1 -0
- package/dist/loading/index.css +1 -0
- package/dist/loading/index.d.ts +1 -0
- package/dist/loading/index.js +16 -0
- package/dist/loading/index.json +3 -0
- package/dist/loading/index.wxml +19 -0
- package/dist/loading/index.wxs +22 -0
- package/dist/loading/index.wxss +1 -0
- package/dist/mixins/basic.d.ts +1 -0
- package/dist/mixins/basic.js +11 -0
- package/dist/mixins/button.d.ts +1 -0
- package/dist/mixins/button.js +51 -0
- package/dist/mixins/link.d.ts +1 -0
- package/dist/mixins/link.js +23 -0
- package/dist/mixins/page-scroll.d.ts +6 -0
- package/dist/mixins/page-scroll.js +42 -0
- package/dist/mixins/touch.d.ts +1 -0
- package/dist/mixins/touch.js +37 -0
- package/dist/mixins/transition.d.ts +1 -0
- package/dist/mixins/transition.js +129 -0
- package/dist/nav-bar/index.css +1 -0
- package/dist/nav-bar/index.d.ts +1 -0
- package/dist/nav-bar/index.js +67 -0
- package/dist/nav-bar/index.json +6 -0
- package/dist/nav-bar/index.wxml +43 -0
- package/dist/nav-bar/index.wxs +13 -0
- package/dist/nav-bar/index.wxss +1 -0
- package/dist/normal-slider/index.css +1 -0
- package/dist/normal-slider/index.d.ts +1 -0
- package/dist/normal-slider/index.js +158 -0
- package/dist/normal-slider/index.json +6 -0
- package/dist/normal-slider/index.wxml +35 -0
- package/dist/normal-slider/index.wxss +1 -0
- package/dist/notice-bar/index.css +1 -0
- package/dist/notice-bar/index.d.ts +1 -0
- package/dist/notice-bar/index.js +120 -0
- package/dist/notice-bar/index.json +6 -0
- package/dist/notice-bar/index.wxml +38 -0
- package/dist/notice-bar/index.wxs +15 -0
- package/dist/notice-bar/index.wxss +1 -0
- package/dist/notify/index.css +1 -0
- package/dist/notify/index.d.ts +1 -0
- package/dist/notify/index.js +65 -0
- package/dist/notify/index.json +6 -0
- package/dist/notify/index.wxml +21 -0
- package/dist/notify/index.wxs +22 -0
- package/dist/notify/index.wxss +1 -0
- package/dist/notify/notify.d.ts +22 -0
- package/dist/notify/notify.js +53 -0
- package/dist/overlay/index.css +1 -0
- package/dist/overlay/index.d.ts +1 -0
- package/dist/overlay/index.js +30 -0
- package/dist/overlay/index.json +6 -0
- package/dist/overlay/index.wxml +7 -0
- package/dist/overlay/index.wxss +1 -0
- package/dist/overlay/overlay.wxml +10 -0
- package/dist/picker/index.css +1 -0
- package/dist/picker/index.d.ts +1 -0
- package/dist/picker/index.js +142 -0
- package/dist/picker/index.json +7 -0
- package/dist/picker/index.wxml +39 -0
- package/dist/picker/index.wxs +42 -0
- package/dist/picker/index.wxss +1 -0
- package/dist/picker/shared.d.ts +21 -0
- package/dist/picker/shared.js +21 -0
- package/dist/picker/toolbar.wxml +23 -0
- package/dist/picker-column/index.css +1 -0
- package/dist/picker-column/index.d.ts +1 -0
- package/dist/picker-column/index.js +199 -0
- package/dist/picker-column/index.json +3 -0
- package/dist/picker-column/index.wxml +32 -0
- package/dist/picker-column/index.wxs +59 -0
- package/dist/picker-column/index.wxss +1 -0
- package/dist/popup/index.css +1 -0
- package/dist/popup/index.d.ts +1 -0
- package/dist/popup/index.js +103 -0
- package/dist/popup/index.json +7 -0
- package/dist/popup/index.wxml +21 -0
- package/dist/popup/index.wxs +18 -0
- package/dist/popup/index.wxss +1 -0
- package/dist/popup/popup.wxml +17 -0
- package/dist/progress/index.css +1 -0
- package/dist/progress/index.d.ts +1 -0
- package/dist/progress/index.js +51 -0
- package/dist/progress/index.json +3 -0
- package/dist/progress/index.wxml +20 -0
- package/dist/progress/index.wxs +36 -0
- package/dist/progress/index.wxss +1 -0
- package/dist/radio/index.css +1 -0
- package/dist/radio/index.d.ts +1 -0
- package/dist/radio/index.js +66 -0
- package/dist/radio/index.json +6 -0
- package/dist/radio/index.wxml +30 -0
- package/dist/radio/index.wxs +33 -0
- package/dist/radio/index.wxss +1 -0
- package/dist/radio-group/index.css +1 -0
- package/dist/radio-group/index.d.ts +1 -0
- package/dist/radio-group/index.js +22 -0
- package/dist/radio-group/index.json +3 -0
- package/dist/radio-group/index.wxml +5 -0
- package/dist/radio-group/index.wxss +1 -0
- package/dist/rate/index.css +1 -0
- package/dist/rate/index.d.ts +1 -0
- package/dist/rate/index.js +89 -0
- package/dist/rate/index.json +6 -0
- package/dist/rate/index.wxml +35 -0
- package/dist/rate/index.wxss +1 -0
- package/dist/row/index.css +1 -0
- package/dist/row/index.d.ts +1 -0
- package/dist/row/index.js +23 -0
- package/dist/row/index.json +3 -0
- package/dist/row/index.wxml +5 -0
- package/dist/row/index.wxs +18 -0
- package/dist/row/index.wxss +1 -0
- package/dist/search/index.css +1 -0
- package/dist/search/index.d.ts +1 -0
- package/dist/search/index.js +96 -0
- package/dist/search/index.json +6 -0
- package/dist/search/index.wxml +54 -0
- package/dist/search/index.wxss +1 -0
- package/dist/sidebar/index.css +1 -0
- package/dist/sidebar/index.d.ts +1 -0
- package/dist/sidebar/index.js +34 -0
- package/dist/sidebar/index.json +3 -0
- package/dist/sidebar/index.wxml +3 -0
- package/dist/sidebar/index.wxss +1 -0
- package/dist/sidebar-item/index.css +1 -0
- package/dist/sidebar-item/index.d.ts +1 -0
- package/dist/sidebar-item/index.js +29 -0
- package/dist/sidebar-item/index.json +6 -0
- package/dist/sidebar-item/index.wxml +18 -0
- package/dist/sidebar-item/index.wxss +1 -0
- package/dist/skeleton/index.css +1 -0
- package/dist/skeleton/index.d.ts +1 -0
- package/dist/skeleton/index.js +46 -0
- package/dist/skeleton/index.json +4 -0
- package/dist/skeleton/index.wxml +29 -0
- package/dist/skeleton/index.wxss +1 -0
- package/dist/slider/index.css +1 -0
- package/dist/slider/index.d.ts +1 -0
- package/dist/slider/index.js +210 -0
- package/dist/slider/index.json +3 -0
- package/dist/slider/index.wxml +68 -0
- package/dist/slider/index.wxs +14 -0
- package/dist/slider/index.wxss +1 -0
- package/dist/stepper/index.css +1 -0
- package/dist/stepper/index.d.ts +1 -0
- package/dist/stepper/index.js +183 -0
- package/dist/stepper/index.json +3 -0
- package/dist/stepper/index.wxml +43 -0
- package/dist/stepper/index.wxs +22 -0
- package/dist/stepper/index.wxss +1 -0
- package/dist/steps/index.css +1 -0
- package/dist/steps/index.d.ts +1 -0
- package/dist/steps/index.js +34 -0
- package/dist/steps/index.json +6 -0
- package/dist/steps/index.wxml +54 -0
- package/dist/steps/index.wxss +1 -0
- package/dist/sticky/index.css +1 -0
- package/dist/sticky/index.d.ts +1 -0
- package/dist/sticky/index.js +120 -0
- package/dist/sticky/index.json +3 -0
- package/dist/sticky/index.wxml +8 -0
- package/dist/sticky/index.wxs +25 -0
- package/dist/sticky/index.wxss +1 -0
- package/dist/swipe-cell/index.css +1 -0
- package/dist/swipe-cell/index.d.ts +1 -0
- package/dist/swipe-cell/index.js +133 -0
- package/dist/swipe-cell/index.json +3 -0
- package/dist/swipe-cell/index.wxml +21 -0
- package/dist/swipe-cell/index.wxss +1 -0
- package/dist/switch/index.css +1 -0
- package/dist/switch/index.d.ts +1 -0
- package/dist/switch/index.js +36 -0
- package/dist/switch/index.json +6 -0
- package/dist/switch/index.wxml +16 -0
- package/dist/switch/index.wxs +26 -0
- package/dist/switch/index.wxss +1 -0
- package/dist/tab/index.css +1 -0
- package/dist/tab/index.d.ts +1 -0
- package/dist/tab/index.js +56 -0
- package/dist/tab/index.json +3 -0
- package/dist/tab/index.wxml +8 -0
- package/dist/tab/index.wxss +1 -0
- package/dist/tabbar/index.css +1 -0
- package/dist/tabbar/index.d.ts +1 -0
- package/dist/tabbar/index.js +66 -0
- package/dist/tabbar/index.json +3 -0
- package/dist/tabbar/index.wxml +10 -0
- package/dist/tabbar/index.wxss +1 -0
- package/dist/tabbar-item/index.css +1 -0
- package/dist/tabbar-item/index.d.ts +1 -0
- package/dist/tabbar-item/index.js +68 -0
- package/dist/tabbar-item/index.json +7 -0
- package/dist/tabbar-item/index.wxml +29 -0
- package/dist/tabbar-item/index.wxss +1 -0
- package/dist/tabs/index.css +1 -0
- package/dist/tabs/index.d.ts +1 -0
- package/dist/tabs/index.js +302 -0
- package/dist/tabs/index.json +7 -0
- package/dist/tabs/index.wxml +63 -0
- package/dist/tabs/index.wxs +83 -0
- package/dist/tabs/index.wxss +1 -0
- package/dist/tag/index.css +1 -0
- package/dist/tag/index.d.ts +1 -0
- package/dist/tag/index.js +29 -0
- package/dist/tag/index.json +6 -0
- package/dist/tag/index.wxml +17 -0
- package/dist/tag/index.wxs +13 -0
- package/dist/tag/index.wxss +1 -0
- package/dist/toast/index.css +1 -0
- package/dist/toast/index.d.ts +1 -0
- package/dist/toast/index.js +35 -0
- package/dist/toast/index.json +9 -0
- package/dist/toast/index.wxml +36 -0
- package/dist/toast/index.wxss +1 -0
- package/dist/toast/toast.d.ts +28 -0
- package/dist/toast/toast.js +68 -0
- package/dist/transition/index.css +1 -0
- package/dist/transition/index.d.ts +1 -0
- package/dist/transition/index.js +13 -0
- package/dist/transition/index.json +3 -0
- package/dist/transition/index.wxml +10 -0
- package/dist/transition/index.wxs +17 -0
- package/dist/transition/index.wxss +1 -0
- package/dist/tree-select/index.css +1 -0
- package/dist/tree-select/index.d.ts +1 -0
- package/dist/tree-select/index.js +69 -0
- package/dist/tree-select/index.json +8 -0
- package/dist/tree-select/index.wxml +41 -0
- package/dist/tree-select/index.wxs +12 -0
- package/dist/tree-select/index.wxss +1 -0
- package/dist/wxs/add-unit.wxs +12 -0
- package/dist/wxs/array.wxs +5 -0
- package/dist/wxs/bem.wxs +39 -0
- package/dist/wxs/memoize.wxs +55 -0
- package/dist/wxs/object.wxs +13 -0
- package/dist/wxs/style.wxs +42 -0
- package/dist/wxs/utils.wxs +10 -0
- package/lib/action-sheet/index.css +1 -0
- package/lib/action-sheet/index.d.ts +1 -0
- package/lib/action-sheet/index.js +107 -0
- package/lib/action-sheet/index.json +8 -0
- package/lib/action-sheet/index.wxml +84 -0
- package/lib/action-sheet/index.wxss +1 -0
- package/lib/area/index.css +1 -0
- package/lib/area/index.d.ts +1 -0
- package/lib/area/index.js +235 -0
- package/lib/area/index.json +6 -0
- package/lib/area/index.wxml +20 -0
- package/lib/area/index.wxs +8 -0
- package/lib/area/index.wxss +1 -0
- package/lib/battery/index.d.ts +1 -0
- package/lib/battery/index.js +103 -0
- package/lib/battery/index.json +4 -0
- package/lib/battery/index.wxml +1 -0
- package/lib/button/index.css +1 -0
- package/lib/button/index.d.ts +1 -0
- package/lib/button/index.js +68 -0
- package/lib/button/index.json +7 -0
- package/lib/button/index.wxml +64 -0
- package/lib/button/index.wxs +39 -0
- package/lib/button/index.wxss +1 -0
- package/lib/calendar/calendar.wxml +70 -0
- package/lib/calendar/components/header/index.css +1 -0
- package/lib/calendar/components/header/index.d.ts +1 -0
- package/lib/calendar/components/header/index.js +45 -0
- package/lib/calendar/components/header/index.json +3 -0
- package/lib/calendar/components/header/index.wxml +16 -0
- package/lib/calendar/components/header/index.wxss +1 -0
- package/lib/calendar/components/month/index.css +1 -0
- package/lib/calendar/components/month/index.d.ts +6 -0
- package/lib/calendar/components/month/index.js +158 -0
- package/lib/calendar/components/month/index.json +3 -0
- package/lib/calendar/components/month/index.wxml +39 -0
- package/lib/calendar/components/month/index.wxs +71 -0
- package/lib/calendar/components/month/index.wxss +1 -0
- package/lib/calendar/index.css +1 -0
- package/lib/calendar/index.d.ts +1 -0
- package/lib/calendar/index.js +383 -0
- package/lib/calendar/index.json +10 -0
- package/lib/calendar/index.wxml +27 -0
- package/lib/calendar/index.wxs +37 -0
- package/lib/calendar/index.wxss +1 -0
- package/lib/calendar/utils.d.ts +12 -0
- package/lib/calendar/utils.js +97 -0
- package/lib/calendar/utils.wxs +25 -0
- package/lib/cascader/index.css +1 -0
- package/lib/cascader/index.d.ts +1 -0
- package/lib/cascader/index.js +198 -0
- package/lib/cascader/index.json +8 -0
- package/lib/cascader/index.wxml +54 -0
- package/lib/cascader/index.wxs +21 -0
- package/lib/cascader/index.wxss +1 -0
- package/lib/cell/index.css +1 -0
- package/lib/cell/index.d.ts +1 -0
- package/lib/cell/index.js +54 -0
- package/lib/cell/index.json +6 -0
- package/lib/cell/index.wxml +47 -0
- package/lib/cell/index.wxs +17 -0
- package/lib/cell/index.wxss +1 -0
- package/lib/cell-group/index.css +1 -0
- package/lib/cell-group/index.d.ts +1 -0
- package/lib/cell-group/index.js +13 -0
- package/lib/cell-group/index.json +3 -0
- package/lib/cell-group/index.wxml +11 -0
- package/lib/cell-group/index.wxss +1 -0
- package/lib/checkbox/index.css +1 -0
- package/lib/checkbox/index.d.ts +1 -0
- package/lib/checkbox/index.js +84 -0
- package/lib/checkbox/index.json +6 -0
- package/lib/checkbox/index.wxml +32 -0
- package/lib/checkbox/index.wxs +20 -0
- package/lib/checkbox/index.wxss +1 -0
- package/lib/checkbox-group/index.css +1 -0
- package/lib/checkbox-group/index.d.ts +1 -0
- package/lib/checkbox-group/index.js +39 -0
- package/lib/checkbox-group/index.json +3 -0
- package/lib/checkbox-group/index.wxml +5 -0
- package/lib/checkbox-group/index.wxss +1 -0
- package/lib/circle/index.css +1 -0
- package/lib/circle/index.d.ts +1 -0
- package/lib/circle/index.js +48 -0
- package/lib/circle/index.json +3 -0
- package/lib/circle/index.wxml +13 -0
- package/lib/circle/index.wxss +1 -0
- package/lib/col/index.css +1 -0
- package/lib/col/index.d.ts +1 -0
- package/lib/col/index.js +11 -0
- package/lib/col/index.json +3 -0
- package/lib/col/index.wxml +9 -0
- package/lib/col/index.wxs +18 -0
- package/lib/col/index.wxss +1 -0
- package/lib/collapse/index.css +1 -0
- package/lib/collapse/index.d.ts +1 -0
- package/lib/collapse/index.js +48 -0
- package/lib/collapse/index.json +3 -0
- package/lib/collapse/index.wxml +3 -0
- package/lib/collapse/index.wxss +1 -0
- package/lib/collapse-item/animate.d.ts +2 -0
- package/lib/collapse-item/animate.js +43 -0
- package/lib/collapse-item/index.css +1 -0
- package/lib/collapse-item/index.d.ts +1 -0
- package/lib/collapse-item/index.js +62 -0
- package/lib/collapse-item/index.json +6 -0
- package/lib/collapse-item/index.wxml +45 -0
- package/lib/collapse-item/index.wxss +1 -0
- package/lib/common/color.d.ts +7 -0
- package/lib/common/color.js +10 -0
- package/lib/common/component.d.ts +4 -0
- package/lib/common/component.js +49 -0
- package/lib/common/index.css +1 -0
- package/lib/common/index.wxss +1 -0
- package/lib/common/relation.d.ts +15 -0
- package/lib/common/relation.js +65 -0
- package/lib/common/style/clearfix.css +1 -0
- package/lib/common/style/clearfix.wxss +1 -0
- package/lib/common/style/ellipsis.css +1 -0
- package/lib/common/style/ellipsis.wxss +1 -0
- package/lib/common/style/hairline.css +1 -0
- package/lib/common/style/hairline.wxss +1 -0
- package/lib/common/style/mixins/clearfix.css +0 -0
- package/lib/common/style/mixins/clearfix.wxss +0 -0
- package/lib/common/style/mixins/ellipsis.css +0 -0
- package/lib/common/style/mixins/ellipsis.wxss +0 -0
- package/lib/common/style/mixins/hairline.css +0 -0
- package/lib/common/style/mixins/hairline.wxss +0 -0
- package/lib/common/style/var.css +0 -0
- package/lib/common/style/var.wxss +0 -0
- package/lib/common/utils.d.ts +21 -0
- package/lib/common/utils.js +109 -0
- package/lib/common/validator.d.ts +9 -0
- package/lib/common/validator.js +43 -0
- package/lib/common/version.d.ts +15 -0
- package/lib/common/version.js +70 -0
- package/lib/config-provider/index.d.ts +1 -0
- package/lib/config-provider/index.js +11 -0
- package/lib/config-provider/index.json +3 -0
- package/lib/config-provider/index.wxml +5 -0
- package/lib/config-provider/index.wxs +29 -0
- package/lib/count-down/index.css +1 -0
- package/lib/count-down/index.d.ts +1 -0
- package/lib/count-down/index.js +104 -0
- package/lib/count-down/index.json +3 -0
- package/lib/count-down/index.wxml +4 -0
- package/lib/count-down/index.wxss +1 -0
- package/lib/count-down/utils.d.ts +10 -0
- package/lib/count-down/utils.js +64 -0
- package/lib/custom-keyboard/index.css +1 -0
- package/lib/custom-keyboard/index.d.ts +1 -0
- package/lib/custom-keyboard/index.js +158 -0
- package/lib/custom-keyboard/index.json +9 -0
- package/lib/custom-keyboard/index.wxml +48 -0
- package/lib/custom-keyboard/index.wxss +1 -0
- package/lib/datetime-picker/index.css +1 -0
- package/lib/datetime-picker/index.d.ts +1 -0
- package/lib/datetime-picker/index.js +332 -0
- package/lib/datetime-picker/index.json +6 -0
- package/lib/datetime-picker/index.wxml +16 -0
- package/lib/datetime-picker/index.wxss +1 -0
- package/lib/definitions/index.d.ts +28 -0
- package/lib/definitions/index.js +2 -0
- package/lib/dialog/dialog.d.ts +60 -0
- package/lib/dialog/dialog.js +100 -0
- package/lib/dialog/index.css +1 -0
- package/lib/dialog/index.d.ts +1 -0
- package/lib/dialog/index.js +155 -0
- package/lib/dialog/index.json +10 -0
- package/lib/dialog/index.wxml +135 -0
- package/lib/dialog/index.wxss +1 -0
- package/lib/divider/index.css +1 -0
- package/lib/divider/index.d.ts +1 -0
- package/lib/divider/index.js +14 -0
- package/lib/divider/index.json +4 -0
- package/lib/divider/index.wxml +9 -0
- package/lib/divider/index.wxs +18 -0
- package/lib/divider/index.wxss +1 -0
- package/lib/dropdown-item/index.css +1 -0
- package/lib/dropdown-item/index.d.ts +1 -0
- package/lib/dropdown-item/index.js +136 -0
- package/lib/dropdown-item/index.json +8 -0
- package/lib/dropdown-item/index.wxml +50 -0
- package/lib/dropdown-item/index.wxss +1 -0
- package/lib/dropdown-item/shared.d.ts +5 -0
- package/lib/dropdown-item/shared.js +2 -0
- package/lib/dropdown-menu/index.css +1 -0
- package/lib/dropdown-menu/index.d.ts +1 -0
- package/lib/dropdown-menu/index.js +122 -0
- package/lib/dropdown-menu/index.json +3 -0
- package/lib/dropdown-menu/index.wxml +23 -0
- package/lib/dropdown-menu/index.wxs +16 -0
- package/lib/dropdown-menu/index.wxss +1 -0
- package/lib/empty/index.css +1 -0
- package/lib/empty/index.d.ts +1 -0
- package/lib/empty/index.js +12 -0
- package/lib/empty/index.json +4 -0
- package/lib/empty/index.wxml +22 -0
- package/lib/empty/index.wxs +25 -0
- package/lib/empty/index.wxss +1 -0
- package/lib/field/index.css +1 -0
- package/lib/field/index.d.ts +1 -0
- package/lib/field/index.js +140 -0
- package/lib/field/index.json +7 -0
- package/lib/field/index.wxml +56 -0
- package/lib/field/index.wxs +18 -0
- package/lib/field/index.wxss +1 -0
- package/lib/field/input.wxml +31 -0
- package/lib/field/props.d.ts +4 -0
- package/lib/field/props.js +67 -0
- package/lib/field/textarea.wxml +32 -0
- package/lib/field/types.d.ts +8 -0
- package/lib/field/types.js +2 -0
- package/lib/goods-action/index.css +1 -0
- package/lib/goods-action/index.d.ts +1 -0
- package/lib/goods-action/index.js +17 -0
- package/lib/goods-action/index.json +3 -0
- package/lib/goods-action/index.wxml +5 -0
- package/lib/goods-action/index.wxss +1 -0
- package/lib/goods-action-button/index.css +1 -0
- package/lib/goods-action-button/index.d.ts +1 -0
- package/lib/goods-action-button/index.js +46 -0
- package/lib/goods-action-button/index.json +6 -0
- package/lib/goods-action-button/index.wxml +35 -0
- package/lib/goods-action-button/index.wxss +1 -0
- package/lib/goods-action-icon/index.css +1 -0
- package/lib/goods-action-icon/index.d.ts +1 -0
- package/lib/goods-action-icon/index.js +29 -0
- package/lib/goods-action-icon/index.json +7 -0
- package/lib/goods-action-icon/index.wxml +41 -0
- package/lib/goods-action-icon/index.wxss +1 -0
- package/lib/grid/index.css +1 -0
- package/lib/grid/index.d.ts +1 -0
- package/lib/grid/index.js +57 -0
- package/lib/grid/index.json +3 -0
- package/lib/grid/index.wxml +8 -0
- package/lib/grid/index.wxs +13 -0
- package/lib/grid/index.wxss +1 -0
- package/lib/grid-item/index.css +1 -0
- package/lib/grid-item/index.d.ts +1 -0
- package/lib/grid-item/index.js +54 -0
- package/lib/grid-item/index.json +6 -0
- package/lib/grid-item/index.wxml +27 -0
- package/lib/grid-item/index.wxs +32 -0
- package/lib/grid-item/index.wxss +1 -0
- package/lib/icon/index.css +1 -0
- package/lib/icon/index.d.ts +1 -0
- package/lib/icon/index.js +23 -0
- package/lib/icon/index.json +6 -0
- package/lib/icon/index.wxml +25 -0
- package/lib/icon/index.wxs +75 -0
- package/lib/icon/index.wxss +1 -0
- package/lib/image/index.css +1 -0
- package/lib/image/index.d.ts +1 -0
- package/lib/image/index.js +66 -0
- package/lib/image/index.json +7 -0
- package/lib/image/index.wxml +35 -0
- package/lib/image/index.wxs +32 -0
- package/lib/image/index.wxss +1 -0
- package/lib/index-anchor/index.css +1 -0
- package/lib/index-anchor/index.d.ts +1 -0
- package/lib/index-anchor/index.js +28 -0
- package/lib/index-anchor/index.json +3 -0
- package/lib/index-anchor/index.wxml +14 -0
- package/lib/index-anchor/index.wxss +1 -0
- package/lib/index-bar/index.css +1 -0
- package/lib/index-bar/index.d.ts +1 -0
- package/lib/index-bar/index.js +243 -0
- package/lib/index-bar/index.json +3 -0
- package/lib/index-bar/index.wxml +22 -0
- package/lib/index-bar/index.wxss +1 -0
- package/lib/info/index.css +1 -0
- package/lib/info/index.d.ts +1 -0
- package/lib/info/index.js +10 -0
- package/lib/info/index.json +3 -0
- package/lib/info/index.wxml +7 -0
- package/lib/info/index.wxss +1 -0
- package/lib/loading/index.css +1 -0
- package/lib/loading/index.d.ts +1 -0
- package/lib/loading/index.js +18 -0
- package/lib/loading/index.json +3 -0
- package/lib/loading/index.wxml +19 -0
- package/lib/loading/index.wxs +22 -0
- package/lib/loading/index.wxss +1 -0
- package/lib/mixins/basic.d.ts +1 -0
- package/lib/mixins/basic.js +14 -0
- package/lib/mixins/button.d.ts +1 -0
- package/lib/mixins/button.js +54 -0
- package/lib/mixins/link.d.ts +1 -0
- package/lib/mixins/link.js +27 -0
- package/lib/mixins/page-scroll.d.ts +6 -0
- package/lib/mixins/page-scroll.js +47 -0
- package/lib/mixins/touch.d.ts +1 -0
- package/lib/mixins/touch.js +40 -0
- package/lib/mixins/transition.d.ts +1 -0
- package/lib/mixins/transition.js +135 -0
- package/lib/nav-bar/index.css +1 -0
- package/lib/nav-bar/index.d.ts +1 -0
- package/lib/nav-bar/index.js +73 -0
- package/lib/nav-bar/index.json +6 -0
- package/lib/nav-bar/index.wxml +43 -0
- package/lib/nav-bar/index.wxs +13 -0
- package/lib/nav-bar/index.wxss +1 -0
- package/lib/normal-slider/index.css +1 -0
- package/lib/normal-slider/index.d.ts +1 -0
- package/lib/normal-slider/index.js +160 -0
- package/lib/normal-slider/index.json +6 -0
- package/lib/normal-slider/index.wxml +35 -0
- package/lib/normal-slider/index.wxss +1 -0
- package/lib/notice-bar/index.css +1 -0
- package/lib/notice-bar/index.d.ts +1 -0
- package/lib/notice-bar/index.js +125 -0
- package/lib/notice-bar/index.json +6 -0
- package/lib/notice-bar/index.wxml +38 -0
- package/lib/notice-bar/index.wxs +15 -0
- package/lib/notice-bar/index.wxss +1 -0
- package/lib/notify/index.css +1 -0
- package/lib/notify/index.d.ts +1 -0
- package/lib/notify/index.js +68 -0
- package/lib/notify/index.json +6 -0
- package/lib/notify/index.wxml +21 -0
- package/lib/notify/index.wxs +22 -0
- package/lib/notify/index.wxss +1 -0
- package/lib/notify/notify.d.ts +22 -0
- package/lib/notify/notify.js +67 -0
- package/lib/overlay/index.css +1 -0
- package/lib/overlay/index.d.ts +1 -0
- package/lib/overlay/index.js +32 -0
- package/lib/overlay/index.json +6 -0
- package/lib/overlay/index.wxml +7 -0
- package/lib/overlay/index.wxss +1 -0
- package/lib/overlay/overlay.wxml +10 -0
- package/lib/picker/index.css +1 -0
- package/lib/picker/index.d.ts +1 -0
- package/lib/picker/index.js +167 -0
- package/lib/picker/index.json +7 -0
- package/lib/picker/index.wxml +39 -0
- package/lib/picker/index.wxs +42 -0
- package/lib/picker/index.wxss +1 -0
- package/lib/picker/shared.d.ts +21 -0
- package/lib/picker/shared.js +24 -0
- package/lib/picker/toolbar.wxml +23 -0
- package/lib/picker-column/index.css +1 -0
- package/lib/picker-column/index.d.ts +1 -0
- package/lib/picker-column/index.js +202 -0
- package/lib/picker-column/index.json +3 -0
- package/lib/picker-column/index.wxml +32 -0
- package/lib/picker-column/index.wxs +59 -0
- package/lib/picker-column/index.wxss +1 -0
- package/lib/popup/index.css +1 -0
- package/lib/popup/index.d.ts +1 -0
- package/lib/popup/index.js +108 -0
- package/lib/popup/index.json +7 -0
- package/lib/popup/index.wxml +21 -0
- package/lib/popup/index.wxs +18 -0
- package/lib/popup/index.wxss +1 -0
- package/lib/popup/popup.wxml +17 -0
- package/lib/progress/index.css +1 -0
- package/lib/progress/index.d.ts +1 -0
- package/lib/progress/index.js +55 -0
- package/lib/progress/index.json +3 -0
- package/lib/progress/index.wxml +20 -0
- package/lib/progress/index.wxs +36 -0
- package/lib/progress/index.wxss +1 -0
- package/lib/radio/index.css +1 -0
- package/lib/radio/index.d.ts +1 -0
- package/lib/radio/index.js +68 -0
- package/lib/radio/index.json +6 -0
- package/lib/radio/index.wxml +30 -0
- package/lib/radio/index.wxs +33 -0
- package/lib/radio/index.wxss +1 -0
- package/lib/radio-group/index.css +1 -0
- package/lib/radio-group/index.d.ts +1 -0
- package/lib/radio-group/index.js +24 -0
- package/lib/radio-group/index.json +3 -0
- package/lib/radio-group/index.wxml +5 -0
- package/lib/radio-group/index.wxss +1 -0
- package/lib/rate/index.css +1 -0
- package/lib/rate/index.d.ts +1 -0
- package/lib/rate/index.js +107 -0
- package/lib/rate/index.json +6 -0
- package/lib/rate/index.wxml +35 -0
- package/lib/rate/index.wxss +1 -0
- package/lib/row/index.css +1 -0
- package/lib/row/index.d.ts +1 -0
- package/lib/row/index.js +26 -0
- package/lib/row/index.json +3 -0
- package/lib/row/index.wxml +5 -0
- package/lib/row/index.wxs +18 -0
- package/lib/row/index.wxss +1 -0
- package/lib/search/index.css +1 -0
- package/lib/search/index.d.ts +1 -0
- package/lib/search/index.js +99 -0
- package/lib/search/index.json +6 -0
- package/lib/search/index.wxml +54 -0
- package/lib/search/index.wxss +1 -0
- package/lib/sidebar/index.css +1 -0
- package/lib/sidebar/index.d.ts +1 -0
- package/lib/sidebar/index.js +36 -0
- package/lib/sidebar/index.json +3 -0
- package/lib/sidebar/index.wxml +3 -0
- package/lib/sidebar/index.wxss +1 -0
- package/lib/sidebar-item/index.css +1 -0
- package/lib/sidebar-item/index.d.ts +1 -0
- package/lib/sidebar-item/index.js +32 -0
- package/lib/sidebar-item/index.json +6 -0
- package/lib/sidebar-item/index.wxml +18 -0
- package/lib/sidebar-item/index.wxss +1 -0
- package/lib/skeleton/index.css +1 -0
- package/lib/skeleton/index.d.ts +1 -0
- package/lib/skeleton/index.js +48 -0
- package/lib/skeleton/index.json +4 -0
- package/lib/skeleton/index.wxml +29 -0
- package/lib/skeleton/index.wxss +1 -0
- package/lib/slider/index.css +1 -0
- package/lib/slider/index.d.ts +1 -0
- package/lib/slider/index.js +209 -0
- package/lib/slider/index.json +3 -0
- package/lib/slider/index.wxml +68 -0
- package/lib/slider/index.wxs +14 -0
- package/lib/slider/index.wxss +1 -0
- package/lib/stepper/index.css +1 -0
- package/lib/stepper/index.d.ts +1 -0
- package/lib/stepper/index.js +198 -0
- package/lib/stepper/index.json +3 -0
- package/lib/stepper/index.wxml +43 -0
- package/lib/stepper/index.wxs +22 -0
- package/lib/stepper/index.wxss +1 -0
- package/lib/steps/index.css +1 -0
- package/lib/steps/index.d.ts +1 -0
- package/lib/steps/index.js +36 -0
- package/lib/steps/index.json +6 -0
- package/lib/steps/index.wxml +54 -0
- package/lib/steps/index.wxss +1 -0
- package/lib/sticky/index.css +1 -0
- package/lib/sticky/index.d.ts +1 -0
- package/lib/sticky/index.js +126 -0
- package/lib/sticky/index.json +3 -0
- package/lib/sticky/index.wxml +8 -0
- package/lib/sticky/index.wxs +25 -0
- package/lib/sticky/index.wxss +1 -0
- package/lib/swipe-cell/index.css +1 -0
- package/lib/swipe-cell/index.d.ts +1 -0
- package/lib/swipe-cell/index.js +135 -0
- package/lib/swipe-cell/index.json +3 -0
- package/lib/swipe-cell/index.wxml +21 -0
- package/lib/swipe-cell/index.wxss +1 -0
- package/lib/switch/index.css +1 -0
- package/lib/switch/index.d.ts +1 -0
- package/lib/switch/index.js +38 -0
- package/lib/switch/index.json +6 -0
- package/lib/switch/index.wxml +16 -0
- package/lib/switch/index.wxs +26 -0
- package/lib/switch/index.wxss +1 -0
- package/lib/tab/index.css +1 -0
- package/lib/tab/index.d.ts +1 -0
- package/lib/tab/index.js +58 -0
- package/lib/tab/index.json +3 -0
- package/lib/tab/index.wxml +8 -0
- package/lib/tab/index.wxss +1 -0
- package/lib/tabbar/index.css +1 -0
- package/lib/tabbar/index.d.ts +1 -0
- package/lib/tabbar/index.js +69 -0
- package/lib/tabbar/index.json +3 -0
- package/lib/tabbar/index.wxml +10 -0
- package/lib/tabbar/index.wxss +1 -0
- package/lib/tabbar-item/index.css +1 -0
- package/lib/tabbar-item/index.d.ts +1 -0
- package/lib/tabbar-item/index.js +70 -0
- package/lib/tabbar-item/index.json +7 -0
- package/lib/tabbar-item/index.wxml +29 -0
- package/lib/tabbar-item/index.wxss +1 -0
- package/lib/tabs/index.css +1 -0
- package/lib/tabs/index.d.ts +1 -0
- package/lib/tabs/index.js +327 -0
- package/lib/tabs/index.json +7 -0
- package/lib/tabs/index.wxml +63 -0
- package/lib/tabs/index.wxs +83 -0
- package/lib/tabs/index.wxss +1 -0
- package/lib/tag/index.css +1 -0
- package/lib/tag/index.d.ts +1 -0
- package/lib/tag/index.js +34 -0
- package/lib/tag/index.json +6 -0
- package/lib/tag/index.wxml +17 -0
- package/lib/tag/index.wxs +13 -0
- package/lib/tag/index.wxss +1 -0
- package/lib/toast/index.css +1 -0
- package/lib/toast/index.d.ts +1 -0
- package/lib/toast/index.js +40 -0
- package/lib/toast/index.json +9 -0
- package/lib/toast/index.wxml +36 -0
- package/lib/toast/index.wxss +1 -0
- package/lib/toast/toast.d.ts +28 -0
- package/lib/toast/toast.js +83 -0
- package/lib/transition/index.css +1 -0
- package/lib/transition/index.d.ts +1 -0
- package/lib/transition/index.js +15 -0
- package/lib/transition/index.json +3 -0
- package/lib/transition/index.wxml +10 -0
- package/lib/transition/index.wxs +17 -0
- package/lib/transition/index.wxss +1 -0
- package/lib/tree-select/index.css +1 -0
- package/lib/tree-select/index.d.ts +1 -0
- package/lib/tree-select/index.js +74 -0
- package/lib/tree-select/index.json +8 -0
- package/lib/tree-select/index.wxml +41 -0
- package/lib/tree-select/index.wxs +12 -0
- package/lib/tree-select/index.wxss +1 -0
- package/lib/wxs/add-unit.wxs +12 -0
- package/lib/wxs/array.wxs +5 -0
- package/lib/wxs/bem.wxs +39 -0
- package/lib/wxs/memoize.wxs +55 -0
- package/lib/wxs/object.wxs +13 -0
- package/lib/wxs/style.wxs +42 -0
- package/lib/wxs/utils.wxs +10 -0
- package/package.json +77 -0
@@ -0,0 +1,54 @@
|
|
1
|
+
<wxs src="../wxs/utils.wxs" module="utils" />
|
2
|
+
|
3
|
+
<view
|
4
|
+
class="{{ utils.bem('search', { withaction: showAction || useActionSlot }) }} custom-class"
|
5
|
+
style="background: {{ background }}"
|
6
|
+
>
|
7
|
+
<view class="{{ utils.bem('search__content', [shape]) }}">
|
8
|
+
<view class="van-search__label" wx:if="{{ label }}">{{ label }}</view>
|
9
|
+
<slot wx:else name="label" />
|
10
|
+
|
11
|
+
<van-field
|
12
|
+
type="search"
|
13
|
+
left-icon="{{ !useLeftIconSlot ? leftIcon : '' }}"
|
14
|
+
right-icon="{{ !useRightIconSlot ? rightIcon : '' }}"
|
15
|
+
focus="{{ focus }}"
|
16
|
+
error="{{ error }}"
|
17
|
+
border="{{ false }}"
|
18
|
+
confirm-type="search"
|
19
|
+
class="van-search__field field-class"
|
20
|
+
value="{{ value }}"
|
21
|
+
disabled="{{ disabled }}"
|
22
|
+
readonly="{{ readonly }}"
|
23
|
+
clearable="{{ clearable }}"
|
24
|
+
clear-trigger="{{ clearTrigger }}"
|
25
|
+
clear-icon="{{ clearIcon }}"
|
26
|
+
maxlength="{{ maxlength }}"
|
27
|
+
input-align="{{ inputAlign }}"
|
28
|
+
input-class="input-class"
|
29
|
+
placeholder="{{ placeholder }}"
|
30
|
+
placeholder-style="{{ placeholderStyle }}"
|
31
|
+
cursor-spacing="{{ cursorSpacing }}"
|
32
|
+
custom-style="padding: 5px 10px 5px 0; background-color: transparent;"
|
33
|
+
bind:blur="onBlur"
|
34
|
+
bind:focus="onFocus"
|
35
|
+
bind:change="onChange"
|
36
|
+
bind:confirm="onSearch"
|
37
|
+
bind:clear="onClear"
|
38
|
+
bind:click-input="onClickInput"
|
39
|
+
>
|
40
|
+
<slot wx:if="{{ useLeftIconSlot }}" name="left-icon" slot="left-icon" />
|
41
|
+
<slot wx:if="{{ useRightIconSlot }}" name="right-icon" slot="right-icon" />
|
42
|
+
</van-field>
|
43
|
+
</view>
|
44
|
+
|
45
|
+
<view
|
46
|
+
wx:if="{{ showAction || useActionSlot }}"
|
47
|
+
class="van-search__action"
|
48
|
+
hover-class="van-search__action--hover"
|
49
|
+
hover-stay-time="70"
|
50
|
+
>
|
51
|
+
<slot wx:if="{{ useActionSlot }}" name="action" />
|
52
|
+
<view wx:else bind:tap="onCancel" class="van-search__action-button cancel-class">{{ actionText }}</view>
|
53
|
+
</view>
|
54
|
+
</view>
|
@@ -0,0 +1 @@
|
|
1
|
+
@import '../common/index.wxss';.van-search{align-items:center;box-sizing:border-box;display:flex;padding:var(--search-padding,10px 12px)}.van-search__content{background-color:var(--search-background-color,#f7f8fa);border-radius:2px;display:flex;flex:1;padding-left:var(--padding-sm,12px)}.van-search__content--round{border-radius:999px}.van-search__label{color:var(--search-label-color,#323233);font-size:var(--search-label-font-size,14px);line-height:var(--search-input-height,34px);padding:var(--search-label-padding,0 5px)}.van-search__field{flex:1}.van-search__field__left-icon{color:var(--search-left-icon-color,#969799)}.van-search--withaction{padding-right:0}.van-search__action{color:var(--search-action-text-color,#323233);font-size:var(--search-action-font-size,14px);line-height:var(--search-input-height,34px)}.van-search__action--hover{background-color:#f2f3f5}.van-search__action-button{padding:var(--search-action-padding,0 8px)}
|
@@ -0,0 +1 @@
|
|
1
|
+
@import '../common/index.css';.van-sidebar{width:var(--sidebar-width,80px)}
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1,34 @@
|
|
1
|
+
import { VantComponent } from '../common/component';
|
2
|
+
import { useChildren } from '../common/relation';
|
3
|
+
VantComponent({
|
4
|
+
relation: useChildren('sidebar-item', function () {
|
5
|
+
this.setActive(this.data.activeKey);
|
6
|
+
}),
|
7
|
+
props: {
|
8
|
+
activeKey: {
|
9
|
+
type: Number,
|
10
|
+
value: 0,
|
11
|
+
observer: 'setActive',
|
12
|
+
},
|
13
|
+
},
|
14
|
+
beforeCreate() {
|
15
|
+
this.currentActive = -1;
|
16
|
+
},
|
17
|
+
methods: {
|
18
|
+
setActive(activeKey) {
|
19
|
+
const { children, currentActive } = this;
|
20
|
+
if (!children.length) {
|
21
|
+
return Promise.resolve();
|
22
|
+
}
|
23
|
+
this.currentActive = activeKey;
|
24
|
+
const stack = [];
|
25
|
+
if (currentActive !== activeKey && children[currentActive]) {
|
26
|
+
stack.push(children[currentActive].setActive(false));
|
27
|
+
}
|
28
|
+
if (children[activeKey]) {
|
29
|
+
stack.push(children[activeKey].setActive(true));
|
30
|
+
}
|
31
|
+
return Promise.all(stack);
|
32
|
+
},
|
33
|
+
},
|
34
|
+
});
|
@@ -0,0 +1 @@
|
|
1
|
+
@import '../common/index.wxss';.van-sidebar{width:var(--sidebar-width,80px)}
|
@@ -0,0 +1 @@
|
|
1
|
+
@import '../common/index.css';.van-sidebar-item{background-color:var(--sidebar-background-color,var(--app-B1,#f6f7fb));border-left:3px solid transparent;box-sizing:border-box;color:var(--sidebar-text-color,var(--app-B6-N1,#000));display:block;font-size:var(--sidebar-font-size,14px);line-height:var(--sidebar-line-height,20px);overflow:hidden;padding:var(--sidebar-padding,20px 12px 20px 8px);-webkit-user-select:none;user-select:none}.van-sidebar-item__text{display:inline-block;position:relative;word-break:break-all}.van-sidebar-item--hover:not(.van-sidebar-item--disabled){background-color:var(--sidebar-active-color,var(--app-B6,#fff))}.van-sidebar-item:after{border-bottom-width:1px}.van-sidebar-item--selected{border-color:var(--sidebar-selected-border-color,#ee0a24);color:var(--sidebar-selected-text-color,var(--app-B6-N1,#000));font-weight:var(--sidebar-selected-font-weight,500)}.van-sidebar-item--selected:after{border-right-width:1px}.van-sidebar-item--selected,.van-sidebar-item--selected.van-sidebar-item--hover{background-color:var(--sidebar-selected-background-color,var(--app-B6,#fff))}.van-sidebar-item--disabled{color:var(--sidebar-disabled-text-color,var(--app-B6-N5,rgba(0,0,0,.3)))}
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1,29 @@
|
|
1
|
+
import { VantComponent } from '../common/component';
|
2
|
+
import { useParent } from '../common/relation';
|
3
|
+
VantComponent({
|
4
|
+
classes: ['active-class', 'disabled-class'],
|
5
|
+
relation: useParent('sidebar'),
|
6
|
+
props: {
|
7
|
+
dot: Boolean,
|
8
|
+
badge: null,
|
9
|
+
info: null,
|
10
|
+
title: String,
|
11
|
+
disabled: Boolean,
|
12
|
+
},
|
13
|
+
methods: {
|
14
|
+
onClick() {
|
15
|
+
const { parent } = this;
|
16
|
+
if (!parent || this.data.disabled) {
|
17
|
+
return;
|
18
|
+
}
|
19
|
+
const index = parent.children.indexOf(this);
|
20
|
+
parent.setActive(index).then(() => {
|
21
|
+
this.$emit('click', index);
|
22
|
+
parent.$emit('change', index);
|
23
|
+
});
|
24
|
+
},
|
25
|
+
setActive(selected) {
|
26
|
+
return this.setData({ selected });
|
27
|
+
},
|
28
|
+
},
|
29
|
+
});
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<wxs src="../wxs/utils.wxs" module="utils" />
|
2
|
+
|
3
|
+
<view
|
4
|
+
class="{{ utils.bem('sidebar-item', { selected, disabled }) }} {{ selected ? 'active-class' : '' }} {{ disabled ? 'disabled-class' : '' }} custom-class"
|
5
|
+
hover-class="van-sidebar-item--hover"
|
6
|
+
hover-stay-time="70"
|
7
|
+
bind:tap="onClick"
|
8
|
+
>
|
9
|
+
<view class="van-sidebar-item__text">
|
10
|
+
<van-info
|
11
|
+
wx:if="{{ badge != null || info !== null || dot }}"
|
12
|
+
dot="{{ dot }}"
|
13
|
+
info="{{ badge != null ? badge : info }}"
|
14
|
+
/>
|
15
|
+
<view wx:if="{{ title }}">{{ title }}</view>
|
16
|
+
<slot wx:else name="title" />
|
17
|
+
</view>
|
18
|
+
</view>
|
@@ -0,0 +1 @@
|
|
1
|
+
@import '../common/index.wxss';.van-sidebar-item{background-color:var(--sidebar-background-color,var(--app-B1,#f6f7fb));border-left:3px solid transparent;box-sizing:border-box;color:var(--sidebar-text-color,var(--app-B6-N1,#000));display:block;font-size:var(--sidebar-font-size,14px);line-height:var(--sidebar-line-height,20px);overflow:hidden;padding:var(--sidebar-padding,20px 12px 20px 8px);-webkit-user-select:none;user-select:none}.van-sidebar-item__text{display:inline-block;position:relative;word-break:break-all}.van-sidebar-item--hover:not(.van-sidebar-item--disabled){background-color:var(--sidebar-active-color,var(--app-B6,#fff))}.van-sidebar-item:after{border-bottom-width:1px}.van-sidebar-item--selected{border-color:var(--sidebar-selected-border-color,#ee0a24);color:var(--sidebar-selected-text-color,var(--app-B6-N1,#000));font-weight:var(--sidebar-selected-font-weight,500)}.van-sidebar-item--selected:after{border-right-width:1px}.van-sidebar-item--selected,.van-sidebar-item--selected.van-sidebar-item--hover{background-color:var(--sidebar-selected-background-color,var(--app-B6,#fff))}.van-sidebar-item--disabled{color:var(--sidebar-disabled-text-color,var(--app-B6-N5,rgba(0,0,0,.3)))}
|
@@ -0,0 +1 @@
|
|
1
|
+
@import '../common/index.css';.van-skeleton{box-sizing:border-box;display:flex;padding:var(--skeleton-padding,0 16px);width:100%}.van-skeleton__avatar{background-color:var(--skeleton-avatar-background-color,var(--app-B3,#fff));flex-shrink:0;margin-right:var(--padding-md,16px)}.van-skeleton__avatar--round{border-radius:100%}.van-skeleton__content{flex:1}.van-skeleton__avatar+.van-skeleton__content{padding-top:var(--padding-xs,8px)}.van-skeleton__row,.van-skeleton__title{background-color:var(--skeleton-row-background-color,var(--app-B3,#fff));height:var(--skeleton-row-height,16px)}.van-skeleton__title{margin:0}.van-skeleton__row:not(:first-child){margin-top:var(--skeleton-row-margin-top,12px)}.van-skeleton__title+.van-skeleton__row{margin-top:20px}.van-skeleton--animate{animation:van-skeleton-blink 1.2s ease-in-out infinite}@keyframes van-skeleton-blink{50%{opacity:.6}}
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1,46 @@
|
|
1
|
+
import { VantComponent } from '../common/component';
|
2
|
+
VantComponent({
|
3
|
+
classes: ['avatar-class', 'title-class', 'row-class'],
|
4
|
+
props: {
|
5
|
+
row: {
|
6
|
+
type: Number,
|
7
|
+
value: 0,
|
8
|
+
observer(value) {
|
9
|
+
this.setData({ rowArray: Array.from({ length: value }) });
|
10
|
+
},
|
11
|
+
},
|
12
|
+
title: Boolean,
|
13
|
+
avatar: Boolean,
|
14
|
+
loading: {
|
15
|
+
type: Boolean,
|
16
|
+
value: true,
|
17
|
+
},
|
18
|
+
animate: {
|
19
|
+
type: Boolean,
|
20
|
+
value: true,
|
21
|
+
},
|
22
|
+
avatarSize: {
|
23
|
+
type: String,
|
24
|
+
value: '32px',
|
25
|
+
},
|
26
|
+
avatarShape: {
|
27
|
+
type: String,
|
28
|
+
value: 'round',
|
29
|
+
},
|
30
|
+
titleWidth: {
|
31
|
+
type: String,
|
32
|
+
value: '40%',
|
33
|
+
},
|
34
|
+
rowWidth: {
|
35
|
+
type: null,
|
36
|
+
value: '100%',
|
37
|
+
observer(val) {
|
38
|
+
this.setData({ isArray: val instanceof Array });
|
39
|
+
},
|
40
|
+
},
|
41
|
+
},
|
42
|
+
data: {
|
43
|
+
isArray: false,
|
44
|
+
rowArray: [],
|
45
|
+
},
|
46
|
+
});
|
@@ -0,0 +1,29 @@
|
|
1
|
+
<wxs src="../wxs/utils.wxs" module="utils" />
|
2
|
+
|
3
|
+
<view
|
4
|
+
wx:if="{{ loading }}"
|
5
|
+
class="custom-class {{ utils.bem('skeleton', [{animate}]) }}"
|
6
|
+
>
|
7
|
+
<view
|
8
|
+
wx:if="{{ avatar }}"
|
9
|
+
class="avatar-class {{ utils.bem('skeleton__avatar', [avatarShape])}}"
|
10
|
+
style="{{ 'width:' + avatarSize + ';height:' + avatarSize }}"
|
11
|
+
/>
|
12
|
+
<view class="{{ utils.bem('skeleton__content')}}">
|
13
|
+
<view
|
14
|
+
wx:if="{{ title }}"
|
15
|
+
class="title-class {{ utils.bem('skeleton__title') }}"
|
16
|
+
style="{{ 'width:' + titleWidth }}"
|
17
|
+
/>
|
18
|
+
<view
|
19
|
+
wx:for="{{ rowArray }}"
|
20
|
+
wx:key="index"
|
21
|
+
wx:for-index="index"
|
22
|
+
class="row-class {{ utils.bem('skeleton__row') }}"
|
23
|
+
style="{{ 'width:' + (isArray ? rowWidth[index] : rowWidth) }}"
|
24
|
+
/>
|
25
|
+
</view>
|
26
|
+
</view>
|
27
|
+
<view wx:else class="{{ utils.bem('skeleton__content')}}">
|
28
|
+
<slot />
|
29
|
+
</view>
|
@@ -0,0 +1 @@
|
|
1
|
+
@import '../common/index.wxss';.van-skeleton{box-sizing:border-box;display:flex;padding:var(--skeleton-padding,0 16px);width:100%}.van-skeleton__avatar{background-color:var(--skeleton-avatar-background-color,var(--app-B3,#fff));flex-shrink:0;margin-right:var(--padding-md,16px)}.van-skeleton__avatar--round{border-radius:100%}.van-skeleton__content{flex:1}.van-skeleton__avatar+.van-skeleton__content{padding-top:var(--padding-xs,8px)}.van-skeleton__row,.van-skeleton__title{background-color:var(--skeleton-row-background-color,var(--app-B3,#fff));height:var(--skeleton-row-height,16px)}.van-skeleton__title{margin:0}.van-skeleton__row:not(:first-child){margin-top:var(--skeleton-row-margin-top,12px)}.van-skeleton__title+.van-skeleton__row{margin-top:20px}.van-skeleton--animate{animation:van-skeleton-blink 1.2s ease-in-out infinite}@keyframes van-skeleton-blink{50%{opacity:.6}}
|
@@ -0,0 +1 @@
|
|
1
|
+
@import '../common/index.css';.van-slider{background-color:var(--slider-inactive-background-color,#ebedf0);border-radius:999px;height:var(--slider-bar-height,2px);position:relative}.van-slider:before{bottom:calc(var(--padding-xs, 8px)*-1);content:"";left:0;position:absolute;right:0;top:calc(var(--padding-xs, 8px)*-1)}.van-slider__bar{background-color:var(--slider-active-background-color,#1989fa);border-radius:inherit;height:100%;position:relative;transition:all .2s;width:100%}.van-slider__button{background-color:var(--slider-button-background-color,#fff);border-radius:var(--slider-button-border-radius,50%);box-shadow:var(--slider-button-box-shadow,0 1px 2px rgba(0,0,0,.5));height:var(--slider-button-height,24px);width:var(--slider-button-width,24px)}.van-slider__button-wrapper,.van-slider__button-wrapper-right{position:absolute;right:0;top:50%;transform:translate3d(50%,-50%,0)}.van-slider__button-wrapper-left{left:0;position:absolute;top:50%;transform:translate3d(-50%,-50%,0)}.van-slider--disabled{opacity:var(--slider-disabled-opacity,.3)}.van-slider--vertical{display:inline-block;height:100%;width:var(--slider-bar-height,2px)}.van-slider--vertical .van-slider__button-wrapper,.van-slider--vertical .van-slider__button-wrapper-right{bottom:0;right:50%;top:auto;transform:translate3d(50%,50%,0)}.van-slider--vertical .van-slider__button-wrapper-left{left:auto;right:50%;top:0;transform:translate3d(50%,-50%,0)}.van-slider--vertical:before{bottom:0;left:-8px;right:-8px;top:0}
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1,210 @@
|
|
1
|
+
import { VantComponent } from '../common/component';
|
2
|
+
import { touch } from '../mixins/touch';
|
3
|
+
import { canIUseModel } from '../common/version';
|
4
|
+
import { getRect, addUnit, nextTick, addNumber, clamp } from '../common/utils';
|
5
|
+
const DRAG_STATUS = {
|
6
|
+
START: 'start',
|
7
|
+
MOVING: 'moving',
|
8
|
+
END: 'end',
|
9
|
+
};
|
10
|
+
VantComponent({
|
11
|
+
mixins: [touch],
|
12
|
+
props: {
|
13
|
+
range: {
|
14
|
+
type: Boolean,
|
15
|
+
value: true,
|
16
|
+
},
|
17
|
+
disabled: Boolean,
|
18
|
+
useButtonSlot: Boolean,
|
19
|
+
activeColor: String,
|
20
|
+
inactiveColor: String,
|
21
|
+
max: {
|
22
|
+
type: Number,
|
23
|
+
value: 100,
|
24
|
+
},
|
25
|
+
min: {
|
26
|
+
type: Number,
|
27
|
+
value: 0,
|
28
|
+
},
|
29
|
+
step: {
|
30
|
+
type: Number,
|
31
|
+
value: 1,
|
32
|
+
},
|
33
|
+
value: {
|
34
|
+
type: null,
|
35
|
+
value: 0,
|
36
|
+
observer(val) {
|
37
|
+
if (val !== this.value) {
|
38
|
+
this.updateValue(val);
|
39
|
+
}
|
40
|
+
},
|
41
|
+
},
|
42
|
+
vertical: Boolean,
|
43
|
+
barHeight: null,
|
44
|
+
},
|
45
|
+
created() {
|
46
|
+
this.updateValue(this.data.value);
|
47
|
+
},
|
48
|
+
methods: {
|
49
|
+
onTouchStart(event) {
|
50
|
+
if (this.data.disabled)
|
51
|
+
return;
|
52
|
+
const { index } = event.currentTarget.dataset;
|
53
|
+
if (typeof index === 'number') {
|
54
|
+
this.buttonIndex = index;
|
55
|
+
}
|
56
|
+
this.touchStart(event);
|
57
|
+
this.startValue = this.format(this.value);
|
58
|
+
this.newValue = this.value;
|
59
|
+
if (this.isRange(this.newValue)) {
|
60
|
+
this.startValue = this.newValue.map((val) => this.format(val));
|
61
|
+
}
|
62
|
+
else {
|
63
|
+
this.startValue = this.format(this.newValue);
|
64
|
+
}
|
65
|
+
this.dragStatus = DRAG_STATUS.START;
|
66
|
+
},
|
67
|
+
onTouchMove(event) {
|
68
|
+
if (this.data.disabled)
|
69
|
+
return;
|
70
|
+
if (this.dragStatus === DRAG_STATUS.START) {
|
71
|
+
this.$emit('drag-start');
|
72
|
+
}
|
73
|
+
this.touchMove(event);
|
74
|
+
this.dragStatus = DRAG_STATUS.MOVING;
|
75
|
+
getRect(this, '.van-slider').then((rect) => {
|
76
|
+
const { vertical } = this.data;
|
77
|
+
const delta = vertical ? this.deltaY : this.deltaX;
|
78
|
+
const total = vertical ? rect.height : rect.width;
|
79
|
+
const diff = (delta / total) * this.getRange();
|
80
|
+
if (this.isRange(this.startValue)) {
|
81
|
+
this.newValue[this.buttonIndex] =
|
82
|
+
this.startValue[this.buttonIndex] + diff;
|
83
|
+
}
|
84
|
+
else {
|
85
|
+
this.newValue = this.startValue + diff;
|
86
|
+
}
|
87
|
+
this.updateValue(this.newValue, false, true);
|
88
|
+
});
|
89
|
+
},
|
90
|
+
onTouchEnd() {
|
91
|
+
if (this.data.disabled)
|
92
|
+
return;
|
93
|
+
if (this.dragStatus === DRAG_STATUS.MOVING) {
|
94
|
+
this.dragStatus = DRAG_STATUS.END;
|
95
|
+
nextTick(() => {
|
96
|
+
this.updateValue(this.newValue, true);
|
97
|
+
this.$emit('drag-end');
|
98
|
+
});
|
99
|
+
}
|
100
|
+
},
|
101
|
+
onClick(event) {
|
102
|
+
if (this.data.disabled)
|
103
|
+
return;
|
104
|
+
const { min } = this.data;
|
105
|
+
getRect(this, '.van-slider').then((rect) => {
|
106
|
+
const { vertical } = this.data;
|
107
|
+
const touch = event.touches[0];
|
108
|
+
const delta = vertical
|
109
|
+
? touch.clientY - rect.top
|
110
|
+
: touch.clientX - rect.left;
|
111
|
+
const total = vertical ? rect.height : rect.width;
|
112
|
+
const value = Number(min) + (delta / total) * this.getRange();
|
113
|
+
if (this.isRange(this.value)) {
|
114
|
+
const [left, right] = this.value;
|
115
|
+
const middle = (left + right) / 2;
|
116
|
+
if (value <= middle) {
|
117
|
+
this.updateValue([value, right], true);
|
118
|
+
}
|
119
|
+
else {
|
120
|
+
this.updateValue([left, value], true);
|
121
|
+
}
|
122
|
+
}
|
123
|
+
else {
|
124
|
+
this.updateValue(value, true);
|
125
|
+
}
|
126
|
+
});
|
127
|
+
},
|
128
|
+
isRange(val) {
|
129
|
+
const { range } = this.data;
|
130
|
+
return range && Array.isArray(val);
|
131
|
+
},
|
132
|
+
handleOverlap(value) {
|
133
|
+
if (value[0] > value[1]) {
|
134
|
+
return value.slice(0).reverse();
|
135
|
+
}
|
136
|
+
return value;
|
137
|
+
},
|
138
|
+
updateValue(value, end, drag) {
|
139
|
+
if (this.isRange(value)) {
|
140
|
+
value = this.handleOverlap(value).map((val) => this.format(val));
|
141
|
+
}
|
142
|
+
else {
|
143
|
+
value = this.format(value);
|
144
|
+
}
|
145
|
+
this.value = value;
|
146
|
+
const { vertical } = this.data;
|
147
|
+
const mainAxis = vertical ? 'height' : 'width';
|
148
|
+
this.setData({
|
149
|
+
wrapperStyle: `
|
150
|
+
background: ${this.data.inactiveColor || ''};
|
151
|
+
${vertical ? 'width' : 'height'}: ${addUnit(this.data.barHeight) || ''};
|
152
|
+
`,
|
153
|
+
barStyle: `
|
154
|
+
${mainAxis}: ${this.calcMainAxis()};
|
155
|
+
left: ${vertical ? 0 : this.calcOffset()};
|
156
|
+
top: ${vertical ? this.calcOffset() : 0};
|
157
|
+
${drag ? 'transition: none;' : ''}
|
158
|
+
`,
|
159
|
+
});
|
160
|
+
if (drag) {
|
161
|
+
this.$emit('drag', { value });
|
162
|
+
}
|
163
|
+
if (end) {
|
164
|
+
this.$emit('change', value);
|
165
|
+
}
|
166
|
+
if ((drag || end) && canIUseModel()) {
|
167
|
+
this.setData({ value });
|
168
|
+
}
|
169
|
+
},
|
170
|
+
getScope() {
|
171
|
+
return Number(this.data.max) - Number(this.data.min);
|
172
|
+
},
|
173
|
+
getRange() {
|
174
|
+
const { max, min } = this.data;
|
175
|
+
return max - min;
|
176
|
+
},
|
177
|
+
getOffsetWidth(current, min) {
|
178
|
+
const scope = this.getScope();
|
179
|
+
// 避免最小值小于最小step时出现负数情况
|
180
|
+
return `${Math.max(((current - min) * 100) / scope, 0)}%`;
|
181
|
+
},
|
182
|
+
// 计算选中条的长度百分比
|
183
|
+
calcMainAxis() {
|
184
|
+
const { value } = this;
|
185
|
+
const { min } = this.data;
|
186
|
+
if (this.isRange(value)) {
|
187
|
+
return this.getOffsetWidth(value[1], value[0]);
|
188
|
+
}
|
189
|
+
return this.getOffsetWidth(value, Number(min));
|
190
|
+
},
|
191
|
+
// 计算选中条的开始位置的偏移量
|
192
|
+
calcOffset() {
|
193
|
+
const { value } = this;
|
194
|
+
const { min } = this.data;
|
195
|
+
const scope = this.getScope();
|
196
|
+
if (this.isRange(value)) {
|
197
|
+
return `${((value[0] - Number(min)) * 100) / scope}%`;
|
198
|
+
}
|
199
|
+
return '0%';
|
200
|
+
},
|
201
|
+
format(value) {
|
202
|
+
const min = +this.data.min;
|
203
|
+
const max = +this.data.max;
|
204
|
+
const step = +this.data.step;
|
205
|
+
value = clamp(value, min, max);
|
206
|
+
const diff = Math.round((value - min) / step) * step;
|
207
|
+
return addNumber(min, diff);
|
208
|
+
},
|
209
|
+
},
|
210
|
+
});
|
@@ -0,0 +1,68 @@
|
|
1
|
+
<wxs src="../wxs/utils.wxs" module="utils" />
|
2
|
+
<wxs src="../wxs/style.wxs" module="style" />
|
3
|
+
|
4
|
+
<view
|
5
|
+
class="custom-class {{ utils.bem('slider', { disabled, vertical }) }}"
|
6
|
+
style="{{ wrapperStyle }}"
|
7
|
+
bind:tap="onClick"
|
8
|
+
>
|
9
|
+
<view
|
10
|
+
class="{{ utils.bem('slider__bar') }}"
|
11
|
+
style="{{ barStyle }}; {{ style({ backgroundColor: activeColor }) }}"
|
12
|
+
>
|
13
|
+
<view
|
14
|
+
wx:if="{{ range }}"
|
15
|
+
class="{{ utils.bem('slider__button-wrapper-left') }}"
|
16
|
+
data-index="{{ 0 }}"
|
17
|
+
bind:touchstart="onTouchStart"
|
18
|
+
catch:touchmove="onTouchMove"
|
19
|
+
bind:touchend="onTouchEnd"
|
20
|
+
bind:touchcancel="onTouchEnd"
|
21
|
+
>
|
22
|
+
<slot
|
23
|
+
wx:if="{{ useButtonSlot }}"
|
24
|
+
name="left-button"
|
25
|
+
/>
|
26
|
+
<view
|
27
|
+
wx:else
|
28
|
+
class="{{ utils.bem('slider__button') }}"
|
29
|
+
/>
|
30
|
+
</view>
|
31
|
+
<view
|
32
|
+
wx:if="{{ range }}"
|
33
|
+
class="{{ utils.bem('slider__button-wrapper-right') }}"
|
34
|
+
data-index="{{ 1 }}"
|
35
|
+
bind:touchstart="onTouchStart"
|
36
|
+
catch:touchmove="onTouchMove"
|
37
|
+
bind:touchend="onTouchEnd"
|
38
|
+
bind:touchcancel="onTouchEnd"
|
39
|
+
>
|
40
|
+
<slot
|
41
|
+
wx:if="{{ useButtonSlot }}"
|
42
|
+
name="right-button"
|
43
|
+
/>
|
44
|
+
<view
|
45
|
+
wx:else
|
46
|
+
class="{{ utils.bem('slider__button') }}"
|
47
|
+
/>
|
48
|
+
</view>
|
49
|
+
|
50
|
+
<view
|
51
|
+
wx:if="{{ !range }}"
|
52
|
+
class="{{ utils.bem('slider__button-wrapper') }}"
|
53
|
+
bind:touchstart="onTouchStart"
|
54
|
+
catch:touchmove="onTouchMove"
|
55
|
+
bind:touchend="onTouchEnd"
|
56
|
+
bind:touchcancel="onTouchEnd"
|
57
|
+
>
|
58
|
+
<slot
|
59
|
+
wx:if="{{ useButtonSlot }}"
|
60
|
+
name="button"
|
61
|
+
/>
|
62
|
+
<view
|
63
|
+
wx:else
|
64
|
+
class="{{ utils.bem('slider__button') }}"
|
65
|
+
/>
|
66
|
+
</view>
|
67
|
+
</view>
|
68
|
+
</view>
|
@@ -0,0 +1,14 @@
|
|
1
|
+
/* eslint-disable */
|
2
|
+
var style = require('../wxs/style.wxs');
|
3
|
+
var addUnit = require('../wxs/add-unit.wxs');
|
4
|
+
|
5
|
+
function barStyle(barHeight, activeColor) {
|
6
|
+
return style({
|
7
|
+
height: addUnit(barHeight),
|
8
|
+
background: activeColor,
|
9
|
+
});
|
10
|
+
}
|
11
|
+
|
12
|
+
module.exports = {
|
13
|
+
barStyle: barStyle,
|
14
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
@import '../common/index.wxss';.van-slider{background-color:var(--slider-inactive-background-color,#ebedf0);border-radius:999px;height:var(--slider-bar-height,2px);position:relative}.van-slider:before{bottom:calc(var(--padding-xs, 8px)*-1);content:"";left:0;position:absolute;right:0;top:calc(var(--padding-xs, 8px)*-1)}.van-slider__bar{background-color:var(--slider-active-background-color,#1989fa);border-radius:inherit;height:100%;position:relative;transition:all .2s;width:100%}.van-slider__button{background-color:var(--slider-button-background-color,#fff);border-radius:var(--slider-button-border-radius,50%);box-shadow:var(--slider-button-box-shadow,0 1px 2px rgba(0,0,0,.5));height:var(--slider-button-height,24px);width:var(--slider-button-width,24px)}.van-slider__button-wrapper,.van-slider__button-wrapper-right{position:absolute;right:0;top:50%;transform:translate3d(50%,-50%,0)}.van-slider__button-wrapper-left{left:0;position:absolute;top:50%;transform:translate3d(-50%,-50%,0)}.van-slider--disabled{opacity:var(--slider-disabled-opacity,.3)}.van-slider--vertical{display:inline-block;height:100%;width:var(--slider-bar-height,2px)}.van-slider--vertical .van-slider__button-wrapper,.van-slider--vertical .van-slider__button-wrapper-right{bottom:0;right:50%;top:auto;transform:translate3d(50%,50%,0)}.van-slider--vertical .van-slider__button-wrapper-left{left:auto;right:50%;top:0;transform:translate3d(50%,-50%,0)}.van-slider--vertical:before{bottom:0;left:-8px;right:-8px;top:0}
|
@@ -0,0 +1 @@
|
|
1
|
+
@import '../common/index.css';:root{--stepper-container-background-color:rgba(0,0,0,.05)}:root[theme=dark]{--stepper-container-background-color:hsla(0,0%,100%,.05)}.van-stepper{background:var(--stepper-container-background-color);border-radius:var(--stepper-background-border-radius,10px);display:inline-block;font-size:0;padding:var(--stepper-padding,2px)}.van-stepper__minus,.van-stepper__plus{background-color:var(--stepper-background-color,var(--app-B6,#fff));border:0;box-sizing:border-box;color:var(--stepper-button-icon-color,var(--app-B6-N3,rgba(0,0,0,.5)));display:inline-block;height:var(--stepper-input-height,28px);padding:var(--padding-base,4px);position:relative;vertical-align:middle;width:var(--stepper-input-height,44px)}.van-stepper__minus:before,.van-stepper__plus:before{border-radius:2px;height:2px;width:14px}.van-stepper__minus:after,.van-stepper__plus:after{border-radius:2px;height:14px;width:2px}.van-stepper__minus:empty.van-stepper__minus:after,.van-stepper__minus:empty.van-stepper__minus:before,.van-stepper__minus:empty.van-stepper__plus:after,.van-stepper__minus:empty.van-stepper__plus:before,.van-stepper__plus:empty.van-stepper__minus:after,.van-stepper__plus:empty.van-stepper__minus:before,.van-stepper__plus:empty.van-stepper__plus:after,.van-stepper__plus:empty.van-stepper__plus:before{background-color:currentColor;bottom:0;content:"";left:0;margin:auto;position:absolute;right:0;top:0}.van-stepper__minus--hover,.van-stepper__plus--hover{background-color:var(--stepper-active-color,#e8e8e8)}.van-stepper__minus--disabled,.van-stepper__plus--disabled{background-color:var(--stepper-button-disabled-color,none);color:var(--stepper-button-disabled-icon-color,var(--app-B6-N7,rgba(0,0,0,.1)))}.van-stepper__minus--disabled.van-stepper__minus--hover,.van-stepper__minus--disabled.van-stepper__plus--hover,.van-stepper__plus--disabled.van-stepper__minus--hover,.van-stepper__plus--disabled.van-stepper__plus--hover{background-color:var(--stepper-button-disabled-color,none)}.van-stepper__minus{border-radius:var(--stepper-border-radius,var(--stepper-border-radius,8px))}.van-stepper__minus:after{display:none}.van-stepper__plus{border-radius:var(--stepper-border-radius,var(--stepper-border-radius,8px))}.van-stepper--round .van-stepper__input{background-color:initial!important}.van-stepper--round .van-stepper__minus,.van-stepper--round .van-stepper__plus{border-radius:100%}.van-stepper--round .van-stepper__minus:active,.van-stepper--round .van-stepper__plus:active{opacity:.7}.van-stepper--round .van-stepper__minus--disabled,.van-stepper--round .van-stepper__minus--disabled:active,.van-stepper--round .van-stepper__plus--disabled,.van-stepper--round .van-stepper__plus--disabled:active{opacity:.3}.van-stepper--round .van-stepper__plus{background-color:#ee0a24;color:#fff}.van-stepper--round .van-stepper__minus{background-color:#fff;border:1px solid #ee0a24;color:#ee0a24}.van-stepper__input{-webkit-appearance:none;border:0;border-radius:0;border-width:1px 0;box-sizing:border-box;color:var(--stepper-input-text-color,var(--app-B6-N3,rgba(0,0,0,.5)));display:inline-block;font-size:var(--stepper-input-font-size,16px);height:var(--stepper-input-height,28px);min-height:0;padding:1px;text-align:center;vertical-align:middle;width:var(--stepper-input-width,50px)}.van-stepper__input--disabled{color:var(--stepper-input-disabled-text-color,var(--app-B6-N7,rgba(0,0,0,.1)))}
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|