@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,48 @@
|
|
1
|
+
<view class="{{prefix}} {{prefix}}-container" style="{{inputContainerStyle}}">
|
2
|
+
<view class="{{prefix}}-textView" bind:tap="handlePassword">
|
3
|
+
<text class="{{prefix}}-pwdText {{currValue !== '' ? prefix + '-password' : null}}" style="{{valueTextStyle}}">
|
4
|
+
{{currValue || placeholder}}
|
5
|
+
</text>
|
6
|
+
</view>
|
7
|
+
<slot name="custom-button" />
|
8
|
+
</view>
|
9
|
+
<van-popup
|
10
|
+
show="{{visible}}"
|
11
|
+
bind:close="onMaskPress"
|
12
|
+
position="bottom"
|
13
|
+
overlay="{{true}}"
|
14
|
+
>
|
15
|
+
<view class="{{prefix}}-popup-container">
|
16
|
+
<view class="{{prefix}}-number-wrap" style="height: {{row * 56}}px">
|
17
|
+
<view wx:for="{{numberArray}}" wx:key="index" bind:tap="changeValue" hover-class="{{prefix}}-hover-class" data-item="{{ item }}" class="{{prefix}}-number-item" style="{{(item === 0 || item === 10) && numberArray.length === 11 ? 'width: 175px' : ''}}">
|
18
|
+
<view
|
19
|
+
wx:if="{{item === -2}}"
|
20
|
+
class="{{prefix}}-hidden-image"
|
21
|
+
style="{{img_hidden_light}}"
|
22
|
+
/>
|
23
|
+
<text wx:else class="{{prefix}}-number-text">{{ item <= -1 || item > maxNum ? '' : item }}</text>
|
24
|
+
</view>
|
25
|
+
</view>
|
26
|
+
<view class="{{prefix}}-operate-wrap">
|
27
|
+
<button
|
28
|
+
bind:tap="changeValue"
|
29
|
+
data-item="-1"
|
30
|
+
style="margin-bottom: 6px"
|
31
|
+
class="{{prefix}}-confirm-btn"
|
32
|
+
hover-class="{{prefix}}-hover-class"
|
33
|
+
>
|
34
|
+
<view style="{{img_delete_light}}" class="{{prefix}}-hidden-image" />
|
35
|
+
</button>
|
36
|
+
<button
|
37
|
+
class="{{prefix}}-confirm-btn {{prefix}}-confirm-color"
|
38
|
+
style="background-color: {{confirmColor}}"
|
39
|
+
bind:tap="confirm"
|
40
|
+
hover-class="{{prefix}}-hover-class"
|
41
|
+
>
|
42
|
+
<text class="{{prefix}}-confirm-text" style="{{confirmTextStyle}}">
|
43
|
+
{{confirmText}}
|
44
|
+
</text>
|
45
|
+
</button >
|
46
|
+
</view>
|
47
|
+
</view>
|
48
|
+
</van-popup>
|
@@ -0,0 +1 @@
|
|
1
|
+
@import '../common/index.wxss';:root .keyboard{--keyboard-bg-color:var(--app-B6,#fff);--keyboard-text-color:var(--app-B6-N2,rgba(0,0,0,.7));--keyboard-border-color:var(--app-B6-N7,rgba(0,0,0,.1));--keyboard-placeholder-text-color:var(--app-B6-N6,rgba(0,0,0,.2))}:root text{white-space:normal}.keyboard-container{align-items:center;background-color:var(--keyboard-bg-color);border:1rpx solid var(--keyboard-border-color);border-radius:16rpx;box-sizing:border-box;display:flex;flex-direction:row;height:80rpx;justify-content:space-between;overflow:hidden;padding:24rpx 0rpx 24rpx 24rpx;width:500rpx}.keyboard-button{align-items:center;background-color:initial;justify-content:center}.keyboard-textView{display:flex;flex:1}.keyboard-pwdText{color:var(--keyboard-placeholder-text-color);font-size:40rpx}.keyboard-password{color:var(--keyboard-text-color);letter-spacing:16rpx}.keyboard-randomText{font-size:24rpx;font-weight:500}.keyboard-popup-container{background-color:var(--app-B6-N6,rgba(0,0,0,.2));display:flex;flex-direction:row;height:464rpx;padding:8rpx;width:100%}.keyboard-number-wrap{background-color:initial;display:flex;flex:1;flex-direction:row;flex-wrap:wrap;width:570rpx}.keyboard-operate-wrap{background-color:initial;padding-right:4rpx;padding-top:8rpx;width:180rpx}.keyboard-number-item{align-items:center;background-color:var(--app-B6,#fff);border-radius:8rpx;display:flex;height:96rpx;justify-content:center;margin:8rpx;width:166rpx}.keyboard-number-text{color:var(--app-B6-N2,rgba(0,0,0,.7));font-size:48rpx;font-weight:700}.keyboard-hidden-image{background:var(--app-B6-N2,rgba(0,0,0,.7));height:80rpx;width:80rpx}.keyboard-confirm-btn{align-items:center;background-color:var(--app-B6,#fff);border-radius:8rpx;display:flex;height:210rpx;justify-content:center;padding:0;width:168rpx}.keyboard-confirm-color{background-color:var(--app-M3,#2dda86)}.keyboard-confirm-text{color:#fff;font-size:40rpx;font-weight:700}.keyboard-hover-class{background-color:var(--app-B6-N7,rgba(0,0,0,.1))}
|
@@ -0,0 +1 @@
|
|
1
|
+
@import '../common/index.css';
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1,298 @@
|
|
1
|
+
import { VantComponent } from '../common/component';
|
2
|
+
import { isDef } from '../common/validator';
|
3
|
+
import { pickerProps } from '../picker/shared';
|
4
|
+
const currentYear = new Date().getFullYear();
|
5
|
+
function isValidDate(date) {
|
6
|
+
return isDef(date) && !isNaN(new Date(date).getTime());
|
7
|
+
}
|
8
|
+
function range(num, min, max) {
|
9
|
+
return Math.min(Math.max(num, min), max);
|
10
|
+
}
|
11
|
+
function padZero(val) {
|
12
|
+
return `00${val}`.slice(-2);
|
13
|
+
}
|
14
|
+
function times(n, iteratee) {
|
15
|
+
let index = -1;
|
16
|
+
const result = Array(n < 0 ? 0 : n);
|
17
|
+
while (++index < n) {
|
18
|
+
result[index] = iteratee(index);
|
19
|
+
}
|
20
|
+
return result;
|
21
|
+
}
|
22
|
+
function getTrueValue(formattedValue) {
|
23
|
+
if (formattedValue === undefined) {
|
24
|
+
formattedValue = '1';
|
25
|
+
}
|
26
|
+
while (isNaN(parseInt(formattedValue, 10))) {
|
27
|
+
formattedValue = formattedValue.slice(1);
|
28
|
+
}
|
29
|
+
return parseInt(formattedValue, 10);
|
30
|
+
}
|
31
|
+
function getMonthEndDay(year, month) {
|
32
|
+
return 32 - new Date(year, month - 1, 32).getDate();
|
33
|
+
}
|
34
|
+
const defaultFormatter = (type, value) => value;
|
35
|
+
VantComponent({
|
36
|
+
classes: ['active-class', 'toolbar-class', 'column-class'],
|
37
|
+
props: Object.assign(Object.assign({}, pickerProps), { value: {
|
38
|
+
type: null,
|
39
|
+
observer: 'updateValue',
|
40
|
+
}, filter: null, type: {
|
41
|
+
type: String,
|
42
|
+
value: 'datetime',
|
43
|
+
observer: 'updateValue',
|
44
|
+
}, showToolbar: {
|
45
|
+
type: Boolean,
|
46
|
+
value: true,
|
47
|
+
}, locale: {
|
48
|
+
type: Object,
|
49
|
+
}, formatter: {
|
50
|
+
type: null,
|
51
|
+
value: defaultFormatter,
|
52
|
+
}, minDate: {
|
53
|
+
type: Number,
|
54
|
+
value: new Date(currentYear - 10, 0, 1).getTime(),
|
55
|
+
observer: 'updateValue',
|
56
|
+
}, maxDate: {
|
57
|
+
type: Number,
|
58
|
+
value: new Date(currentYear + 10, 11, 31).getTime(),
|
59
|
+
observer: 'updateValue',
|
60
|
+
}, minHour: {
|
61
|
+
type: Number,
|
62
|
+
value: 0,
|
63
|
+
observer: 'updateValue',
|
64
|
+
}, maxHour: {
|
65
|
+
type: Number,
|
66
|
+
value: 23,
|
67
|
+
observer: 'updateValue',
|
68
|
+
}, minMinute: {
|
69
|
+
type: Number,
|
70
|
+
value: 0,
|
71
|
+
observer: 'updateValue',
|
72
|
+
}, maxMinute: {
|
73
|
+
type: Number,
|
74
|
+
value: 59,
|
75
|
+
observer: 'updateValue',
|
76
|
+
} }),
|
77
|
+
data: {
|
78
|
+
innerValue: Date.now(),
|
79
|
+
columns: [],
|
80
|
+
},
|
81
|
+
methods: {
|
82
|
+
updateValue() {
|
83
|
+
const { data } = this;
|
84
|
+
const val = this.correctValue(data.value);
|
85
|
+
const isEqual = val === data.innerValue;
|
86
|
+
this.updateColumnValue(val).then(() => {
|
87
|
+
if (!isEqual) {
|
88
|
+
this.$emit('input', val);
|
89
|
+
}
|
90
|
+
});
|
91
|
+
},
|
92
|
+
getPicker() {
|
93
|
+
if (this.picker == null) {
|
94
|
+
this.picker = this.selectComponent('.van-datetime-picker');
|
95
|
+
const { picker } = this;
|
96
|
+
const { setColumnValues } = picker;
|
97
|
+
picker.setColumnValues = (...args) => setColumnValues.apply(picker, [...args, false]);
|
98
|
+
}
|
99
|
+
return this.picker;
|
100
|
+
},
|
101
|
+
updateColumns() {
|
102
|
+
const { formatter = defaultFormatter, locale } = this.data;
|
103
|
+
const results = this.getOriginColumns().map((column) => ({
|
104
|
+
values: column.values.map((value) => formatter(column.type, value)),
|
105
|
+
unit: locale === null || locale === void 0 ? void 0 : locale[column.type],
|
106
|
+
}));
|
107
|
+
return this.set({ columns: results });
|
108
|
+
},
|
109
|
+
getOriginColumns() {
|
110
|
+
const { filter } = this.data;
|
111
|
+
const results = this.getRanges().map(({ type, range }) => {
|
112
|
+
let values = times(range[1] - range[0] + 1, (index) => {
|
113
|
+
const value = range[0] + index;
|
114
|
+
return type === 'year' ? `${value}` : padZero(value);
|
115
|
+
});
|
116
|
+
if (filter) {
|
117
|
+
values = filter(type, values);
|
118
|
+
}
|
119
|
+
return { type, values };
|
120
|
+
});
|
121
|
+
return results;
|
122
|
+
},
|
123
|
+
getRanges() {
|
124
|
+
const { data } = this;
|
125
|
+
if (data.type === 'time') {
|
126
|
+
return [
|
127
|
+
{
|
128
|
+
type: 'hour',
|
129
|
+
range: [data.minHour, data.maxHour],
|
130
|
+
},
|
131
|
+
{
|
132
|
+
type: 'minute',
|
133
|
+
range: [data.minMinute, data.maxMinute],
|
134
|
+
},
|
135
|
+
];
|
136
|
+
}
|
137
|
+
const { maxYear, maxDate, maxMonth, maxHour, maxMinute } = this.getBoundary('max', data.innerValue);
|
138
|
+
const { minYear, minDate, minMonth, minHour, minMinute } = this.getBoundary('min', data.innerValue);
|
139
|
+
const result = [
|
140
|
+
{
|
141
|
+
type: 'year',
|
142
|
+
range: [minYear, maxYear],
|
143
|
+
},
|
144
|
+
{
|
145
|
+
type: 'month',
|
146
|
+
range: [minMonth, maxMonth],
|
147
|
+
},
|
148
|
+
{
|
149
|
+
type: 'day',
|
150
|
+
range: [minDate, maxDate],
|
151
|
+
},
|
152
|
+
{
|
153
|
+
type: 'hour',
|
154
|
+
range: [minHour, maxHour],
|
155
|
+
},
|
156
|
+
{
|
157
|
+
type: 'minute',
|
158
|
+
range: [minMinute, maxMinute],
|
159
|
+
},
|
160
|
+
];
|
161
|
+
if (data.type === 'date')
|
162
|
+
result.splice(3, 2);
|
163
|
+
if (data.type === 'year-month')
|
164
|
+
result.splice(2, 3);
|
165
|
+
return result;
|
166
|
+
},
|
167
|
+
correctValue(value) {
|
168
|
+
const { data } = this;
|
169
|
+
// validate value
|
170
|
+
const isDateType = data.type !== 'time';
|
171
|
+
if (isDateType && !isValidDate(value)) {
|
172
|
+
value = data.minDate;
|
173
|
+
}
|
174
|
+
else if (!isDateType && !value) {
|
175
|
+
const { minHour } = data;
|
176
|
+
value = `${padZero(minHour)}:00`;
|
177
|
+
}
|
178
|
+
// time type
|
179
|
+
if (!isDateType) {
|
180
|
+
let [hour, minute] = value.split(':');
|
181
|
+
hour = padZero(range(hour, data.minHour, data.maxHour));
|
182
|
+
minute = padZero(range(minute, data.minMinute, data.maxMinute));
|
183
|
+
return `${hour}:${minute}`;
|
184
|
+
}
|
185
|
+
// date type
|
186
|
+
value = Math.max(value, data.minDate);
|
187
|
+
value = Math.min(value, data.maxDate);
|
188
|
+
return value;
|
189
|
+
},
|
190
|
+
getBoundary(type, innerValue) {
|
191
|
+
const value = new Date(innerValue);
|
192
|
+
const boundary = new Date(this.data[`${type}Date`]);
|
193
|
+
const year = boundary.getFullYear();
|
194
|
+
let month = 1;
|
195
|
+
let date = 1;
|
196
|
+
let hour = 0;
|
197
|
+
let minute = 0;
|
198
|
+
if (type === 'max') {
|
199
|
+
month = 12;
|
200
|
+
date = getMonthEndDay(value.getFullYear(), value.getMonth() + 1);
|
201
|
+
hour = 23;
|
202
|
+
minute = 59;
|
203
|
+
}
|
204
|
+
if (value.getFullYear() === year) {
|
205
|
+
month = boundary.getMonth() + 1;
|
206
|
+
if (value.getMonth() + 1 === month) {
|
207
|
+
date = boundary.getDate();
|
208
|
+
if (value.getDate() === date) {
|
209
|
+
hour = boundary.getHours();
|
210
|
+
if (value.getHours() === hour) {
|
211
|
+
minute = boundary.getMinutes();
|
212
|
+
}
|
213
|
+
}
|
214
|
+
}
|
215
|
+
}
|
216
|
+
return {
|
217
|
+
[`${type}Year`]: year,
|
218
|
+
[`${type}Month`]: month,
|
219
|
+
[`${type}Date`]: date,
|
220
|
+
[`${type}Hour`]: hour,
|
221
|
+
[`${type}Minute`]: minute,
|
222
|
+
};
|
223
|
+
},
|
224
|
+
onCancel() {
|
225
|
+
this.$emit('cancel');
|
226
|
+
},
|
227
|
+
onConfirm() {
|
228
|
+
this.$emit('confirm', this.data.innerValue);
|
229
|
+
},
|
230
|
+
onChange() {
|
231
|
+
const { data } = this;
|
232
|
+
let value;
|
233
|
+
const picker = this.getPicker();
|
234
|
+
const originColumns = this.getOriginColumns();
|
235
|
+
if (data.type === 'time') {
|
236
|
+
const indexes = picker.getIndexes();
|
237
|
+
value = `${+originColumns[0].values[indexes[0]]}:${+originColumns[1]
|
238
|
+
.values[indexes[1]]}`;
|
239
|
+
}
|
240
|
+
else {
|
241
|
+
const indexes = picker.getIndexes();
|
242
|
+
const values = indexes.map((value, index) => originColumns[index].values[value]);
|
243
|
+
const year = getTrueValue(values[0]);
|
244
|
+
const month = getTrueValue(values[1]);
|
245
|
+
const maxDate = getMonthEndDay(year, month);
|
246
|
+
let date = getTrueValue(values[2]);
|
247
|
+
if (data.type === 'year-month') {
|
248
|
+
date = 1;
|
249
|
+
}
|
250
|
+
date = date > maxDate ? maxDate : date;
|
251
|
+
let hour = 0;
|
252
|
+
let minute = 0;
|
253
|
+
if (data.type === 'datetime') {
|
254
|
+
hour = getTrueValue(values[3]);
|
255
|
+
minute = getTrueValue(values[4]);
|
256
|
+
}
|
257
|
+
value = new Date(year, month - 1, date, hour, minute);
|
258
|
+
}
|
259
|
+
value = this.correctValue(value);
|
260
|
+
this.updateColumnValue(value).then(() => {
|
261
|
+
this.$emit('input', value);
|
262
|
+
this.$emit('change', picker);
|
263
|
+
});
|
264
|
+
},
|
265
|
+
updateColumnValue(value) {
|
266
|
+
let values = [];
|
267
|
+
const { type } = this.data;
|
268
|
+
const formatter = this.data.formatter || defaultFormatter;
|
269
|
+
const picker = this.getPicker();
|
270
|
+
if (type === 'time') {
|
271
|
+
const pair = value.split(':');
|
272
|
+
values = [formatter('hour', pair[0]), formatter('minute', pair[1])];
|
273
|
+
}
|
274
|
+
else {
|
275
|
+
const date = new Date(value);
|
276
|
+
values = [
|
277
|
+
formatter('year', `${date.getFullYear()}`),
|
278
|
+
formatter('month', padZero(date.getMonth() + 1)),
|
279
|
+
];
|
280
|
+
if (type === 'date') {
|
281
|
+
values.push(formatter('day', padZero(date.getDate())));
|
282
|
+
}
|
283
|
+
if (type === 'datetime') {
|
284
|
+
values.push(formatter('day', padZero(date.getDate())), formatter('hour', padZero(date.getHours())), formatter('minute', padZero(date.getMinutes())));
|
285
|
+
}
|
286
|
+
}
|
287
|
+
return this.set({ innerValue: value })
|
288
|
+
.then(() => this.updateColumns())
|
289
|
+
.then(() => picker.setValues(values));
|
290
|
+
},
|
291
|
+
},
|
292
|
+
created() {
|
293
|
+
const innerValue = this.correctValue(this.data.value);
|
294
|
+
this.updateColumnValue(innerValue).then(() => {
|
295
|
+
this.$emit('input', innerValue);
|
296
|
+
});
|
297
|
+
},
|
298
|
+
});
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<van-picker
|
2
|
+
class="van-datetime-picker"
|
3
|
+
active-class="active-class"
|
4
|
+
toolbar-class="toolbar-class"
|
5
|
+
column-class="column-class"
|
6
|
+
title="{{ title }}"
|
7
|
+
columns="{{ columns }}"
|
8
|
+
item-height="{{ itemHeight }}"
|
9
|
+
show-toolbar="{{ showToolbar }}"
|
10
|
+
visible-item-count="{{ visibleItemCount }}"
|
11
|
+
confirm-button-text="{{ confirmButtonText }}"
|
12
|
+
cancel-button-text="{{ cancelButtonText }}"
|
13
|
+
bind:change="onChange"
|
14
|
+
bind:confirm="onConfirm"
|
15
|
+
bind:cancel="onCancel"
|
16
|
+
/>
|
@@ -0,0 +1 @@
|
|
1
|
+
@import '../common/index.wxss';
|
@@ -0,0 +1,28 @@
|
|
1
|
+
/// <reference types="miniprogram-api-typings" />
|
2
|
+
interface VantComponentInstance {
|
3
|
+
parent: WechatMiniprogram.Component.TrivialInstance;
|
4
|
+
children: WechatMiniprogram.Component.TrivialInstance[];
|
5
|
+
index: number;
|
6
|
+
$emit: (name: string, detail?: unknown, options?: WechatMiniprogram.Component.TriggerEventOption) => void;
|
7
|
+
}
|
8
|
+
export type VantComponentOptions<Data extends WechatMiniprogram.Component.DataOption, Props extends WechatMiniprogram.Component.PropertyOption, Methods extends WechatMiniprogram.Component.MethodOption> = {
|
9
|
+
data?: Data;
|
10
|
+
field?: boolean;
|
11
|
+
classes?: string[];
|
12
|
+
mixins?: string[];
|
13
|
+
props?: Props;
|
14
|
+
relation?: {
|
15
|
+
relations: Record<string, WechatMiniprogram.Component.RelationOption>;
|
16
|
+
mixin: string;
|
17
|
+
};
|
18
|
+
watch?: Record<string, (...args: any[]) => any>;
|
19
|
+
methods?: Methods;
|
20
|
+
beforeCreate?: () => void;
|
21
|
+
created?: () => void;
|
22
|
+
mounted?: () => void;
|
23
|
+
destroyed?: () => void;
|
24
|
+
} & ThisType<VantComponentInstance & WechatMiniprogram.Component.Instance<Data & {
|
25
|
+
name: string;
|
26
|
+
value: any;
|
27
|
+
} & Record<string, any>, Props, Methods> & Record<string, any>>;
|
28
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1,60 @@
|
|
1
|
+
/// <reference types="miniprogram-api-typings" />
|
2
|
+
/// <reference types="miniprogram-api-typings" />
|
3
|
+
export type Action = 'confirm' | 'cancel' | 'overlay';
|
4
|
+
type DialogContext = WechatMiniprogram.Page.TrivialInstance | WechatMiniprogram.Component.TrivialInstance;
|
5
|
+
interface DialogOptions {
|
6
|
+
lang?: string;
|
7
|
+
show?: boolean;
|
8
|
+
title?: string;
|
9
|
+
icon?: boolean;
|
10
|
+
width?: string | number | null;
|
11
|
+
zIndex?: number;
|
12
|
+
theme?: string;
|
13
|
+
context?: (() => DialogContext) | DialogContext;
|
14
|
+
message?: string;
|
15
|
+
overlay?: boolean;
|
16
|
+
selector?: string;
|
17
|
+
ariaLabel?: string;
|
18
|
+
customStyle?: string;
|
19
|
+
transition?: string;
|
20
|
+
beforeClose?: null | ((action: Action, value?: string) => Promise<void | boolean> | void);
|
21
|
+
businessId?: number;
|
22
|
+
sessionFrom?: string;
|
23
|
+
overlayStyle?: string;
|
24
|
+
appParameter?: string;
|
25
|
+
messageAlign?: string;
|
26
|
+
sendMessageImg?: string;
|
27
|
+
showMessageCard?: boolean;
|
28
|
+
sendMessagePath?: string;
|
29
|
+
sendMessageTitle?: string;
|
30
|
+
confirmButtonText?: string;
|
31
|
+
cancelButtonText?: string;
|
32
|
+
showConfirmButton?: boolean;
|
33
|
+
showCancelButton?: boolean;
|
34
|
+
closeOnClickOverlay?: boolean;
|
35
|
+
confirmButtonOpenType?: string;
|
36
|
+
value?: null | string;
|
37
|
+
password?: boolean;
|
38
|
+
placeholder?: string;
|
39
|
+
maxlength?: number;
|
40
|
+
}
|
41
|
+
interface DialogInputOptions extends DialogOptions {
|
42
|
+
value: string;
|
43
|
+
type?: string;
|
44
|
+
password?: boolean;
|
45
|
+
placeholder?: string;
|
46
|
+
maxlength?: number;
|
47
|
+
}
|
48
|
+
declare const Dialog: {
|
49
|
+
(options: DialogOptions): Promise<WechatMiniprogram.Component.TrivialInstance>;
|
50
|
+
alert(options: DialogOptions): Promise<WechatMiniprogram.Component.TrivialInstance>;
|
51
|
+
confirm(options: DialogOptions): Promise<WechatMiniprogram.Component.TrivialInstance>;
|
52
|
+
input(options: DialogInputOptions): Promise<WechatMiniprogram.Component.TrivialInstance>;
|
53
|
+
close(): void;
|
54
|
+
stopLoading(): void;
|
55
|
+
currentOptions: DialogOptions;
|
56
|
+
defaultOptions: DialogOptions;
|
57
|
+
setDefaultOptions(options: DialogOptions): void;
|
58
|
+
resetDefaultOptions(): void;
|
59
|
+
};
|
60
|
+
export default Dialog;
|
@@ -0,0 +1,83 @@
|
|
1
|
+
let queue = [];
|
2
|
+
const defaultOptions = {
|
3
|
+
show: false,
|
4
|
+
title: '',
|
5
|
+
width: null,
|
6
|
+
theme: 'default',
|
7
|
+
message: '',
|
8
|
+
zIndex: 100,
|
9
|
+
overlay: true,
|
10
|
+
selector: '#smart-dialog',
|
11
|
+
// className: '',
|
12
|
+
// asyncClose: false,
|
13
|
+
beforeClose: null,
|
14
|
+
transition: 'scale',
|
15
|
+
customStyle: '',
|
16
|
+
messageAlign: '',
|
17
|
+
overlayStyle: '',
|
18
|
+
confirmButtonText: '确认',
|
19
|
+
cancelButtonText: '取消',
|
20
|
+
showConfirmButton: true,
|
21
|
+
showCancelButton: false,
|
22
|
+
closeOnClickOverlay: false,
|
23
|
+
confirmButtonOpenType: '',
|
24
|
+
icon: false,
|
25
|
+
value: null,
|
26
|
+
password: false,
|
27
|
+
placeholder: '',
|
28
|
+
maxlength: 20,
|
29
|
+
};
|
30
|
+
let currentOptions = Object.assign({}, defaultOptions);
|
31
|
+
function getContext() {
|
32
|
+
const pages = getCurrentPages();
|
33
|
+
return pages[pages.length - 1];
|
34
|
+
}
|
35
|
+
const Dialog = (options) => {
|
36
|
+
options = Object.assign(Object.assign({}, currentOptions), options);
|
37
|
+
return new Promise((resolve, reject) => {
|
38
|
+
const context = (typeof options.context === 'function'
|
39
|
+
? options.context()
|
40
|
+
: options.context) || getContext();
|
41
|
+
const dialog = context.selectComponent(options.selector);
|
42
|
+
delete options.context;
|
43
|
+
delete options.selector;
|
44
|
+
if (dialog) {
|
45
|
+
dialog.setData(Object.assign({ callback: (action, instance) => {
|
46
|
+
action === 'confirm' ? resolve(instance) : reject(instance);
|
47
|
+
} }, options));
|
48
|
+
wx.nextTick(() => {
|
49
|
+
dialog.setData({ show: true });
|
50
|
+
});
|
51
|
+
queue.push(dialog);
|
52
|
+
}
|
53
|
+
else {
|
54
|
+
console.warn('未找到 smart-dialog 节点,请确认 selector 及 context 是否正确');
|
55
|
+
}
|
56
|
+
});
|
57
|
+
};
|
58
|
+
Dialog.alert = (options) => Dialog(options);
|
59
|
+
Dialog.confirm = (options) => Dialog(Object.assign({ showCancelButton: true }, options));
|
60
|
+
Dialog.input = (options) => Dialog(Object.assign({ showCancelButton: true }, options));
|
61
|
+
Dialog.close = () => {
|
62
|
+
queue.forEach((dialog) => {
|
63
|
+
dialog.close();
|
64
|
+
});
|
65
|
+
queue = [];
|
66
|
+
};
|
67
|
+
Dialog.stopLoading = () => {
|
68
|
+
queue.forEach((dialog) => {
|
69
|
+
dialog.stopLoading();
|
70
|
+
});
|
71
|
+
};
|
72
|
+
Dialog.currentOptions = currentOptions;
|
73
|
+
Dialog.defaultOptions = defaultOptions;
|
74
|
+
Dialog.setDefaultOptions = (options) => {
|
75
|
+
currentOptions = Object.assign(Object.assign({}, currentOptions), options);
|
76
|
+
Dialog.currentOptions = currentOptions;
|
77
|
+
};
|
78
|
+
Dialog.resetDefaultOptions = () => {
|
79
|
+
currentOptions = Object.assign({}, defaultOptions);
|
80
|
+
Dialog.currentOptions = currentOptions;
|
81
|
+
};
|
82
|
+
Dialog.resetDefaultOptions();
|
83
|
+
export default Dialog;
|
@@ -0,0 +1 @@
|
|
1
|
+
@import '../common/index.css';.van-dialog{background-color:var(--dialog-background-color,var(--app-B4,#fff));border-radius:var(--dialog-border-radius,16px);font-size:var(--dialog-font-size,16px);overflow:hidden;top:45%!important;width:var(--dialog-width,311px)}@media (max-width:321px){.van-dialog{width:var(--dialog-small-screen-width,90%)}}.van-dialog__header{color:var(--dialog-header-font-color,var(--app-B4-N1,#000));font-weight:var(--dialog-header-font-weight,400);line-height:var(--dialog-header-line-height,24px);padding-top:var(--dialog-header-padding-top,24px);text-align:center}.van-dialog__header-icon{border-radius:100%;display:block;font-size:var(--dialog-header-icon-size,39px);height:var(--dialog-header-icon-size,39px);margin:auto auto 12px;width:var(--dialog-header-icon-size,39px)}.van-dialog__header--isolated{padding:var(--dialog-header-isolated-padding,24px 0)}.van-dialog__message{-webkit-overflow-scrolling:touch;color:var(--dialog-message-text-color,var(--app-B4-N1,#000));font-size:var(--dialog-message-font-size,16px);line-height:var(--dialog-message-line-height,20px);max-height:var(--dialog-message-max-height,60vh);overflow-y:auto;padding:var(--dialog-message-padding,24px);text-align:center}.van-dialog__message-text{word-wrap:break-word}.van-dialog__message--hasTitle{color:var(--dialog-has-title-message-text-color,var(--app-B4-N3,rgba(0,0,0,.5)));font-size:var(--dialog-has-title-message-font-size,14px);padding-top:var(--dialog-has-title-message-padding-top,8px)}.van-dialog__message--round-button{padding-bottom:16px}.van-dialog__message--left{text-align:left}.van-dialog__message--right{text-align:right}.van-dialog__message--justify{text-align:justify}.van-dialog__input{background-color:var(--dialog-input-background-color,var(--app-B4-N9,rgba(0,0,0,.05)));border-radius:var(--dialog-input-border-radius,10px);font-size:var(--dialog-input-font-size,14px);height:var(--dialog-input-height,40px);margin:var(--dialog-input-margin,0 16px 24px);padding:var(--dialog-input-padding,0 10px)}.van-dialog__footer{display:flex}.van-dialog__footer--round-button{height:40px!important;padding:8px 20px 16px!important;position:relative!important}.van-dialog__button{flex:1}.van-dialog__cancel,.van-dialog__confirm{border:0!important}.van-dialog-bounce-enter{opacity:0;transform:translate3d(-50%,-50%,0) scale(.7)}.van-dialog-bounce-leave-active{opacity:0;transform:translate3d(-50%,-50%,0) scale(.9)}
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|