@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,302 @@
|
|
1
|
+
import { VantComponent } from '../common/component';
|
2
|
+
import { touch } from '../mixins/touch';
|
3
|
+
import { getAllRect, getRect, groupSetData, nextTick, requestAnimationFrame, } from '../common/utils';
|
4
|
+
import { isDef } from '../common/validator';
|
5
|
+
import { useChildren } from '../common/relation';
|
6
|
+
VantComponent({
|
7
|
+
mixins: [touch],
|
8
|
+
classes: [
|
9
|
+
'nav-class',
|
10
|
+
'tab-class',
|
11
|
+
'tab-active-class',
|
12
|
+
'line-class',
|
13
|
+
'wrap-class',
|
14
|
+
],
|
15
|
+
relation: useChildren('tab', function () {
|
16
|
+
this.updateTabs();
|
17
|
+
}),
|
18
|
+
props: {
|
19
|
+
sticky: Boolean,
|
20
|
+
border: Boolean,
|
21
|
+
swipeable: Boolean,
|
22
|
+
titleActiveColor: String,
|
23
|
+
titleInactiveColor: String,
|
24
|
+
color: String,
|
25
|
+
animated: {
|
26
|
+
type: Boolean,
|
27
|
+
observer() {
|
28
|
+
this.children.forEach((child, index) => child.updateRender(index === this.data.currentIndex, this));
|
29
|
+
},
|
30
|
+
},
|
31
|
+
lineWidth: {
|
32
|
+
type: null,
|
33
|
+
value: 16,
|
34
|
+
observer: 'resize',
|
35
|
+
},
|
36
|
+
lineHeight: {
|
37
|
+
type: null,
|
38
|
+
value: -1,
|
39
|
+
},
|
40
|
+
active: {
|
41
|
+
type: null,
|
42
|
+
value: 0,
|
43
|
+
observer(name) {
|
44
|
+
if (name !== this.getCurrentName()) {
|
45
|
+
this.setCurrentIndexByName(name);
|
46
|
+
}
|
47
|
+
},
|
48
|
+
},
|
49
|
+
type: {
|
50
|
+
type: String,
|
51
|
+
value: 'line',
|
52
|
+
},
|
53
|
+
ellipsis: {
|
54
|
+
type: Boolean,
|
55
|
+
value: true,
|
56
|
+
},
|
57
|
+
duration: {
|
58
|
+
type: Number,
|
59
|
+
value: 0.3,
|
60
|
+
},
|
61
|
+
zIndex: {
|
62
|
+
type: Number,
|
63
|
+
value: 1,
|
64
|
+
},
|
65
|
+
swipeThreshold: {
|
66
|
+
type: Number,
|
67
|
+
value: 5,
|
68
|
+
observer(value) {
|
69
|
+
this.setData({
|
70
|
+
scrollable: this.children.length > value || !this.data.ellipsis,
|
71
|
+
});
|
72
|
+
},
|
73
|
+
},
|
74
|
+
offsetTop: {
|
75
|
+
type: Number,
|
76
|
+
value: 0,
|
77
|
+
},
|
78
|
+
lazyRender: {
|
79
|
+
type: Boolean,
|
80
|
+
value: true,
|
81
|
+
},
|
82
|
+
useBeforeChange: {
|
83
|
+
type: Boolean,
|
84
|
+
value: false,
|
85
|
+
},
|
86
|
+
},
|
87
|
+
data: {
|
88
|
+
tabs: [],
|
89
|
+
scrollLeft: 0,
|
90
|
+
scrollable: false,
|
91
|
+
currentIndex: 0,
|
92
|
+
container: null,
|
93
|
+
skipTransition: true,
|
94
|
+
scrollWithAnimation: false,
|
95
|
+
lineOffsetLeft: 0,
|
96
|
+
inited: false,
|
97
|
+
},
|
98
|
+
mounted() {
|
99
|
+
requestAnimationFrame(() => {
|
100
|
+
this.swiping = true;
|
101
|
+
this.setData({
|
102
|
+
container: () => this.createSelectorQuery().select('.van-tabs'),
|
103
|
+
});
|
104
|
+
this.resize();
|
105
|
+
this.scrollIntoView();
|
106
|
+
});
|
107
|
+
},
|
108
|
+
methods: {
|
109
|
+
updateTabs() {
|
110
|
+
const { children = [], data } = this;
|
111
|
+
this.setData({
|
112
|
+
tabs: children.map((child) => child.data),
|
113
|
+
scrollable: this.children.length > data.swipeThreshold || !data.ellipsis,
|
114
|
+
});
|
115
|
+
this.setCurrentIndexByName(data.active || this.getCurrentName());
|
116
|
+
},
|
117
|
+
trigger(eventName, child) {
|
118
|
+
const { currentIndex } = this.data;
|
119
|
+
const data = this.getChildData(currentIndex, child);
|
120
|
+
if (!isDef(data)) {
|
121
|
+
return;
|
122
|
+
}
|
123
|
+
this.$emit(eventName, data);
|
124
|
+
},
|
125
|
+
onTap(event) {
|
126
|
+
const { index } = event.currentTarget.dataset;
|
127
|
+
const child = this.children[index];
|
128
|
+
if (child.data.disabled) {
|
129
|
+
this.trigger('disabled', child);
|
130
|
+
return;
|
131
|
+
}
|
132
|
+
this.onBeforeChange(index).then(() => {
|
133
|
+
this.setCurrentIndex(index);
|
134
|
+
nextTick(() => {
|
135
|
+
this.trigger('click');
|
136
|
+
});
|
137
|
+
});
|
138
|
+
},
|
139
|
+
// correct the index of active tab
|
140
|
+
setCurrentIndexByName(name) {
|
141
|
+
const { children = [] } = this;
|
142
|
+
const matched = children.filter((child) => child.getComputedName() === name);
|
143
|
+
if (matched.length) {
|
144
|
+
this.setCurrentIndex(matched[0].index);
|
145
|
+
}
|
146
|
+
},
|
147
|
+
setCurrentIndex(currentIndex) {
|
148
|
+
const { data, children = [] } = this;
|
149
|
+
if (!isDef(currentIndex) ||
|
150
|
+
currentIndex >= children.length ||
|
151
|
+
currentIndex < 0) {
|
152
|
+
return;
|
153
|
+
}
|
154
|
+
groupSetData(this, () => {
|
155
|
+
children.forEach((item, index) => {
|
156
|
+
const active = index === currentIndex;
|
157
|
+
if (active !== item.data.active || !item.inited) {
|
158
|
+
item.updateRender(active, this);
|
159
|
+
}
|
160
|
+
});
|
161
|
+
});
|
162
|
+
if (currentIndex === data.currentIndex) {
|
163
|
+
if (!data.inited) {
|
164
|
+
this.resize();
|
165
|
+
}
|
166
|
+
return;
|
167
|
+
}
|
168
|
+
const shouldEmitChange = data.currentIndex !== null;
|
169
|
+
this.setData({ currentIndex });
|
170
|
+
requestAnimationFrame(() => {
|
171
|
+
this.resize();
|
172
|
+
this.scrollIntoView();
|
173
|
+
});
|
174
|
+
nextTick(() => {
|
175
|
+
this.trigger('input');
|
176
|
+
if (shouldEmitChange) {
|
177
|
+
this.trigger('change');
|
178
|
+
}
|
179
|
+
});
|
180
|
+
},
|
181
|
+
getCurrentName() {
|
182
|
+
const activeTab = this.children[this.data.currentIndex];
|
183
|
+
if (activeTab) {
|
184
|
+
return activeTab.getComputedName();
|
185
|
+
}
|
186
|
+
},
|
187
|
+
resize() {
|
188
|
+
if (this.data.type !== 'line') {
|
189
|
+
return;
|
190
|
+
}
|
191
|
+
const { currentIndex, ellipsis, skipTransition } = this.data;
|
192
|
+
Promise.all([
|
193
|
+
getAllRect(this, '.van-tab'),
|
194
|
+
getRect(this, '.van-tabs__line'),
|
195
|
+
]).then(([rects = [], lineRect]) => {
|
196
|
+
const rect = rects[currentIndex];
|
197
|
+
if (rect == null) {
|
198
|
+
return;
|
199
|
+
}
|
200
|
+
let lineOffsetLeft = rects
|
201
|
+
.slice(0, currentIndex)
|
202
|
+
.reduce((prev, curr) => prev + curr.width, 0);
|
203
|
+
lineOffsetLeft +=
|
204
|
+
(rect.width - lineRect.width) / 2 + (ellipsis ? 0 : 8);
|
205
|
+
this.setData({ lineOffsetLeft, inited: true });
|
206
|
+
this.swiping = true;
|
207
|
+
if (skipTransition) {
|
208
|
+
// waiting transition end
|
209
|
+
setTimeout(() => {
|
210
|
+
this.setData({ skipTransition: false });
|
211
|
+
}, this.data.duration);
|
212
|
+
}
|
213
|
+
});
|
214
|
+
},
|
215
|
+
// scroll active tab into view
|
216
|
+
scrollIntoView() {
|
217
|
+
const { currentIndex, scrollable, scrollWithAnimation } = this.data;
|
218
|
+
if (!scrollable) {
|
219
|
+
return;
|
220
|
+
}
|
221
|
+
Promise.all([
|
222
|
+
getAllRect(this, '.van-tab'),
|
223
|
+
getRect(this, '.van-tabs__nav'),
|
224
|
+
]).then(([tabRects, navRect]) => {
|
225
|
+
const tabRect = tabRects[currentIndex];
|
226
|
+
const offsetLeft = tabRects
|
227
|
+
.slice(0, currentIndex)
|
228
|
+
.reduce((prev, curr) => prev + curr.width, 0);
|
229
|
+
this.setData({
|
230
|
+
scrollLeft: offsetLeft - (navRect.width - tabRect.width) / 2,
|
231
|
+
});
|
232
|
+
if (!scrollWithAnimation) {
|
233
|
+
nextTick(() => {
|
234
|
+
this.setData({ scrollWithAnimation: true });
|
235
|
+
});
|
236
|
+
}
|
237
|
+
});
|
238
|
+
},
|
239
|
+
onTouchScroll(event) {
|
240
|
+
this.$emit('scroll', event.detail);
|
241
|
+
},
|
242
|
+
onTouchStart(event) {
|
243
|
+
if (!this.data.swipeable)
|
244
|
+
return;
|
245
|
+
this.swiping = true;
|
246
|
+
this.touchStart(event);
|
247
|
+
},
|
248
|
+
onTouchMove(event) {
|
249
|
+
if (!this.data.swipeable || !this.swiping)
|
250
|
+
return;
|
251
|
+
this.touchMove(event);
|
252
|
+
},
|
253
|
+
// watch swipe touch end
|
254
|
+
onTouchEnd() {
|
255
|
+
if (!this.data.swipeable || !this.swiping)
|
256
|
+
return;
|
257
|
+
const { direction, deltaX, offsetX } = this;
|
258
|
+
const minSwipeDistance = 50;
|
259
|
+
if (direction === 'horizontal' && offsetX >= minSwipeDistance) {
|
260
|
+
const index = this.getAvaiableTab(deltaX);
|
261
|
+
if (index !== -1) {
|
262
|
+
this.onBeforeChange(index).then(() => this.setCurrentIndex(index));
|
263
|
+
}
|
264
|
+
}
|
265
|
+
this.swiping = false;
|
266
|
+
},
|
267
|
+
getAvaiableTab(direction) {
|
268
|
+
const { tabs, currentIndex } = this.data;
|
269
|
+
const step = direction > 0 ? -1 : 1;
|
270
|
+
for (let i = step; currentIndex + i < tabs.length && currentIndex + i >= 0; i += step) {
|
271
|
+
const index = currentIndex + i;
|
272
|
+
if (index >= 0 &&
|
273
|
+
index < tabs.length &&
|
274
|
+
tabs[index] &&
|
275
|
+
!tabs[index].disabled) {
|
276
|
+
return index;
|
277
|
+
}
|
278
|
+
}
|
279
|
+
return -1;
|
280
|
+
},
|
281
|
+
onBeforeChange(index) {
|
282
|
+
const { useBeforeChange } = this.data;
|
283
|
+
if (!useBeforeChange) {
|
284
|
+
return Promise.resolve();
|
285
|
+
}
|
286
|
+
return new Promise((resolve, reject) => {
|
287
|
+
this.$emit('before-change', Object.assign(Object.assign({}, this.getChildData(index)), { callback: (status) => (status ? resolve() : reject()) }));
|
288
|
+
});
|
289
|
+
},
|
290
|
+
getChildData(index, child) {
|
291
|
+
const currentChild = child || this.children[index];
|
292
|
+
if (!isDef(currentChild)) {
|
293
|
+
return;
|
294
|
+
}
|
295
|
+
return {
|
296
|
+
index: currentChild.index,
|
297
|
+
name: currentChild.getComputedName(),
|
298
|
+
title: currentChild.data.title,
|
299
|
+
};
|
300
|
+
},
|
301
|
+
},
|
302
|
+
});
|
@@ -0,0 +1,63 @@
|
|
1
|
+
<wxs src="../wxs/utils.wxs" module="utils" />
|
2
|
+
<wxs src="./index.wxs" module="computed" />
|
3
|
+
|
4
|
+
<view class="custom-class {{ utils.bem('tabs') }}">
|
5
|
+
<van-sticky
|
6
|
+
disabled="{{ !sticky }}"
|
7
|
+
z-index="{{ zIndex }}"
|
8
|
+
offset-top="{{ offsetTop }}"
|
9
|
+
container="{{ container }}"
|
10
|
+
bind:scroll="onTouchScroll"
|
11
|
+
>
|
12
|
+
<view class="{{ utils.bem('tabs--') + type }} {{ utils.bem('tabs__wrap', { scrollable }) }} {{ type === 'line' && border ? 'van-hairline--top-bottom' : '' }} wrap-class">
|
13
|
+
<slot name="nav-left" />
|
14
|
+
|
15
|
+
<scroll-view
|
16
|
+
scroll-x="{{ scrollable }}"
|
17
|
+
scroll-with-animation="{{ scrollWithAnimation }}"
|
18
|
+
scroll-left="{{ scrollLeft }}"
|
19
|
+
class="{{ utils.bem('tabs__scroll', [type]) }}"
|
20
|
+
style="{{ color ? 'border-color: ' + color : '' }}"
|
21
|
+
>
|
22
|
+
<view class="{{ utils.bem('tabs__nav', [type, { complete: !ellipsis }]) }} nav-class" style="{{ computed.navStyle(color, type) }}">
|
23
|
+
<view wx:if="{{ type === 'line' }}" class="van-tabs__line" style="{{ computed.lineStyle({ color, lineOffsetLeft, lineHeight, skipTransition, duration, lineWidth, inited }) }}" />
|
24
|
+
<view
|
25
|
+
wx:for="{{ tabs }}"
|
26
|
+
wx:key="index"
|
27
|
+
data-index="{{ index }}"
|
28
|
+
class="{{ computed.tabClass(index === currentIndex, ellipsis) }} {{ utils.bem('tab', { active: index === currentIndex, disabled: item.disabled, complete: !ellipsis }) }}"
|
29
|
+
style="{{ computed.tabStyle({ active: index === currentIndex, ellipsis, color, type, disabled: item.disabled, titleActiveColor, titleInactiveColor, swipeThreshold, scrollable }) }}"
|
30
|
+
bind:tap="onTap"
|
31
|
+
>
|
32
|
+
<view class="{{ ellipsis ? 'van-ellipsis' : '' }}" style="{{ item.titleStyle }}">
|
33
|
+
{{ item.title }}
|
34
|
+
<van-info
|
35
|
+
wx:if="{{ item.info !== null || item.dot }}"
|
36
|
+
info="{{ item.info }}"
|
37
|
+
dot="{{ item.dot }}"
|
38
|
+
custom-class="van-tab__title__info"
|
39
|
+
/>
|
40
|
+
</view>
|
41
|
+
</view>
|
42
|
+
</view>
|
43
|
+
</scroll-view>
|
44
|
+
|
45
|
+
<slot name="nav-right" />
|
46
|
+
</view>
|
47
|
+
</van-sticky>
|
48
|
+
|
49
|
+
<view
|
50
|
+
class="van-tabs__content"
|
51
|
+
bind:touchstart="onTouchStart"
|
52
|
+
bind:touchmove="onTouchMove"
|
53
|
+
bind:touchend="onTouchEnd"
|
54
|
+
bind:touchcancel="onTouchEnd"
|
55
|
+
>
|
56
|
+
<view
|
57
|
+
class="{{ utils.bem('tabs__track', [{ animated }]) }} van-tabs__track"
|
58
|
+
style="{{ computed.trackStyle({ duration, currentIndex, animated }) }}"
|
59
|
+
>
|
60
|
+
<slot />
|
61
|
+
</view>
|
62
|
+
</view>
|
63
|
+
</view>
|
@@ -0,0 +1,83 @@
|
|
1
|
+
/* eslint-disable */
|
2
|
+
var utils = require('../wxs/utils.wxs');
|
3
|
+
var style = require('../wxs/style.wxs');
|
4
|
+
|
5
|
+
function tabClass(active, ellipsis) {
|
6
|
+
var classes = ['tab-class'];
|
7
|
+
|
8
|
+
if (active) {
|
9
|
+
classes.push('tab-active-class');
|
10
|
+
}
|
11
|
+
|
12
|
+
if (ellipsis) {
|
13
|
+
classes.push('van-ellipsis');
|
14
|
+
}
|
15
|
+
|
16
|
+
return classes.join(' ');
|
17
|
+
}
|
18
|
+
|
19
|
+
function tabStyle(data) {
|
20
|
+
var titleColor = data.active
|
21
|
+
? data.titleActiveColor
|
22
|
+
: data.titleInactiveColor;
|
23
|
+
|
24
|
+
var ellipsis = data.scrollable && data.ellipsis;
|
25
|
+
|
26
|
+
// card theme color
|
27
|
+
if (data.type === 'card') {
|
28
|
+
return style({
|
29
|
+
'border-color': data.color,
|
30
|
+
'background-color': !data.disabled && data.active ? data.color : null,
|
31
|
+
color: titleColor || (!data.disabled && !data.active ? data.color : null),
|
32
|
+
'flex-basis': ellipsis ? 88 / data.swipeThreshold + '%' : null,
|
33
|
+
});
|
34
|
+
}
|
35
|
+
|
36
|
+
return style({
|
37
|
+
color: titleColor,
|
38
|
+
'flex-basis': ellipsis ? 88 / data.swipeThreshold + '%' : null,
|
39
|
+
});
|
40
|
+
}
|
41
|
+
|
42
|
+
function navStyle(color, type) {
|
43
|
+
return style({
|
44
|
+
'border-color': type === 'card' && color ? color : null,
|
45
|
+
});
|
46
|
+
}
|
47
|
+
|
48
|
+
function trackStyle(data) {
|
49
|
+
if (!data.animated) {
|
50
|
+
return '';
|
51
|
+
}
|
52
|
+
|
53
|
+
return style({
|
54
|
+
left: -100 * data.currentIndex + '%',
|
55
|
+
'transition-duration': data.duration + 's',
|
56
|
+
'-webkit-transition-duration': data.duration + 's',
|
57
|
+
});
|
58
|
+
}
|
59
|
+
|
60
|
+
function lineStyle(data) {
|
61
|
+
return style({
|
62
|
+
width: utils.addUnit(data.lineWidth),
|
63
|
+
opacity: data.inited ? 1 : 0,
|
64
|
+
transform: 'translateX(' + data.lineOffsetLeft + 'px)',
|
65
|
+
'-webkit-transform': 'translateX(' + data.lineOffsetLeft + 'px)',
|
66
|
+
'background-color': data.color,
|
67
|
+
height: data.lineHeight !== -1 ? utils.addUnit(data.lineHeight) : null,
|
68
|
+
'border-radius':
|
69
|
+
data.lineHeight !== -1 ? utils.addUnit(data.lineHeight) : null,
|
70
|
+
'transition-duration': !data.skipTransition ? data.duration + 's' : null,
|
71
|
+
'-webkit-transition-duration': !data.skipTransition
|
72
|
+
? data.duration + 's'
|
73
|
+
: null,
|
74
|
+
});
|
75
|
+
}
|
76
|
+
|
77
|
+
module.exports = {
|
78
|
+
tabClass: tabClass,
|
79
|
+
tabStyle: tabStyle,
|
80
|
+
trackStyle: trackStyle,
|
81
|
+
lineStyle: lineStyle,
|
82
|
+
navStyle: navStyle,
|
83
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
@import '../common/index.wxss';:root{--tabs-card-background-color:rgba(0,0,0,.08)}:root[theme=dark]{--tabs-card-background-color:hsla(0,0%,100%,.12)}.van-tabs{-webkit-tap-highlight-color:transparent;position:relative}.van-tabs__wrap{display:flex;overflow:hidden}.van-tabs__wrap--scrollable .van-tab{flex:0 0 22%}.van-tabs__wrap--scrollable .van-tab--complete{flex:1 0 auto!important;padding:0 12px}.van-tabs__wrap--scrollable .van-tabs__nav--complete{padding-left:8px;padding-right:8px}.van-tabs__scroll{background-color:var(--tabs-background-color,var(--app-B3,#fff));overflow:auto}.van-tabs__scroll--line{box-sizing:initial;height:calc(100% + 15px)}.van-tabs__scroll--card{border-radius:var(--tabs-card-border-radius,8px);box-sizing:border-box;margin:0 var(--padding-md,16px);width:calc(100% - var(--padding-md, 16px)*2)}.van-tabs__scroll::-webkit-scrollbar{display:none}.van-tabs__nav{display:flex;position:relative;-webkit-user-select:none;user-select:none}.van-tabs__nav--card{background-color:var(--tabs-card-background-color);border-radius:var(--tabs-card-border-radius,8px);box-sizing:border-box;height:var(--tabs-card-height,30px);padding:2px}.van-tabs__nav--card .van-tab{border-radius:6px;color:var(--tabs-card-text-color,var(--app-B6-N3,rgba(0,0,0,.5)));line-height:calc(var(--tabs-card-height, 30px) - 2px)}.van-tabs__nav--card .van-tab:last-child{border-right:none}.van-tabs__nav--card .van-tab.van-tab--active{background-color:var(--tabs-card-active-background-color,var(--app-B3,#fff));color:var(--tabs-card-text-active-color,var(--app-B6-N1,#000))}.van-tabs__nav--card .van-tab--disabled{color:var(--tab-disabled-text-color,var(--app-B6-N7,rgba(0,0,0,.1)))}.van-tabs__line{background-color:var(--tabs-bottom-bar-color,var(--app-M4,#1989fa));border-radius:var(--tabs-bottom-bar-height,3px);bottom:0;height:var(--tabs-bottom-bar-height,3px);left:0;opacity:0;position:absolute;z-index:1}.van-tabs__track{height:100%;position:relative;width:100%}.van-tabs__track--animated{display:flex;transition-property:left}.van-tabs__content{overflow:hidden}.van-tabs--line{height:var(--tabs-line-height,32px)}.van-tabs--card{height:var(--tabs-card-height,30px)}.van-tab{box-sizing:border-box;color:var(--tabs-card-text-color,var(--app-B6-N3,rgba(0,0,0,.5)));cursor:pointer;flex:1;font-size:var(--tab-font-size,13px);line-height:var(--tabs-line-height,32px);min-width:0;padding:0 5px;position:relative;text-align:center}.van-tab--active{color:var(--tabs-card-text-active-color,var(--app-B6-N1,#000));font-weight:var(--font-weight-bold,500)}.van-tab--disabled{color:var(--tab-disabled-text-color,var(--app-B6-N7,rgba(0,0,0,.1)))}.van-tab__title__info{position:relative!important;top:-1px!important;transform:translateX(0)!important}
|
@@ -0,0 +1 @@
|
|
1
|
+
@import '../common/index.css';.van-tag{align-items:center;border-radius:var(--tag-border-radius,2px);color:var(--tag-text-color,#fff);display:inline-flex;font-size:var(--tag-font-size,12px);line-height:var(--tag-line-height,16px);padding:var(--tag-padding,0 4px);position:relative}.van-tag--default{background-color:var(--tag-default-color,#969799)}.van-tag--default.van-tag--plain{color:var(--tag-default-color,#969799)}.van-tag--danger{background-color:var(--tag-danger-color,#ee0a24)}.van-tag--danger.van-tag--plain{color:var(--tag-danger-color,#ee0a24)}.van-tag--primary{background-color:var(--tag-primary-color,#1989fa)}.van-tag--primary.van-tag--plain{color:var(--tag-primary-color,#1989fa)}.van-tag--success{background-color:var(--tag-success-color,#07c160)}.van-tag--success.van-tag--plain{color:var(--tag-success-color,#07c160)}.van-tag--warning{background-color:var(--tag-warning-color,#ff976a)}.van-tag--warning.van-tag--plain{color:var(--tag-warning-color,#ff976a)}.van-tag--plain{background-color:var(--tag-plain-background-color,#fff)}.van-tag--plain:before{border:1px solid;border-radius:inherit;bottom:0;content:"";left:0;pointer-events:none;position:absolute;right:0;top:0}.van-tag--medium{padding:var(--tag-medium-padding,2px 6px)}.van-tag--large{border-radius:var(--tag-large-border-radius,4px);font-size:var(--tag-large-font-size,14px);padding:var(--tag-large-padding,4px 8px)}.van-tag--mark{border-radius:0 var(--tag-round-border-radius,var(--tag-round-border-radius,999px)) var(--tag-round-border-radius,var(--tag-round-border-radius,999px)) 0}.van-tag--mark:after{content:"";display:block;width:2px}.van-tag--round{border-radius:var(--tag-round-border-radius,999px)}.van-tag__close{margin-left:2px;min-width:1em}
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1,29 @@
|
|
1
|
+
import { VantComponent } from '../common/component';
|
2
|
+
import Xmark from '@tuya-miniapp/icons/dist/svg/Xmark';
|
3
|
+
VantComponent({
|
4
|
+
props: {
|
5
|
+
size: String,
|
6
|
+
mark: Boolean,
|
7
|
+
color: String,
|
8
|
+
plain: Boolean,
|
9
|
+
round: Boolean,
|
10
|
+
textColor: {
|
11
|
+
type: String,
|
12
|
+
// value:'#fff'
|
13
|
+
},
|
14
|
+
type: {
|
15
|
+
type: String,
|
16
|
+
value: 'default',
|
17
|
+
},
|
18
|
+
closeable: Boolean,
|
19
|
+
},
|
20
|
+
data: {
|
21
|
+
crossIcon: Xmark,
|
22
|
+
closeColor: '#fff',
|
23
|
+
},
|
24
|
+
methods: {
|
25
|
+
onClose() {
|
26
|
+
this.$emit('close');
|
27
|
+
},
|
28
|
+
},
|
29
|
+
});
|
@@ -0,0 +1,17 @@
|
|
1
|
+
<wxs src="../wxs/utils.wxs" module="utils" />
|
2
|
+
<wxs src="./index.wxs" module="computed" />
|
3
|
+
|
4
|
+
<view
|
5
|
+
class="custom-class {{ utils.bem('tag', [type, size, { mark, plain, round }]) }}"
|
6
|
+
style="{{ computed.rootStyle({ plain, color, textColor }) }}"
|
7
|
+
>
|
8
|
+
<slot />
|
9
|
+
<van-icon
|
10
|
+
wx:if="{{ closeable }}"
|
11
|
+
name="{{crossIcon}}"
|
12
|
+
custom-class="van-tag__close"
|
13
|
+
bind:click="onClose"
|
14
|
+
color="{{textColor || closeColor}}"
|
15
|
+
/>
|
16
|
+
|
17
|
+
</view>
|
@@ -0,0 +1,13 @@
|
|
1
|
+
/* eslint-disable */
|
2
|
+
var style = require('../wxs/style.wxs');
|
3
|
+
|
4
|
+
function rootStyle(data) {
|
5
|
+
return style({
|
6
|
+
'background-color': data.plain ? '' : data.color,
|
7
|
+
color: data.textColor || data.plain ? data.textColor || data.color : '',
|
8
|
+
});
|
9
|
+
}
|
10
|
+
|
11
|
+
module.exports = {
|
12
|
+
rootStyle: rootStyle,
|
13
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
@import '../common/index.wxss';.van-tag{align-items:center;border-radius:var(--tag-border-radius,2px);color:var(--tag-text-color,#fff);display:inline-flex;font-size:var(--tag-font-size,12px);line-height:var(--tag-line-height,16px);padding:var(--tag-padding,0 4px);position:relative}.van-tag--default{background-color:var(--tag-default-color,#969799)}.van-tag--default.van-tag--plain{color:var(--tag-default-color,#969799)}.van-tag--danger{background-color:var(--tag-danger-color,#ee0a24)}.van-tag--danger.van-tag--plain{color:var(--tag-danger-color,#ee0a24)}.van-tag--primary{background-color:var(--tag-primary-color,#1989fa)}.van-tag--primary.van-tag--plain{color:var(--tag-primary-color,#1989fa)}.van-tag--success{background-color:var(--tag-success-color,#07c160)}.van-tag--success.van-tag--plain{color:var(--tag-success-color,#07c160)}.van-tag--warning{background-color:var(--tag-warning-color,#ff976a)}.van-tag--warning.van-tag--plain{color:var(--tag-warning-color,#ff976a)}.van-tag--plain{background-color:var(--tag-plain-background-color,#fff)}.van-tag--plain:before{border:1px solid;border-radius:inherit;bottom:0;content:"";left:0;pointer-events:none;position:absolute;right:0;top:0}.van-tag--medium{padding:var(--tag-medium-padding,2px 6px)}.van-tag--large{border-radius:var(--tag-large-border-radius,4px);font-size:var(--tag-large-font-size,14px);padding:var(--tag-large-padding,4px 8px)}.van-tag--mark{border-radius:0 var(--tag-round-border-radius,var(--tag-round-border-radius,999px)) var(--tag-round-border-radius,var(--tag-round-border-radius,999px)) 0}.van-tag--mark:after{content:"";display:block;width:2px}.van-tag--round{border-radius:var(--tag-round-border-radius,999px)}.van-tag__close{margin-left:2px;min-width:1em}
|
@@ -0,0 +1 @@
|
|
1
|
+
@import '../common/index.css';.van-toast{word-wrap:break-word;align-items:center;background-color:var(--toast-background-color,rgba(0,0,0,.7));border-radius:var(--toast-border-radius,10px);box-sizing:initial;color:var(--toast-text-color,#fff);display:flex;flex-direction:column;font-size:var(--toast-font-size,14px);justify-content:center;line-height:var(--toast-line-height,20px);white-space:pre-wrap}.van-toast__container{left:50%;max-width:var(--toast-max-width,70%);position:fixed;top:50%;transform:translate(-50%,-50%);width:-webkit-fit-content;width:fit-content}.van-toast--text{min-width:var(--toast-text-min-width,96px);padding:var(--toast-text-padding,8px 12px)}.van-toast--icon{min-height:var(--toast-default-min-height,88px);padding:var(--toast-default-padding,16px);width:var(--toast-default-width,88px)}.van-toast--icon .van-toast__icon{font-size:var(--toast-icon-size,36px)}.van-toast--icon .van-toast__text{padding-top:8px}.van-toast__loading{margin:10px 0}.van-toast--top{transform:translateY(-30vh)}.van-toast--bottom{transform:translateY(30vh)}
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1,35 @@
|
|
1
|
+
import { VantComponent } from '../common/component';
|
2
|
+
import Checkmark from '@tuya-miniapp/icons/dist/svg/Checkmark';
|
3
|
+
import Smark from '@tuya-miniapp/icons/dist/svg/Xmark';
|
4
|
+
VantComponent({
|
5
|
+
props: {
|
6
|
+
show: Boolean,
|
7
|
+
mask: Boolean,
|
8
|
+
message: String,
|
9
|
+
forbidClick: Boolean,
|
10
|
+
zIndex: {
|
11
|
+
type: Number,
|
12
|
+
value: 1000,
|
13
|
+
},
|
14
|
+
type: {
|
15
|
+
type: String,
|
16
|
+
value: 'text',
|
17
|
+
},
|
18
|
+
loadingType: {
|
19
|
+
type: String,
|
20
|
+
value: 'circular',
|
21
|
+
},
|
22
|
+
position: {
|
23
|
+
type: String,
|
24
|
+
value: 'middle',
|
25
|
+
},
|
26
|
+
},
|
27
|
+
data: {
|
28
|
+
success: Checkmark,
|
29
|
+
error: Smark,
|
30
|
+
},
|
31
|
+
methods: {
|
32
|
+
// for prevent touchmove
|
33
|
+
noop() { },
|
34
|
+
},
|
35
|
+
});
|
@@ -0,0 +1,36 @@
|
|
1
|
+
<van-overlay
|
2
|
+
wx:if="{{ mask || forbidClick }}"
|
3
|
+
show="{{ show }}"
|
4
|
+
z-index="{{ zIndex }}"
|
5
|
+
custom-style="{{ mask ? '' : 'background-color: transparent;' }}"
|
6
|
+
/>
|
7
|
+
<van-transition
|
8
|
+
show="{{ show }}"
|
9
|
+
custom-style="z-index: {{ zIndex }}"
|
10
|
+
custom-class="van-toast__container"
|
11
|
+
>
|
12
|
+
<view
|
13
|
+
class="van-toast van-toast--{{ (type === 'text' || type === 'html') ? 'text' : 'icon' }} van-toast--{{ position }}"
|
14
|
+
catch:touchmove="noop"
|
15
|
+
>
|
16
|
+
<!-- text only -->
|
17
|
+
<text wx:if="{{ type === 'text' }}">{{ message }}</text>
|
18
|
+
|
19
|
+
<!-- html only -->
|
20
|
+
<rich-text wx:elif="{{ type === 'html' }}" nodes="{{ message }}"></rich-text>
|
21
|
+
|
22
|
+
<!-- with icon -->
|
23
|
+
<block wx:else>
|
24
|
+
<van-loading
|
25
|
+
wx:if="{{ type === 'loading' }}"
|
26
|
+
color="white"
|
27
|
+
type="{{ loadingType }}"
|
28
|
+
custom-class="van-toast__loading"
|
29
|
+
/>
|
30
|
+
<van-icon color="white" wx:else class="van-toast__icon" name="{{ type === 'success' ? success : error }}" />
|
31
|
+
<text wx:if="{{ message }}" class="van-toast__text">{{ message }}</text>
|
32
|
+
</block>
|
33
|
+
|
34
|
+
<slot />
|
35
|
+
</view>
|
36
|
+
</van-transition>
|
@@ -0,0 +1 @@
|
|
1
|
+
@import '../common/index.wxss';.van-toast{word-wrap:break-word;align-items:center;background-color:var(--toast-background-color,rgba(0,0,0,.7));border-radius:var(--toast-border-radius,10px);box-sizing:initial;color:var(--toast-text-color,#fff);display:flex;flex-direction:column;font-size:var(--toast-font-size,14px);justify-content:center;line-height:var(--toast-line-height,20px);white-space:pre-wrap}.van-toast__container{left:50%;max-width:var(--toast-max-width,70%);position:fixed;top:50%;transform:translate(-50%,-50%);width:-webkit-fit-content;width:fit-content}.van-toast--text{min-width:var(--toast-text-min-width,96px);padding:var(--toast-text-padding,8px 12px)}.van-toast--icon{min-height:var(--toast-default-min-height,88px);padding:var(--toast-default-padding,16px);width:var(--toast-default-width,88px)}.van-toast--icon .van-toast__icon{font-size:var(--toast-icon-size,36px)}.van-toast--icon .van-toast__text{padding-top:8px}.van-toast__loading{margin:10px 0}.van-toast--top{transform:translateY(-30vh)}.van-toast--bottom{transform:translateY(30vh)}
|
@@ -0,0 +1,28 @@
|
|
1
|
+
/// <reference types="miniprogram-api-typings" />
|
2
|
+
/// <reference types="miniprogram-api-typings" />
|
3
|
+
type ToastMessage = string | number;
|
4
|
+
type ToastContext = WechatMiniprogram.Component.TrivialInstance | WechatMiniprogram.Page.TrivialInstance;
|
5
|
+
interface ToastOptions {
|
6
|
+
show?: boolean;
|
7
|
+
type?: string;
|
8
|
+
mask?: boolean;
|
9
|
+
zIndex?: number;
|
10
|
+
context?: (() => ToastContext) | ToastContext;
|
11
|
+
position?: string;
|
12
|
+
duration?: number;
|
13
|
+
selector?: string;
|
14
|
+
forbidClick?: boolean;
|
15
|
+
loadingType?: string;
|
16
|
+
message?: ToastMessage;
|
17
|
+
onClose?: () => void;
|
18
|
+
}
|
19
|
+
declare function Toast(toastOptions: ToastOptions | ToastMessage): WechatMiniprogram.Component.TrivialInstance | undefined;
|
20
|
+
declare namespace Toast {
|
21
|
+
var loading: (options: ToastMessage | ToastOptions) => WechatMiniprogram.Component.TrivialInstance | undefined;
|
22
|
+
var success: (options: ToastMessage | ToastOptions) => WechatMiniprogram.Component.TrivialInstance | undefined;
|
23
|
+
var fail: (options: ToastMessage | ToastOptions) => WechatMiniprogram.Component.TrivialInstance | undefined;
|
24
|
+
var clear: () => void;
|
25
|
+
var setDefaultOptions: (options: ToastOptions) => void;
|
26
|
+
var resetDefaultOptions: () => void;
|
27
|
+
}
|
28
|
+
export default Toast;
|