@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,75 @@
|
|
1
|
+
/* eslint-disable */
|
2
|
+
var style = require('../wxs/style.wxs');
|
3
|
+
var addUnit = require('../wxs/add-unit.wxs');
|
4
|
+
|
5
|
+
function isImage(name) {
|
6
|
+
return name.indexOf('/') !== -1;
|
7
|
+
}
|
8
|
+
|
9
|
+
function isSvg(name) {
|
10
|
+
return name.indexOf('data:image/svg+xml') !== -1;
|
11
|
+
}
|
12
|
+
|
13
|
+
function rootClass(data) {
|
14
|
+
var classes = ['custom-class'];
|
15
|
+
|
16
|
+
if (data.classPrefix !== 'van-icon') {
|
17
|
+
classes.push('van-icon--custom')
|
18
|
+
}
|
19
|
+
|
20
|
+
if (data.classPrefix != null) {
|
21
|
+
classes.push(data.classPrefix);
|
22
|
+
}
|
23
|
+
|
24
|
+
if (isImage(data.name)) {
|
25
|
+
classes.push('van-icon--image');
|
26
|
+
if (isSvg(data.name)) classes.push('van-icon--svg');
|
27
|
+
} else if (data.classPrefix != null) {
|
28
|
+
classes.push(data.classPrefix + '-' + data.name);
|
29
|
+
}
|
30
|
+
|
31
|
+
return classes.join(' ');
|
32
|
+
}
|
33
|
+
|
34
|
+
function rootStyle(data) {
|
35
|
+
return style([
|
36
|
+
{
|
37
|
+
color: data.color,
|
38
|
+
'font-size': addUnit(data.size),
|
39
|
+
},
|
40
|
+
data.customStyle,
|
41
|
+
]);
|
42
|
+
}
|
43
|
+
|
44
|
+
function getImageSrc(data) {
|
45
|
+
// if (isSvg(data.name) && data.color) {
|
46
|
+
// return data.name.replace('currentColor', encodeURIComponent(data.color));
|
47
|
+
// }
|
48
|
+
return data.name;
|
49
|
+
}
|
50
|
+
|
51
|
+
function svgStyle(data) {
|
52
|
+
const imageBase64Src = `url(${getImageSrc(data)})`;
|
53
|
+
// console.log('imageBase64Src', imageBase64Src)
|
54
|
+
const ret = style([
|
55
|
+
{
|
56
|
+
'-webkit-mask-image': imageBase64Src,
|
57
|
+
'-webkit-mask-size': 'contain',
|
58
|
+
'mask-image': imageBase64Src,
|
59
|
+
'mask-size': 'contain',
|
60
|
+
width: data.size,
|
61
|
+
height: data.size,
|
62
|
+
background: data.color,
|
63
|
+
},
|
64
|
+
]);
|
65
|
+
return ret;
|
66
|
+
}
|
67
|
+
|
68
|
+
module.exports = {
|
69
|
+
isImage: isImage,
|
70
|
+
isSvg: isSvg,
|
71
|
+
getImageSrc: getImageSrc,
|
72
|
+
rootClass: rootClass,
|
73
|
+
rootStyle: rootStyle,
|
74
|
+
svgStyle: svgStyle,
|
75
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
@import '../common/index.wxss';:host{align-items:center;display:inline-flex;justify-content:center}.van-icon{text-rendering:auto;-webkit-font-smoothing:antialiased;font:normal normal normal 14px/1 vant-icon;font:normal normal normal 14px/1 var(--van-icon-font-family,"vant-icon");font-size:inherit;position:relative}.van-icon,.van-icon:before{display:inline-block}.van-icon--custom{position:relative}.van-icon--image{height:1em;width:1em}.van-icon__image,.van-icon__svg{height:100%;width:100%}.van-icon__svg{background:var(--icon-color,var(--app-B4-N2,rgba(0,0,0,.7)))}.van-icon__info{z-index:1}
|
@@ -0,0 +1 @@
|
|
1
|
+
@import '../common/index.css';.van-image{display:inline-block;position:relative}.van-image--round{border-radius:50%;overflow:hidden}.van-image--round .van-image__img{border-radius:inherit}.van-image__error,.van-image__img,.van-image__loading{display:block;height:100%;width:100%}.van-image__error,.van-image__loading{align-items:center;background-color:var(--image-placeholder-background-color,#f7f8fa);color:var(--image-placeholder-text-color,#969799);display:flex;flex-direction:column;font-size:var(--image-placeholder-font-size,14px);justify-content:center;left:0;position:absolute;top:0}.van-image__loading-icon{color:var(--image-loading-icon-color,#dcdee0);font-size:var(--image-loading-icon-size,32px)!important}.van-image__error-icon{color:var(--image-error-icon-color,#dcdee0);font-size:var(--image-error-icon-size,32px)!important}
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1,64 @@
|
|
1
|
+
import { VantComponent } from '../common/component';
|
2
|
+
import { button } from '../mixins/button';
|
3
|
+
VantComponent({
|
4
|
+
mixins: [button],
|
5
|
+
classes: ['custom-class', 'loading-class', 'error-class', 'image-class'],
|
6
|
+
props: {
|
7
|
+
src: {
|
8
|
+
type: String,
|
9
|
+
observer() {
|
10
|
+
this.setData({
|
11
|
+
error: false,
|
12
|
+
loading: true,
|
13
|
+
});
|
14
|
+
},
|
15
|
+
},
|
16
|
+
round: Boolean,
|
17
|
+
width: null,
|
18
|
+
height: null,
|
19
|
+
radius: null,
|
20
|
+
lazyLoad: Boolean,
|
21
|
+
useErrorSlot: Boolean,
|
22
|
+
useLoadingSlot: Boolean,
|
23
|
+
showMenuByLongpress: Boolean,
|
24
|
+
fit: {
|
25
|
+
type: String,
|
26
|
+
value: 'fill',
|
27
|
+
},
|
28
|
+
webp: {
|
29
|
+
type: Boolean,
|
30
|
+
value: false,
|
31
|
+
},
|
32
|
+
showError: {
|
33
|
+
type: Boolean,
|
34
|
+
value: true,
|
35
|
+
},
|
36
|
+
showLoading: {
|
37
|
+
type: Boolean,
|
38
|
+
value: true,
|
39
|
+
},
|
40
|
+
},
|
41
|
+
data: {
|
42
|
+
error: false,
|
43
|
+
loading: true,
|
44
|
+
viewStyle: '',
|
45
|
+
},
|
46
|
+
methods: {
|
47
|
+
onLoad(event) {
|
48
|
+
this.setData({
|
49
|
+
loading: false,
|
50
|
+
});
|
51
|
+
this.$emit('load', event.detail);
|
52
|
+
},
|
53
|
+
onError(event) {
|
54
|
+
this.setData({
|
55
|
+
loading: false,
|
56
|
+
error: true,
|
57
|
+
});
|
58
|
+
this.$emit('error', event.detail);
|
59
|
+
},
|
60
|
+
onClick(event) {
|
61
|
+
this.$emit('click', event.detail);
|
62
|
+
},
|
63
|
+
},
|
64
|
+
});
|
@@ -0,0 +1,35 @@
|
|
1
|
+
<wxs src="../wxs/utils.wxs" module="utils" />
|
2
|
+
<wxs src="./index.wxs" module="computed" />
|
3
|
+
|
4
|
+
<view
|
5
|
+
style="{{ computed.rootStyle({ width, height, radius }) }}"
|
6
|
+
class="custom-class {{ utils.bem('image', { round })}}"
|
7
|
+
bind:tap="onClick"
|
8
|
+
>
|
9
|
+
<image
|
10
|
+
wx:if="{{ !error }}"
|
11
|
+
src="{{ src }}"
|
12
|
+
mode="{{ computed.mode(fit) }}"
|
13
|
+
lazy-load="{{ lazyLoad }}"
|
14
|
+
webp="{{ webp }}"
|
15
|
+
class="image-class van-image__img"
|
16
|
+
show-menu-by-longpress="{{ showMenuByLongpress }}"
|
17
|
+
bind:load="onLoad"
|
18
|
+
bind:error="onError"
|
19
|
+
/>
|
20
|
+
|
21
|
+
<view
|
22
|
+
wx:if="{{ loading && showLoading }}"
|
23
|
+
class="loading-class van-image__loading"
|
24
|
+
>
|
25
|
+
<slot wx:if="{{ useLoadingSlot }}" name="loading" />
|
26
|
+
<van-icon wx:else name="photo" custom-class="van-image__loading-icon" />
|
27
|
+
</view>
|
28
|
+
<view
|
29
|
+
wx:if="{{ error && showError }}"
|
30
|
+
class="error-class van-image__error"
|
31
|
+
>
|
32
|
+
<slot wx:if="{{ useErrorSlot }}" name="error" />
|
33
|
+
<van-icon wx:else name="photo-fail" custom-class="van-image__error-icon" />
|
34
|
+
</view>
|
35
|
+
</view>
|
@@ -0,0 +1,32 @@
|
|
1
|
+
/* eslint-disable */
|
2
|
+
var style = require('../wxs/style.wxs');
|
3
|
+
var addUnit = require('../wxs/add-unit.wxs');
|
4
|
+
|
5
|
+
function rootStyle(data) {
|
6
|
+
return style([
|
7
|
+
{
|
8
|
+
width: addUnit(data.width),
|
9
|
+
height: addUnit(data.height),
|
10
|
+
'border-radius': addUnit(data.radius),
|
11
|
+
},
|
12
|
+
data.radius ? 'overflow: hidden' : null,
|
13
|
+
]);
|
14
|
+
}
|
15
|
+
|
16
|
+
var FIT_MODE_MAP = {
|
17
|
+
none: 'center',
|
18
|
+
fill: 'scaleToFill',
|
19
|
+
cover: 'aspectFill',
|
20
|
+
contain: 'aspectFit',
|
21
|
+
widthFix: 'widthFix',
|
22
|
+
heightFix: 'heightFix',
|
23
|
+
};
|
24
|
+
|
25
|
+
function mode(fit) {
|
26
|
+
return FIT_MODE_MAP[fit];
|
27
|
+
}
|
28
|
+
|
29
|
+
module.exports = {
|
30
|
+
rootStyle: rootStyle,
|
31
|
+
mode: mode,
|
32
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
@import '../common/index.wxss';.van-image{display:inline-block;position:relative}.van-image--round{border-radius:50%;overflow:hidden}.van-image--round .van-image__img{border-radius:inherit}.van-image__error,.van-image__img,.van-image__loading{display:block;height:100%;width:100%}.van-image__error,.van-image__loading{align-items:center;background-color:var(--image-placeholder-background-color,#f7f8fa);color:var(--image-placeholder-text-color,#969799);display:flex;flex-direction:column;font-size:var(--image-placeholder-font-size,14px);justify-content:center;left:0;position:absolute;top:0}.van-image__loading-icon{color:var(--image-loading-icon-color,#dcdee0);font-size:var(--image-loading-icon-size,32px)!important}.van-image__error-icon{color:var(--image-error-icon-color,#dcdee0);font-size:var(--image-error-icon-size,32px)!important}
|
@@ -0,0 +1 @@
|
|
1
|
+
@import '../common/index.css';.van-index-anchor{background-color:var(--index-anchor-background-color,transparent);color:var(--index-anchor-text-color,var(--app-B6-N1,#000));font-size:var(--index-anchor-font-size,14px);font-weight:var(--index-anchor-font-weight,500);line-height:var(--index-anchor-line-height,32px);padding:var(--index-anchor-padding,0 16px)}.van-index-anchor--active{background-color:var(--index-anchor-active-background-color,var(--app-B3,#fff));color:var(--index-anchor-active-text-color,var(--app-M1,#3678e3));left:0;right:0}
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1,25 @@
|
|
1
|
+
import { getRect } from '../common/utils';
|
2
|
+
import { VantComponent } from '../common/component';
|
3
|
+
import { useParent } from '../common/relation';
|
4
|
+
VantComponent({
|
5
|
+
relation: useParent('index-bar'),
|
6
|
+
props: {
|
7
|
+
useSlot: Boolean,
|
8
|
+
index: null,
|
9
|
+
},
|
10
|
+
data: {
|
11
|
+
active: false,
|
12
|
+
wrapperStyle: '',
|
13
|
+
anchorStyle: '',
|
14
|
+
},
|
15
|
+
methods: {
|
16
|
+
scrollIntoView(scrollTop) {
|
17
|
+
getRect(this, '.van-index-anchor-wrapper').then((rect) => {
|
18
|
+
wx.pageScrollTo({
|
19
|
+
duration: 0,
|
20
|
+
scrollTop: scrollTop + rect.top - this.parent.data.stickyOffsetTop,
|
21
|
+
});
|
22
|
+
});
|
23
|
+
},
|
24
|
+
},
|
25
|
+
});
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<view
|
2
|
+
class="van-index-anchor-wrapper"
|
3
|
+
style="{{ wrapperStyle }}"
|
4
|
+
>
|
5
|
+
<view
|
6
|
+
class="van-index-anchor {{ active ? 'van-index-anchor--active van-hairline--bottom' : '' }}"
|
7
|
+
style="{{ anchorStyle }}"
|
8
|
+
>
|
9
|
+
<slot wx:if="{{ useSlot }}"/>
|
10
|
+
<block wx:else>
|
11
|
+
<text>{{ index }}</text>
|
12
|
+
</block>
|
13
|
+
</view>
|
14
|
+
</view>
|
@@ -0,0 +1 @@
|
|
1
|
+
@import '../common/index.wxss';.van-index-anchor{background-color:var(--index-anchor-background-color,transparent);color:var(--index-anchor-text-color,var(--app-B6-N1,#000));font-size:var(--index-anchor-font-size,14px);font-weight:var(--index-anchor-font-weight,500);line-height:var(--index-anchor-line-height,32px);padding:var(--index-anchor-padding,0 16px)}.van-index-anchor--active{background-color:var(--index-anchor-active-background-color,var(--app-B3,#fff));color:var(--index-anchor-active-text-color,var(--app-M1,#3678e3));left:0;right:0}
|
@@ -0,0 +1 @@
|
|
1
|
+
@import '../common/index.css';.van-index-bar{position:relative}.van-index-bar__sidebar{display:flex;flex-direction:column;position:fixed;right:0;text-align:center;top:50%;transform:translateY(-50%);-webkit-user-select:none;user-select:none}.van-index-bar__index{font-size:var(--index-bar-index-font-size,10px);font-weight:500;line-height:var(--index-bar-index-line-height,14px);padding:0 var(--padding-base,4px) 0 var(--padding-md,16px)}
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1,246 @@
|
|
1
|
+
import { GREEN } from '../common/color';
|
2
|
+
import { VantComponent } from '../common/component';
|
3
|
+
import { useChildren } from '../common/relation';
|
4
|
+
import { getRect, isDef } from '../common/utils';
|
5
|
+
import { pageScrollMixin } from '../mixins/page-scroll';
|
6
|
+
const indexList = () => {
|
7
|
+
const indexList = [];
|
8
|
+
const charCodeOfA = 'A'.charCodeAt(0);
|
9
|
+
for (let i = 0; i < 26; i++) {
|
10
|
+
indexList.push(String.fromCharCode(charCodeOfA + i));
|
11
|
+
}
|
12
|
+
return indexList;
|
13
|
+
};
|
14
|
+
VantComponent({
|
15
|
+
relation: useChildren('index-anchor', function () {
|
16
|
+
this.updateData();
|
17
|
+
}),
|
18
|
+
props: {
|
19
|
+
sticky: {
|
20
|
+
type: Boolean,
|
21
|
+
value: true,
|
22
|
+
},
|
23
|
+
zIndex: {
|
24
|
+
type: Number,
|
25
|
+
value: 1,
|
26
|
+
},
|
27
|
+
highlightColor: {
|
28
|
+
type: String,
|
29
|
+
value: GREEN,
|
30
|
+
},
|
31
|
+
stickyOffsetTop: {
|
32
|
+
type: Number,
|
33
|
+
value: 0,
|
34
|
+
},
|
35
|
+
indexList: {
|
36
|
+
type: Array,
|
37
|
+
value: indexList(),
|
38
|
+
},
|
39
|
+
},
|
40
|
+
mixins: [
|
41
|
+
pageScrollMixin(function (event) {
|
42
|
+
this.scrollTop = (event === null || event === void 0 ? void 0 : event.scrollTop) || 0;
|
43
|
+
this.onScroll();
|
44
|
+
}),
|
45
|
+
],
|
46
|
+
data: {
|
47
|
+
activeAnchorIndex: null,
|
48
|
+
showSidebar: false,
|
49
|
+
},
|
50
|
+
created() {
|
51
|
+
this.scrollTop = 0;
|
52
|
+
},
|
53
|
+
methods: {
|
54
|
+
updateData() {
|
55
|
+
wx.nextTick(() => {
|
56
|
+
if (this.timer != null) {
|
57
|
+
clearTimeout(this.timer);
|
58
|
+
}
|
59
|
+
this.timer = setTimeout(() => {
|
60
|
+
this.setData({
|
61
|
+
showSidebar: !!this.children.length,
|
62
|
+
});
|
63
|
+
this.setRect().then(() => {
|
64
|
+
this.onScroll();
|
65
|
+
});
|
66
|
+
}, 0);
|
67
|
+
});
|
68
|
+
},
|
69
|
+
setRect() {
|
70
|
+
return Promise.all([
|
71
|
+
this.setAnchorsRect(),
|
72
|
+
this.setListRect(),
|
73
|
+
this.setSiderbarRect(),
|
74
|
+
]);
|
75
|
+
},
|
76
|
+
setAnchorsRect() {
|
77
|
+
return Promise.all(this.children.map((anchor) => getRect(anchor, '.van-index-anchor-wrapper').then((rect) => {
|
78
|
+
Object.assign(anchor, {
|
79
|
+
height: rect.height,
|
80
|
+
top: rect.top + this.scrollTop,
|
81
|
+
});
|
82
|
+
})));
|
83
|
+
},
|
84
|
+
setListRect() {
|
85
|
+
return getRect(this, '.van-index-bar').then((rect) => {
|
86
|
+
if (!isDef(rect)) {
|
87
|
+
return;
|
88
|
+
}
|
89
|
+
Object.assign(this, {
|
90
|
+
height: rect.height,
|
91
|
+
top: rect.top + this.scrollTop,
|
92
|
+
});
|
93
|
+
});
|
94
|
+
},
|
95
|
+
setSiderbarRect() {
|
96
|
+
return getRect(this, '.van-index-bar__sidebar').then((res) => {
|
97
|
+
if (!isDef(res)) {
|
98
|
+
return;
|
99
|
+
}
|
100
|
+
this.sidebar = {
|
101
|
+
height: res.height,
|
102
|
+
top: res.top,
|
103
|
+
};
|
104
|
+
});
|
105
|
+
},
|
106
|
+
setDiffData({ target, data }) {
|
107
|
+
const diffData = {};
|
108
|
+
Object.keys(data).forEach((key) => {
|
109
|
+
if (target.data[key] !== data[key]) {
|
110
|
+
diffData[key] = data[key];
|
111
|
+
}
|
112
|
+
});
|
113
|
+
if (Object.keys(diffData).length) {
|
114
|
+
target.setData(diffData);
|
115
|
+
}
|
116
|
+
},
|
117
|
+
getAnchorRect(anchor) {
|
118
|
+
return getRect(anchor, '.van-index-anchor-wrapper').then((rect) => ({
|
119
|
+
height: rect.height,
|
120
|
+
top: rect.top,
|
121
|
+
}));
|
122
|
+
},
|
123
|
+
getActiveAnchorIndex() {
|
124
|
+
const { children, scrollTop } = this;
|
125
|
+
const { sticky, stickyOffsetTop } = this.data;
|
126
|
+
for (let i = this.children.length - 1; i >= 0; i--) {
|
127
|
+
const preAnchorHeight = i > 0 ? children[i - 1].height : 0;
|
128
|
+
const reachTop = sticky ? preAnchorHeight + stickyOffsetTop : 0;
|
129
|
+
if (reachTop + scrollTop >= children[i].top) {
|
130
|
+
return i;
|
131
|
+
}
|
132
|
+
}
|
133
|
+
return -1;
|
134
|
+
},
|
135
|
+
onScroll() {
|
136
|
+
const { children = [], scrollTop } = this;
|
137
|
+
if (!children.length) {
|
138
|
+
return;
|
139
|
+
}
|
140
|
+
const { sticky, stickyOffsetTop, zIndex, highlightColor } = this.data;
|
141
|
+
const active = this.getActiveAnchorIndex();
|
142
|
+
this.setDiffData({
|
143
|
+
target: this,
|
144
|
+
data: {
|
145
|
+
activeAnchorIndex: active,
|
146
|
+
},
|
147
|
+
});
|
148
|
+
if (sticky) {
|
149
|
+
let isActiveAnchorSticky = false;
|
150
|
+
if (active !== -1) {
|
151
|
+
isActiveAnchorSticky =
|
152
|
+
children[active].top <= stickyOffsetTop + scrollTop;
|
153
|
+
}
|
154
|
+
children.forEach((item, index) => {
|
155
|
+
if (index === active) {
|
156
|
+
let wrapperStyle = '';
|
157
|
+
let anchorStyle = `
|
158
|
+
color: ${highlightColor};
|
159
|
+
`;
|
160
|
+
if (isActiveAnchorSticky) {
|
161
|
+
wrapperStyle = `
|
162
|
+
height: ${children[index].height}px;
|
163
|
+
`;
|
164
|
+
anchorStyle = `
|
165
|
+
position: fixed;
|
166
|
+
top: ${stickyOffsetTop}px;
|
167
|
+
z-index: ${zIndex};
|
168
|
+
color: ${highlightColor};
|
169
|
+
`;
|
170
|
+
}
|
171
|
+
this.setDiffData({
|
172
|
+
target: item,
|
173
|
+
data: {
|
174
|
+
active: true,
|
175
|
+
anchorStyle,
|
176
|
+
wrapperStyle,
|
177
|
+
},
|
178
|
+
});
|
179
|
+
}
|
180
|
+
else if (index === active - 1) {
|
181
|
+
const currentAnchor = children[index];
|
182
|
+
const currentOffsetTop = currentAnchor.top;
|
183
|
+
const targetOffsetTop = index === children.length - 1
|
184
|
+
? this.top
|
185
|
+
: children[index + 1].top;
|
186
|
+
const parentOffsetHeight = targetOffsetTop - currentOffsetTop;
|
187
|
+
const translateY = parentOffsetHeight - currentAnchor.height;
|
188
|
+
const anchorStyle = `
|
189
|
+
position: relative;
|
190
|
+
transform: translate3d(0, ${translateY}px, 0);
|
191
|
+
z-index: ${zIndex};
|
192
|
+
color: ${highlightColor};
|
193
|
+
`;
|
194
|
+
this.setDiffData({
|
195
|
+
target: item,
|
196
|
+
data: {
|
197
|
+
active: true,
|
198
|
+
anchorStyle,
|
199
|
+
},
|
200
|
+
});
|
201
|
+
}
|
202
|
+
else {
|
203
|
+
this.setDiffData({
|
204
|
+
target: item,
|
205
|
+
data: {
|
206
|
+
active: false,
|
207
|
+
anchorStyle: '',
|
208
|
+
wrapperStyle: '',
|
209
|
+
},
|
210
|
+
});
|
211
|
+
}
|
212
|
+
});
|
213
|
+
}
|
214
|
+
},
|
215
|
+
onClick(event) {
|
216
|
+
this.scrollToAnchor(event.target.dataset.index);
|
217
|
+
},
|
218
|
+
onTouchMove(event) {
|
219
|
+
const sidebarLength = this.children.length;
|
220
|
+
const touch = event.touches[0];
|
221
|
+
const itemHeight = this.sidebar.height / sidebarLength;
|
222
|
+
let index = Math.floor((touch.clientY - this.sidebar.top) / itemHeight);
|
223
|
+
if (index < 0) {
|
224
|
+
index = 0;
|
225
|
+
}
|
226
|
+
else if (index > sidebarLength - 1) {
|
227
|
+
index = sidebarLength - 1;
|
228
|
+
}
|
229
|
+
this.scrollToAnchor(index);
|
230
|
+
},
|
231
|
+
onTouchStop() {
|
232
|
+
this.scrollToAnchorIndex = null;
|
233
|
+
},
|
234
|
+
scrollToAnchor(index) {
|
235
|
+
if (typeof index !== 'number' || this.scrollToAnchorIndex === index) {
|
236
|
+
return;
|
237
|
+
}
|
238
|
+
this.scrollToAnchorIndex = index;
|
239
|
+
const anchor = this.children.find((item) => item.data.index === this.data.indexList[index]);
|
240
|
+
if (anchor) {
|
241
|
+
anchor.scrollIntoView(this.scrollTop);
|
242
|
+
this.$emit('select', anchor.data.index);
|
243
|
+
}
|
244
|
+
},
|
245
|
+
},
|
246
|
+
});
|
@@ -0,0 +1,22 @@
|
|
1
|
+
<view class="van-index-bar">
|
2
|
+
<slot />
|
3
|
+
|
4
|
+
<view
|
5
|
+
wx:if="{{ showSidebar }}"
|
6
|
+
class="van-index-bar__sidebar"
|
7
|
+
catch:tap="onClick"
|
8
|
+
catch:touchmove="onTouchMove"
|
9
|
+
catch:touchend="onTouchStop"
|
10
|
+
catch:touchcancel="onTouchStop"
|
11
|
+
>
|
12
|
+
<view
|
13
|
+
wx:for="{{ indexList }}"
|
14
|
+
wx:key="index"
|
15
|
+
class="van-index-bar__index"
|
16
|
+
style="z-index: {{ zIndex + 1 }}; color: {{ activeAnchorIndex === index ? highlightColor : '' }}"
|
17
|
+
data-index="{{ index }}"
|
18
|
+
>
|
19
|
+
{{ item }}
|
20
|
+
</view>
|
21
|
+
</view>
|
22
|
+
</view>
|
@@ -0,0 +1 @@
|
|
1
|
+
@import '../common/index.wxss';.van-index-bar{position:relative}.van-index-bar__sidebar{display:flex;flex-direction:column;position:fixed;right:0;text-align:center;top:50%;transform:translateY(-50%);-webkit-user-select:none;user-select:none}.van-index-bar__index{font-size:var(--index-bar-index-font-size,10px);font-weight:500;line-height:var(--index-bar-index-line-height,14px);padding:0 var(--padding-base,4px) 0 var(--padding-md,16px)}
|
@@ -0,0 +1 @@
|
|
1
|
+
@import '../common/index.css';.van-info{align-items:center;background-color:var(--info-background-color,var(--app-M2,#f04c4c));border:var(--info-border-width,0) solid #fff;border-radius:var(--info-size,12px);box-sizing:border-box;color:var(--info-color,#fff);display:inline-flex;font-family:var(--info-font-family,-apple-system-font,PingFang SC,Helvetica Neue,Arial,sans-serif);font-size:var(--info-font-size,11px);font-weight:var(--info-font-weight,600);height:var(--info-size,12px);justify-content:center;min-width:var(--info-size,12px);padding:var(--info-padding,0 4px);position:absolute;right:0;top:0;transform:translate(50%,-50%);transform-origin:100%;white-space:nowrap}.van-info--dot{background-color:var(--info-dot-color,var(--app-M2,#f04c4c));border-radius:100%;height:var(--info-dot-size,8px);min-width:0;width:var(--info-dot-size,8px)}
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
@import '../common/index.wxss';.van-info{align-items:center;background-color:var(--info-background-color,var(--app-M2,#f04c4c));border:var(--info-border-width,0) solid #fff;border-radius:var(--info-size,12px);box-sizing:border-box;color:var(--info-color,#fff);display:inline-flex;font-family:var(--info-font-family,-apple-system-font,PingFang SC,Helvetica Neue,Arial,sans-serif);font-size:var(--info-font-size,11px);font-weight:var(--info-font-weight,600);height:var(--info-size,12px);justify-content:center;min-width:var(--info-size,12px);padding:var(--info-padding,0 4px);position:absolute;right:0;top:0;transform:translate(50%,-50%);transform-origin:100%;white-space:nowrap}.van-info--dot{background-color:var(--info-dot-color,var(--app-M2,#f04c4c));border-radius:100%;height:var(--info-dot-size,8px);min-width:0;width:var(--info-dot-size,8px)}
|
@@ -0,0 +1 @@
|
|
1
|
+
@import '../common/index.css';:host{font-size:0;line-height:1}.van-loading{align-items:center;color:var(--loading-spinner-color,#c8c9cc);display:inline-flex;justify-content:center}.van-loading__spinner{animation:van-rotate var(--loading-spinner-animation-duration,.8s) linear infinite;box-sizing:border-box;height:var(--loading-spinner-size,30px);max-height:100%;max-width:100%;position:relative;width:var(--loading-spinner-size,30px)}.van-loading__spinner--spinner{animation-timing-function:steps(12)}.van-loading__spinner--circular{border:1px solid transparent;border-radius:100%;border-top-color:initial}.van-loading__text{color:var(--loading-text-color,#969799);font-size:var(--loading-text-font-size,14px);line-height:var(--loading-text-line-height,20px);margin-left:var(--padding-xs,8px)}.van-loading__text:empty{display:none}.van-loading--vertical{flex-direction:column}.van-loading--vertical .van-loading__text{margin:var(--padding-xs,8px) 0 0}.van-loading__dot{height:100%;left:0;position:absolute;top:0;width:100%}.van-loading__dot:before{background-color:currentColor;border-radius:40%;content:" ";display:block;height:25%;margin:0 auto;width:2px}.van-loading__dot:first-of-type{opacity:1;transform:rotate(30deg)}.van-loading__dot:nth-of-type(2){opacity:.9375;transform:rotate(60deg)}.van-loading__dot:nth-of-type(3){opacity:.875;transform:rotate(90deg)}.van-loading__dot:nth-of-type(4){opacity:.8125;transform:rotate(120deg)}.van-loading__dot:nth-of-type(5){opacity:.75;transform:rotate(150deg)}.van-loading__dot:nth-of-type(6){opacity:.6875;transform:rotate(180deg)}.van-loading__dot:nth-of-type(7){opacity:.625;transform:rotate(210deg)}.van-loading__dot:nth-of-type(8){opacity:.5625;transform:rotate(240deg)}.van-loading__dot:nth-of-type(9){opacity:.5;transform:rotate(270deg)}.van-loading__dot:nth-of-type(10){opacity:.4375;transform:rotate(300deg)}.van-loading__dot:nth-of-type(11){opacity:.375;transform:rotate(330deg)}.van-loading__dot:nth-of-type(12){opacity:.3125;transform:rotate(1turn)}@keyframes van-rotate{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import { VantComponent } from '../common/component';
|
2
|
+
VantComponent({
|
3
|
+
props: {
|
4
|
+
color: String,
|
5
|
+
vertical: Boolean,
|
6
|
+
type: {
|
7
|
+
type: String,
|
8
|
+
value: 'circular',
|
9
|
+
},
|
10
|
+
size: String,
|
11
|
+
textSize: String,
|
12
|
+
},
|
13
|
+
data: {
|
14
|
+
array12: Array.from({ length: 12 }),
|
15
|
+
},
|
16
|
+
});
|
@@ -0,0 +1,19 @@
|
|
1
|
+
<wxs src="../wxs/utils.wxs" module="utils" />
|
2
|
+
<wxs src="./index.wxs" module="computed" />
|
3
|
+
|
4
|
+
<view class="custom-class {{ utils.bem('loading', { vertical }) }}">
|
5
|
+
<view
|
6
|
+
class="van-loading__spinner van-loading__spinner--{{ type }}"
|
7
|
+
style="{{ computed.spinnerStyle({ color, size }) }}"
|
8
|
+
>
|
9
|
+
<view
|
10
|
+
wx:if="{{ type === 'spinner' }}"
|
11
|
+
wx:for="{{ array12 }}"
|
12
|
+
wx:key="index"
|
13
|
+
class="van-loading__dot"
|
14
|
+
/>
|
15
|
+
</view>
|
16
|
+
<view class="van-loading__text" style="{{ computed.textStyle({ textSize }) }}">
|
17
|
+
<slot />
|
18
|
+
</view>
|
19
|
+
</view>
|