cbvirtua 1.0.100 → 1.0.101
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/action-sheet/index.d.ts +1 -0
- package/dist/action-sheet/index.js +75 -0
- package/dist/action-sheet/index.json +8 -0
- package/dist/action-sheet/index.wxml +70 -0
- package/dist/action-sheet/index.wxss +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/button/index.d.ts +1 -0
- package/dist/button/index.js +64 -0
- package/dist/button/index.json +7 -0
- package/dist/button/index.wxml +56 -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.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.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.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/card/index.d.ts +1 -0
- package/dist/card/index.js +49 -0
- package/dist/card/index.json +6 -0
- package/dist/card/index.wxml +56 -0
- package/dist/card/index.wxss +1 -0
- package/dist/cascader/index.d.ts +1 -0
- package/dist/cascader/index.js +214 -0
- package/dist/cascader/index.json +8 -0
- package/dist/cascader/index.wxml +55 -0
- package/dist/cascader/index.wxs +24 -0
- package/dist/cascader/index.wxss +1 -0
- package/dist/cell/index.d.ts +1 -0
- package/dist/cell/index.js +38 -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.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.d.ts +1 -0
- package/dist/checkbox/index.js +77 -0
- package/dist/checkbox/index.json +6 -0
- package/dist/checkbox/index.wxml +31 -0
- package/dist/checkbox/index.wxs +20 -0
- package/dist/checkbox/index.wxss +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/canvas.d.ts +4 -0
- package/dist/circle/canvas.js +43 -0
- package/dist/circle/index.d.ts +1 -0
- package/dist/circle/index.js +197 -0
- package/dist/circle/index.json +3 -0
- package/dist/circle/index.wxml +9 -0
- package/dist/circle/index.wxss +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.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.d.ts +1 -0
- package/dist/collapse-item/index.js +61 -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.wxss +1 -0
- package/dist/common/relation.d.ts +15 -0
- package/dist/common/relation.js +56 -0
- package/dist/common/style/clearfix.wxss +1 -0
- package/dist/common/style/ellipsis.wxss +1 -0
- package/dist/common/style/hairline.wxss +1 -0
- package/dist/common/style/mixins/clearfix.wxss +0 -0
- package/dist/common/style/mixins/ellipsis.wxss +0 -0
- package/dist/common/style/mixins/hairline.wxss +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.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/datetime-picker/index.d.ts +1 -0
- package/dist/datetime-picker/index.js +295 -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 +29 -0
- package/dist/definitions/index.js +1 -0
- package/dist/dialog/dialog.d.ts +55 -0
- package/dist/dialog/dialog.js +77 -0
- package/dist/dialog/index.d.ts +1 -0
- package/dist/dialog/index.js +132 -0
- package/dist/dialog/index.json +9 -0
- package/dist/dialog/index.wxml +126 -0
- package/dist/dialog/index.wxss +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.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.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.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 +15 -0
- package/dist/empty/index.wxss +1 -0
- package/dist/field/index.d.ts +1 -0
- package/dist/field/index.js +138 -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 +56 -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.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.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.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.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.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.d.ts +1 -0
- package/dist/icon/index.js +21 -0
- package/dist/icon/index.json +6 -0
- package/dist/icon/index.wxml +20 -0
- package/dist/icon/index.wxs +43 -0
- package/dist/icon/index.wxss +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.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.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.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.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 +26 -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 +136 -0
- package/dist/nav-bar/index.d.ts +1 -0
- package/dist/nav-bar/index.js +65 -0
- package/dist/nav-bar/index.json +6 -0
- package/dist/nav-bar/index.wxml +42 -0
- package/dist/nav-bar/index.wxs +13 -0
- package/dist/nav-bar/index.wxss +1 -0
- package/dist/notice-bar/index.d.ts +1 -0
- package/dist/notice-bar/index.js +132 -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.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.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/panel/index.d.ts +1 -0
- package/dist/panel/index.js +9 -0
- package/dist/panel/index.json +6 -0
- package/dist/panel/index.wxml +19 -0
- package/dist/panel/index.wxss +1 -0
- package/dist/picker/index.d.ts +1 -0
- package/dist/picker/index.js +136 -0
- package/dist/picker/index.json +7 -0
- package/dist/picker/index.wxml +37 -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.d.ts +1 -0
- package/dist/picker-column/index.js +118 -0
- package/dist/picker-column/index.json +3 -0
- package/dist/picker-column/index.wxml +23 -0
- package/dist/picker-column/index.wxs +36 -0
- package/dist/picker-column/index.wxss +1 -0
- package/dist/popup/index.d.ts +1 -0
- package/dist/popup/index.js +97 -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 +16 -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.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.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.d.ts +1 -0
- package/dist/rate/index.js +78 -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.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.d.ts +1 -0
- package/dist/search/index.js +97 -0
- package/dist/search/index.json +6 -0
- package/dist/search/index.wxml +54 -0
- package/dist/search/index.wxss +1 -0
- package/dist/share-sheet/index.d.ts +1 -0
- package/dist/share-sheet/index.js +59 -0
- package/dist/share-sheet/index.json +7 -0
- package/dist/share-sheet/index.wxml +47 -0
- package/dist/share-sheet/index.wxs +12 -0
- package/dist/share-sheet/index.wxss +1 -0
- package/dist/share-sheet/options.d.ts +1 -0
- package/dist/share-sheet/options.js +14 -0
- package/dist/share-sheet/options.json +3 -0
- package/dist/share-sheet/options.wxml +20 -0
- package/dist/share-sheet/options.wxs +14 -0
- package/dist/share-sheet/options.wxss +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.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.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.d.ts +1 -0
- package/dist/slider/index.js +207 -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.d.ts +1 -0
- package/dist/stepper/index.js +184 -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.d.ts +1 -0
- package/dist/steps/index.js +33 -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.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/submit-bar/index.d.ts +1 -0
- package/dist/submit-bar/index.js +56 -0
- package/dist/submit-bar/index.json +7 -0
- package/dist/submit-bar/index.wxml +44 -0
- package/dist/submit-bar/index.wxss +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 +20 -0
- package/dist/swipe-cell/index.wxss +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.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.d.ts +1 -0
- package/dist/tabbar/index.js +65 -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.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 +28 -0
- package/dist/tabbar-item/index.wxss +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.d.ts +1 -0
- package/dist/tag/index.js +21 -0
- package/dist/tag/index.json +6 -0
- package/dist/tag/index.wxml +15 -0
- package/dist/tag/index.wxs +13 -0
- package/dist/tag/index.wxss +1 -0
- package/dist/toast/index.d.ts +1 -0
- package/dist/toast/index.js +29 -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.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.d.ts +1 -0
- package/dist/tree-select/index.js +68 -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/uploader/index.d.ts +1 -0
- package/dist/uploader/index.js +170 -0
- package/dist/uploader/index.json +7 -0
- package/dist/uploader/index.wxml +85 -0
- package/dist/uploader/index.wxs +17 -0
- package/dist/uploader/index.wxss +1 -0
- package/dist/uploader/shared.d.ts +61 -0
- package/dist/uploader/shared.js +65 -0
- package/dist/uploader/utils.d.ts +24 -0
- package/dist/uploader/utils.js +94 -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/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { VantComponent } from '../common/component';
|
|
2
|
+
import { button } from '../mixins/button';
|
|
3
|
+
VantComponent({
|
|
4
|
+
classes: ['list-class'],
|
|
5
|
+
mixins: [button],
|
|
6
|
+
props: {
|
|
7
|
+
show: Boolean,
|
|
8
|
+
title: String,
|
|
9
|
+
cancelText: String,
|
|
10
|
+
description: String,
|
|
11
|
+
round: {
|
|
12
|
+
type: Boolean,
|
|
13
|
+
value: true,
|
|
14
|
+
},
|
|
15
|
+
zIndex: {
|
|
16
|
+
type: Number,
|
|
17
|
+
value: 100,
|
|
18
|
+
},
|
|
19
|
+
actions: {
|
|
20
|
+
type: Array,
|
|
21
|
+
value: [],
|
|
22
|
+
},
|
|
23
|
+
overlay: {
|
|
24
|
+
type: Boolean,
|
|
25
|
+
value: true,
|
|
26
|
+
},
|
|
27
|
+
closeOnClickOverlay: {
|
|
28
|
+
type: Boolean,
|
|
29
|
+
value: true,
|
|
30
|
+
},
|
|
31
|
+
closeOnClickAction: {
|
|
32
|
+
type: Boolean,
|
|
33
|
+
value: true,
|
|
34
|
+
},
|
|
35
|
+
safeAreaInsetBottom: {
|
|
36
|
+
type: Boolean,
|
|
37
|
+
value: true,
|
|
38
|
+
},
|
|
39
|
+
rootPortal: {
|
|
40
|
+
type: Boolean,
|
|
41
|
+
value: false,
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
methods: {
|
|
45
|
+
onSelect(event) {
|
|
46
|
+
const { index } = event.currentTarget.dataset;
|
|
47
|
+
const { actions, closeOnClickAction, canIUseGetUserProfile } = this.data;
|
|
48
|
+
const item = actions[index];
|
|
49
|
+
if (item) {
|
|
50
|
+
this.$emit('select', item);
|
|
51
|
+
if (closeOnClickAction) {
|
|
52
|
+
this.onClose();
|
|
53
|
+
}
|
|
54
|
+
if (item.openType === 'getUserInfo' && canIUseGetUserProfile) {
|
|
55
|
+
wx.getUserProfile({
|
|
56
|
+
desc: item.getUserProfileDesc || ' ',
|
|
57
|
+
complete: (userProfile) => {
|
|
58
|
+
this.$emit('getuserinfo', userProfile);
|
|
59
|
+
},
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
onCancel() {
|
|
65
|
+
this.$emit('cancel');
|
|
66
|
+
},
|
|
67
|
+
onClose() {
|
|
68
|
+
this.$emit('close');
|
|
69
|
+
},
|
|
70
|
+
onClickOverlay() {
|
|
71
|
+
this.$emit('click-overlay');
|
|
72
|
+
this.onClose();
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
});
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
<wxs src="../wxs/utils.wxs" module="utils" />
|
|
2
|
+
|
|
3
|
+
<van-popup
|
|
4
|
+
show="{{ show }}"
|
|
5
|
+
position="bottom"
|
|
6
|
+
round="{{ round }}"
|
|
7
|
+
z-index="{{ zIndex }}"
|
|
8
|
+
overlay="{{ overlay }}"
|
|
9
|
+
custom-class="van-action-sheet custom-class"
|
|
10
|
+
safe-area-inset-bottom="{{ safeAreaInsetBottom }}"
|
|
11
|
+
close-on-click-overlay="{{ closeOnClickOverlay }}"
|
|
12
|
+
root-portal="{{ rootPortal }}"
|
|
13
|
+
bind:close="onClickOverlay"
|
|
14
|
+
>
|
|
15
|
+
<view wx:if="{{ title }}" class="van-action-sheet__header">
|
|
16
|
+
{{ title }}
|
|
17
|
+
<van-icon
|
|
18
|
+
name="cross"
|
|
19
|
+
custom-class="van-action-sheet__close"
|
|
20
|
+
bind:click="onClose"
|
|
21
|
+
/>
|
|
22
|
+
</view>
|
|
23
|
+
<view wx:if="{{ description }}" class="van-action-sheet__description van-hairline--bottom">
|
|
24
|
+
{{ description }}
|
|
25
|
+
</view>
|
|
26
|
+
<view wx:if="{{ actions && actions.length }}" class="list-class">
|
|
27
|
+
<!-- button外包一层view,防止actions动态变化,导致渲染时button被打散 -->
|
|
28
|
+
<button
|
|
29
|
+
wx:for="{{ actions }}"
|
|
30
|
+
wx:key="index"
|
|
31
|
+
open-type="{{ item.disabled || item.loading || (canIUseGetUserProfile && item.openType === 'getUserInfo') ? '' : item.openType }}"
|
|
32
|
+
style="{{ item.color ? 'color: ' + item.color : '' }}"
|
|
33
|
+
class="{{ utils.bem('action-sheet__item', { disabled: item.disabled || item.loading }) }} {{ item.className || '' }}"
|
|
34
|
+
hover-class="van-action-sheet__item--hover"
|
|
35
|
+
data-index="{{ index }}"
|
|
36
|
+
bindtap="{{ item.disabled || item.loading ? '' : 'onSelect' }}"
|
|
37
|
+
bindgetuserinfo="onGetUserInfo"
|
|
38
|
+
bindcontact="onContact"
|
|
39
|
+
bindgetphonenumber="onGetPhoneNumber"
|
|
40
|
+
binderror="onError"
|
|
41
|
+
bindlaunchapp="onLaunchApp"
|
|
42
|
+
bindopensetting="onOpenSetting"
|
|
43
|
+
lang="{{ lang }}"
|
|
44
|
+
session-from="{{ sessionFrom }}"
|
|
45
|
+
send-message-title="{{ sendMessageTitle }}"
|
|
46
|
+
send-message-path="{{ sendMessagePath }}"
|
|
47
|
+
send-message-img="{{ sendMessageImg }}"
|
|
48
|
+
show-message-card="{{ showMessageCard }}"
|
|
49
|
+
app-parameter="{{ appParameter }}"
|
|
50
|
+
>
|
|
51
|
+
<block wx:if="{{ !item.loading }}">
|
|
52
|
+
{{ item.name }}
|
|
53
|
+
<view wx:if="{{ item.subname }}" class="van-action-sheet__subname" >{{ item.subname }}</view>
|
|
54
|
+
</block>
|
|
55
|
+
<van-loading wx:else custom-class="van-action-sheet__loading" size="22px" />
|
|
56
|
+
</button>
|
|
57
|
+
</view>
|
|
58
|
+
<slot />
|
|
59
|
+
<block wx:if="{{ cancelText }}">
|
|
60
|
+
<view class="van-action-sheet__gap" />
|
|
61
|
+
<view
|
|
62
|
+
class="van-action-sheet__cancel"
|
|
63
|
+
hover-class="van-action-sheet__cancel--hover"
|
|
64
|
+
hover-stay-time="70"
|
|
65
|
+
bind:tap="onCancel"
|
|
66
|
+
>
|
|
67
|
+
{{ cancelText }}
|
|
68
|
+
</view>
|
|
69
|
+
</block>
|
|
70
|
+
</van-popup>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import '../common/index.wxss';.van-action-sheet{color:var(--action-sheet-item-text-color,#323233);max-height:var(--action-sheet-max-height,90%)!important}.van-action-sheet__cancel,.van-action-sheet__item{background-color:var(--action-sheet-item-background,#fff);font-size:var(--action-sheet-item-font-size,16px);line-height:var(--action-sheet-item-line-height,22px);padding:14px 16px;text-align:center}.van-action-sheet__cancel--hover,.van-action-sheet__item--hover{background-color:#f2f3f5}.van-action-sheet__cancel:after,.van-action-sheet__item:after{border-width:0}.van-action-sheet__cancel{color:var(--action-sheet-cancel-text-color,#646566)}.van-action-sheet__gap{background-color:var(--action-sheet-cancel-padding-color,#f7f8fa);display:block;height:var(--action-sheet-cancel-padding-top,8px)}.van-action-sheet__item--disabled{color:var(--action-sheet-item-disabled-text-color,#c8c9cc)}.van-action-sheet__item--disabled.van-action-sheet__item--hover{background-color:var(--action-sheet-item-background,#fff)}.van-action-sheet__subname{color:var(--action-sheet-subname-color,#969799);font-size:var(--action-sheet-subname-font-size,12px);line-height:var(--action-sheet-subname-line-height,20px);margin-top:var(--padding-xs,8px)}.van-action-sheet__header{font-size:var(--action-sheet-header-font-size,16px);font-weight:var(--font-weight-bold,500);line-height:var(--action-sheet-header-height,48px);text-align:center}.van-action-sheet__description{color:var(--action-sheet-description-color,#969799);font-size:var(--action-sheet-description-font-size,14px);line-height:var(--action-sheet-description-line-height,20px);padding:20px var(--padding-md,16px);text-align:center}.van-action-sheet__close{color:var(--action-sheet-close-icon-color,#c8c9cc);font-size:var(--action-sheet-close-icon-size,22px)!important;line-height:inherit!important;padding:var(--action-sheet-close-icon-padding,0 16px);position:absolute!important;right:0;top:0}.van-action-sheet__loading{display:flex!important}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
import { VantComponent } from '../common/component';
|
|
2
|
+
import { pickerProps } from '../picker/shared';
|
|
3
|
+
import { requestAnimationFrame } from '../common/utils';
|
|
4
|
+
const EMPTY_CODE = '000000';
|
|
5
|
+
VantComponent({
|
|
6
|
+
classes: ['active-class', 'toolbar-class', 'column-class'],
|
|
7
|
+
props: Object.assign(Object.assign({}, pickerProps), { showToolbar: {
|
|
8
|
+
type: Boolean,
|
|
9
|
+
value: true,
|
|
10
|
+
}, value: {
|
|
11
|
+
type: String,
|
|
12
|
+
observer(value) {
|
|
13
|
+
this.code = value;
|
|
14
|
+
this.setValues();
|
|
15
|
+
},
|
|
16
|
+
}, areaList: {
|
|
17
|
+
type: Object,
|
|
18
|
+
value: {},
|
|
19
|
+
observer: 'setValues',
|
|
20
|
+
}, columnsNum: {
|
|
21
|
+
type: null,
|
|
22
|
+
value: 3,
|
|
23
|
+
}, columnsPlaceholder: {
|
|
24
|
+
type: Array,
|
|
25
|
+
observer(val) {
|
|
26
|
+
this.setData({
|
|
27
|
+
typeToColumnsPlaceholder: {
|
|
28
|
+
province: val[0] || '',
|
|
29
|
+
city: val[1] || '',
|
|
30
|
+
county: val[2] || '',
|
|
31
|
+
},
|
|
32
|
+
});
|
|
33
|
+
},
|
|
34
|
+
} }),
|
|
35
|
+
data: {
|
|
36
|
+
columns: [{ values: [] }, { values: [] }, { values: [] }],
|
|
37
|
+
typeToColumnsPlaceholder: {},
|
|
38
|
+
},
|
|
39
|
+
mounted() {
|
|
40
|
+
requestAnimationFrame(() => {
|
|
41
|
+
this.setValues();
|
|
42
|
+
});
|
|
43
|
+
},
|
|
44
|
+
methods: {
|
|
45
|
+
getPicker() {
|
|
46
|
+
if (this.picker == null) {
|
|
47
|
+
this.picker = this.selectComponent('.van-area__picker');
|
|
48
|
+
}
|
|
49
|
+
return this.picker;
|
|
50
|
+
},
|
|
51
|
+
onCancel(event) {
|
|
52
|
+
this.emit('cancel', event.detail);
|
|
53
|
+
},
|
|
54
|
+
onConfirm(event) {
|
|
55
|
+
const { index } = event.detail;
|
|
56
|
+
let { value } = event.detail;
|
|
57
|
+
value = this.parseValues(value);
|
|
58
|
+
this.emit('confirm', { value, index });
|
|
59
|
+
},
|
|
60
|
+
emit(type, detail) {
|
|
61
|
+
detail.values = detail.value;
|
|
62
|
+
delete detail.value;
|
|
63
|
+
this.$emit(type, detail);
|
|
64
|
+
},
|
|
65
|
+
parseValues(values) {
|
|
66
|
+
const { columnsPlaceholder } = this.data;
|
|
67
|
+
return values.map((value, index) => {
|
|
68
|
+
if (value &&
|
|
69
|
+
(!value.code || value.name === columnsPlaceholder[index])) {
|
|
70
|
+
return Object.assign(Object.assign({}, value), { code: '', name: '' });
|
|
71
|
+
}
|
|
72
|
+
return value;
|
|
73
|
+
});
|
|
74
|
+
},
|
|
75
|
+
onChange(event) {
|
|
76
|
+
var _a;
|
|
77
|
+
const { index, picker, value } = event.detail;
|
|
78
|
+
this.code = value[index].code;
|
|
79
|
+
(_a = this.setValues()) === null || _a === void 0 ? void 0 : _a.then(() => {
|
|
80
|
+
this.$emit('change', {
|
|
81
|
+
picker,
|
|
82
|
+
values: this.parseValues(picker.getValues()),
|
|
83
|
+
index,
|
|
84
|
+
});
|
|
85
|
+
});
|
|
86
|
+
},
|
|
87
|
+
getConfig(type) {
|
|
88
|
+
const { areaList } = this.data;
|
|
89
|
+
return (areaList && areaList[`${type}_list`]) || {};
|
|
90
|
+
},
|
|
91
|
+
getList(type, code) {
|
|
92
|
+
if (type !== 'province' && !code) {
|
|
93
|
+
return [];
|
|
94
|
+
}
|
|
95
|
+
const { typeToColumnsPlaceholder } = this.data;
|
|
96
|
+
const list = this.getConfig(type);
|
|
97
|
+
let result = Object.keys(list).map((code) => ({
|
|
98
|
+
code,
|
|
99
|
+
name: list[code],
|
|
100
|
+
}));
|
|
101
|
+
if (code != null) {
|
|
102
|
+
// oversea code
|
|
103
|
+
if (code[0] === '9' && type === 'city') {
|
|
104
|
+
code = '9';
|
|
105
|
+
}
|
|
106
|
+
result = result.filter((item) => item.code.indexOf(code) === 0);
|
|
107
|
+
}
|
|
108
|
+
if (typeToColumnsPlaceholder[type] && result.length) {
|
|
109
|
+
// set columns placeholder
|
|
110
|
+
const codeFill = type === 'province'
|
|
111
|
+
? ''
|
|
112
|
+
: type === 'city'
|
|
113
|
+
? EMPTY_CODE.slice(2, 4)
|
|
114
|
+
: EMPTY_CODE.slice(4, 6);
|
|
115
|
+
result.unshift({
|
|
116
|
+
code: `${code}${codeFill}`,
|
|
117
|
+
name: typeToColumnsPlaceholder[type],
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
return result;
|
|
121
|
+
},
|
|
122
|
+
getIndex(type, code) {
|
|
123
|
+
let compareNum = type === 'province' ? 2 : type === 'city' ? 4 : 6;
|
|
124
|
+
const list = this.getList(type, code.slice(0, compareNum - 2));
|
|
125
|
+
// oversea code
|
|
126
|
+
if (code[0] === '9' && type === 'province') {
|
|
127
|
+
compareNum = 1;
|
|
128
|
+
}
|
|
129
|
+
code = code.slice(0, compareNum);
|
|
130
|
+
for (let i = 0; i < list.length; i++) {
|
|
131
|
+
if (list[i].code.slice(0, compareNum) === code) {
|
|
132
|
+
return i;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
return 0;
|
|
136
|
+
},
|
|
137
|
+
setValues() {
|
|
138
|
+
const picker = this.getPicker();
|
|
139
|
+
if (!picker) {
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
142
|
+
let code = this.code || this.getDefaultCode();
|
|
143
|
+
const provinceList = this.getList('province');
|
|
144
|
+
const cityList = this.getList('city', code.slice(0, 2));
|
|
145
|
+
const stack = [];
|
|
146
|
+
const indexes = [];
|
|
147
|
+
const { columnsNum } = this.data;
|
|
148
|
+
if (columnsNum >= 1) {
|
|
149
|
+
stack.push(picker.setColumnValues(0, provinceList, false));
|
|
150
|
+
indexes.push(this.getIndex('province', code));
|
|
151
|
+
}
|
|
152
|
+
if (columnsNum >= 2) {
|
|
153
|
+
stack.push(picker.setColumnValues(1, cityList, false));
|
|
154
|
+
indexes.push(this.getIndex('city', code));
|
|
155
|
+
if (cityList.length && code.slice(2, 4) === '00') {
|
|
156
|
+
[{ code }] = cityList;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
if (columnsNum === 3) {
|
|
160
|
+
stack.push(picker.setColumnValues(2, this.getList('county', code.slice(0, 4)), false));
|
|
161
|
+
indexes.push(this.getIndex('county', code));
|
|
162
|
+
}
|
|
163
|
+
return Promise.all(stack)
|
|
164
|
+
.catch(() => { })
|
|
165
|
+
.then(() => picker.setIndexes(indexes))
|
|
166
|
+
.catch(() => { });
|
|
167
|
+
},
|
|
168
|
+
getDefaultCode() {
|
|
169
|
+
const { columnsPlaceholder } = this.data;
|
|
170
|
+
if (columnsPlaceholder.length) {
|
|
171
|
+
return EMPTY_CODE;
|
|
172
|
+
}
|
|
173
|
+
const countyCodes = Object.keys(this.getConfig('county'));
|
|
174
|
+
if (countyCodes[0]) {
|
|
175
|
+
return countyCodes[0];
|
|
176
|
+
}
|
|
177
|
+
const cityCodes = Object.keys(this.getConfig('city'));
|
|
178
|
+
if (cityCodes[0]) {
|
|
179
|
+
return cityCodes[0];
|
|
180
|
+
}
|
|
181
|
+
return '';
|
|
182
|
+
},
|
|
183
|
+
getValues() {
|
|
184
|
+
const picker = this.getPicker();
|
|
185
|
+
if (!picker) {
|
|
186
|
+
return [];
|
|
187
|
+
}
|
|
188
|
+
return this.parseValues(picker.getValues().filter((value) => !!value));
|
|
189
|
+
},
|
|
190
|
+
getDetail() {
|
|
191
|
+
const values = this.getValues();
|
|
192
|
+
const area = {
|
|
193
|
+
code: '',
|
|
194
|
+
country: '',
|
|
195
|
+
province: '',
|
|
196
|
+
city: '',
|
|
197
|
+
county: '',
|
|
198
|
+
};
|
|
199
|
+
if (!values.length) {
|
|
200
|
+
return area;
|
|
201
|
+
}
|
|
202
|
+
const names = values.map((item) => item.name);
|
|
203
|
+
area.code = values[values.length - 1].code;
|
|
204
|
+
if (area.code[0] === '9') {
|
|
205
|
+
area.country = names[1] || '';
|
|
206
|
+
area.province = names[2] || '';
|
|
207
|
+
}
|
|
208
|
+
else {
|
|
209
|
+
area.province = names[0] || '';
|
|
210
|
+
area.city = names[1] || '';
|
|
211
|
+
area.county = names[2] || '';
|
|
212
|
+
}
|
|
213
|
+
return area;
|
|
214
|
+
},
|
|
215
|
+
reset(code) {
|
|
216
|
+
this.code = code || '';
|
|
217
|
+
return this.setValues();
|
|
218
|
+
},
|
|
219
|
+
},
|
|
220
|
+
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<wxs src="./index.wxs" module="computed" />
|
|
2
|
+
|
|
3
|
+
<van-picker
|
|
4
|
+
class="van-area__picker"
|
|
5
|
+
active-class="active-class"
|
|
6
|
+
toolbar-class="toolbar-class"
|
|
7
|
+
column-class="column-class"
|
|
8
|
+
show-toolbar="{{ showToolbar }}"
|
|
9
|
+
value-key="name"
|
|
10
|
+
title="{{ title }}"
|
|
11
|
+
loading="{{ loading }}"
|
|
12
|
+
columns="{{ computed.displayColumns(columns, columnsNum) }}"
|
|
13
|
+
item-height="{{ itemHeight }}"
|
|
14
|
+
visible-item-count="{{ visibleItemCount }}"
|
|
15
|
+
cancel-button-text="{{ cancelButtonText }}"
|
|
16
|
+
confirm-button-text="{{ confirmButtonText }}"
|
|
17
|
+
bind:change="onChange"
|
|
18
|
+
bind:confirm="onConfirm"
|
|
19
|
+
bind:cancel="onCancel"
|
|
20
|
+
/>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import '../common/index.wxss';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { VantComponent } from '../common/component';
|
|
2
|
+
import { button } from '../mixins/button';
|
|
3
|
+
import { canIUseFormFieldButton } from '../common/version';
|
|
4
|
+
const mixins = [button];
|
|
5
|
+
if (canIUseFormFieldButton()) {
|
|
6
|
+
mixins.push('wx://form-field-button');
|
|
7
|
+
}
|
|
8
|
+
VantComponent({
|
|
9
|
+
mixins,
|
|
10
|
+
classes: ['hover-class', 'loading-class'],
|
|
11
|
+
data: {
|
|
12
|
+
baseStyle: '',
|
|
13
|
+
},
|
|
14
|
+
props: {
|
|
15
|
+
formType: String,
|
|
16
|
+
icon: String,
|
|
17
|
+
classPrefix: {
|
|
18
|
+
type: String,
|
|
19
|
+
value: 'van-icon',
|
|
20
|
+
},
|
|
21
|
+
plain: Boolean,
|
|
22
|
+
block: Boolean,
|
|
23
|
+
round: Boolean,
|
|
24
|
+
square: Boolean,
|
|
25
|
+
loading: Boolean,
|
|
26
|
+
hairline: Boolean,
|
|
27
|
+
disabled: Boolean,
|
|
28
|
+
loadingText: String,
|
|
29
|
+
customStyle: String,
|
|
30
|
+
loadingType: {
|
|
31
|
+
type: String,
|
|
32
|
+
value: 'circular',
|
|
33
|
+
},
|
|
34
|
+
type: {
|
|
35
|
+
type: String,
|
|
36
|
+
value: 'default',
|
|
37
|
+
},
|
|
38
|
+
dataset: null,
|
|
39
|
+
size: {
|
|
40
|
+
type: String,
|
|
41
|
+
value: 'normal',
|
|
42
|
+
},
|
|
43
|
+
loadingSize: {
|
|
44
|
+
type: String,
|
|
45
|
+
value: '20px',
|
|
46
|
+
},
|
|
47
|
+
color: String,
|
|
48
|
+
},
|
|
49
|
+
methods: {
|
|
50
|
+
onClick(event) {
|
|
51
|
+
this.$emit('click', event);
|
|
52
|
+
const { canIUseGetUserProfile, openType, getUserProfileDesc, lang, } = this.data;
|
|
53
|
+
if (openType === 'getUserInfo' && canIUseGetUserProfile) {
|
|
54
|
+
wx.getUserProfile({
|
|
55
|
+
desc: getUserProfileDesc || ' ',
|
|
56
|
+
lang: lang || 'en',
|
|
57
|
+
complete: (userProfile) => {
|
|
58
|
+
this.$emit('getuserinfo', userProfile);
|
|
59
|
+
},
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
});
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
<wxs src="../wxs/utils.wxs" module="utils" />
|
|
2
|
+
<wxs src="./index.wxs" module="computed" />
|
|
3
|
+
|
|
4
|
+
<button
|
|
5
|
+
id="{{ id || buttonId }}"
|
|
6
|
+
data-detail="{{ dataset }}"
|
|
7
|
+
class="custom-class {{ utils.bem('button', [type, size, { block, round, plain, square, loading, disabled, hairline, unclickable: disabled || loading }]) }} {{ hairline ? 'van-hairline--surround' : '' }}"
|
|
8
|
+
hover-class="{{ disabled || loading ? '' : 'van-button--active hover-class'}}"
|
|
9
|
+
lang="{{ lang }}"
|
|
10
|
+
form-type="{{ formType }}"
|
|
11
|
+
style="{{ computed.rootStyle({ plain, color, customStyle }) }}"
|
|
12
|
+
open-type="{{ disabled || loading || (canIUseGetUserProfile && openType === 'getUserInfo') ? '' : openType }}"
|
|
13
|
+
business-id="{{ businessId }}"
|
|
14
|
+
session-from="{{ sessionFrom }}"
|
|
15
|
+
send-message-title="{{ sendMessageTitle }}"
|
|
16
|
+
send-message-path="{{ sendMessagePath }}"
|
|
17
|
+
send-message-img="{{ sendMessageImg }}"
|
|
18
|
+
show-message-card="{{ showMessageCard }}"
|
|
19
|
+
app-parameter="{{ appParameter }}"
|
|
20
|
+
aria-label="{{ ariaLabel }}"
|
|
21
|
+
bindtap="{{ disabled || loading ? '' : 'onClick' }}"
|
|
22
|
+
bindgetuserinfo="onGetUserInfo"
|
|
23
|
+
bindcontact="onContact"
|
|
24
|
+
bindgetphonenumber="onGetPhoneNumber"
|
|
25
|
+
bindgetrealtimephonenumber="onGetRealTimePhoneNumber"
|
|
26
|
+
bindagreeprivacyauthorization="onAgreePrivacyAuthorization"
|
|
27
|
+
binderror="onError"
|
|
28
|
+
bindlaunchapp="onLaunchApp"
|
|
29
|
+
bindopensetting="onOpenSetting"
|
|
30
|
+
bindchooseavatar="onChooseAvatar"
|
|
31
|
+
>
|
|
32
|
+
<block wx:if="{{ loading }}">
|
|
33
|
+
<van-loading
|
|
34
|
+
custom-class="loading-class"
|
|
35
|
+
size="{{ loadingSize }}"
|
|
36
|
+
type="{{ loadingType }}"
|
|
37
|
+
color="{{ computed.loadingColor({ type, color, plain }) }}"
|
|
38
|
+
/>
|
|
39
|
+
<view wx:if="{{ loadingText }}" class="van-button__loading-text">
|
|
40
|
+
{{ loadingText }}
|
|
41
|
+
</view>
|
|
42
|
+
</block>
|
|
43
|
+
<block wx:else>
|
|
44
|
+
<van-icon
|
|
45
|
+
wx:if="{{ icon }}"
|
|
46
|
+
size="1.2em"
|
|
47
|
+
name="{{ icon }}"
|
|
48
|
+
class-prefix="{{ classPrefix }}"
|
|
49
|
+
class="van-button__icon"
|
|
50
|
+
custom-style="line-height: inherit;"
|
|
51
|
+
/>
|
|
52
|
+
<view class="van-button__text">
|
|
53
|
+
<slot />
|
|
54
|
+
</view>
|
|
55
|
+
</block>
|
|
56
|
+
</button>
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
var style = require('../wxs/style.wxs');
|
|
3
|
+
|
|
4
|
+
function rootStyle(data) {
|
|
5
|
+
if (!data.color) {
|
|
6
|
+
return data.customStyle;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
var properties = {
|
|
10
|
+
color: data.plain ? data.color : '#fff',
|
|
11
|
+
background: data.plain ? null : data.color,
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
// hide border when color is linear-gradient
|
|
15
|
+
if (data.color.indexOf('gradient') !== -1) {
|
|
16
|
+
properties.border = 0;
|
|
17
|
+
} else {
|
|
18
|
+
properties['border-color'] = data.color;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
return style([properties, data.customStyle]);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
function loadingColor(data) {
|
|
25
|
+
if (data.plain) {
|
|
26
|
+
return data.color ? data.color : '#c9c9c9';
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
if (data.type === 'default') {
|
|
30
|
+
return '#c9c9c9';
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
return '#fff';
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
module.exports = {
|
|
37
|
+
rootStyle: rootStyle,
|
|
38
|
+
loadingColor: loadingColor,
|
|
39
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import '../common/index.wxss';.van-button{-webkit-text-size-adjust:100%;align-items:center;-webkit-appearance:none;border-radius:var(--button-border-radius,2px);box-sizing:border-box;display:inline-flex;font-size:var(--button-default-font-size,16px);height:var(--button-default-height,44px);justify-content:center;line-height:var(--button-line-height,20px);padding:0;position:relative;text-align:center;transition:opacity .2s;vertical-align:middle}.van-button:before{background-color:#000;border:inherit;border-color:#000;border-radius:inherit;content:" ";height:100%;left:50%;opacity:0;position:absolute;top:50%;transform:translate(-50%,-50%);width:100%}.van-button:after{border-width:0}.van-button--active:before{opacity:.15}.van-button--unclickable:after{display:none}.van-button--default{background:var(--button-default-background-color,#fff);border:var(--button-border-width,1px) solid var(--button-default-border-color,#ebedf0);color:var(--button-default-color,#323233)}.van-button--primary{background:var(--button-primary-background-color,#07c160);border:var(--button-border-width,1px) solid var(--button-primary-border-color,#07c160);color:var(--button-primary-color,#fff)}.van-button--info{background:var(--button-info-background-color,#1989fa);border:var(--button-border-width,1px) solid var(--button-info-border-color,#1989fa);color:var(--button-info-color,#fff)}.van-button--danger{background:var(--button-danger-background-color,#ee0a24);border:var(--button-border-width,1px) solid var(--button-danger-border-color,#ee0a24);color:var(--button-danger-color,#fff)}.van-button--warning{background:var(--button-warning-background-color,#ff976a);border:var(--button-border-width,1px) solid var(--button-warning-border-color,#ff976a);color:var(--button-warning-color,#fff)}.van-button--plain{background:var(--button-plain-background-color,#fff)}.van-button--plain.van-button--primary{color:var(--button-primary-background-color,#07c160)}.van-button--plain.van-button--info{color:var(--button-info-background-color,#1989fa)}.van-button--plain.van-button--danger{color:var(--button-danger-background-color,#ee0a24)}.van-button--plain.van-button--warning{color:var(--button-warning-background-color,#ff976a)}.van-button--large{height:var(--button-large-height,50px);width:100%}.van-button--normal{font-size:var(--button-normal-font-size,14px);padding:0 15px}.van-button--small{font-size:var(--button-small-font-size,12px);height:var(--button-small-height,30px);min-width:var(--button-small-min-width,60px);padding:0 var(--padding-xs,8px)}.van-button--mini{display:inline-block;font-size:var(--button-mini-font-size,10px);height:var(--button-mini-height,22px);min-width:var(--button-mini-min-width,50px)}.van-button--mini+.van-button--mini{margin-left:5px}.van-button--block{display:flex;width:100%}.van-button--round{border-radius:var(--button-round-border-radius,999px)}.van-button--square{border-radius:0}.van-button--disabled{opacity:var(--button-disabled-opacity,.5)}.van-button__text{display:inline}.van-button__icon+.van-button__text:not(:empty),.van-button__loading-text{margin-left:4px}.van-button__icon{line-height:inherit!important;min-width:1em;vertical-align:top}.van-button--hairline{border-width:0;padding-top:1px}.van-button--hairline:after{border-color:inherit;border-radius:calc(var(--button-border-radius, 2px)*2);border-width:1px}.van-button--hairline.van-button--round:after{border-radius:var(--button-round-border-radius,999px)}.van-button--hairline.van-button--square:after{border-radius:0}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
<wxs src="./index.wxs" module="computed" />
|
|
2
|
+
<wxs src="../wxs/utils.wxs" module="utils" />
|
|
3
|
+
<view class="van-calendar">
|
|
4
|
+
<header
|
|
5
|
+
title="{{ title }}"
|
|
6
|
+
showTitle="{{ showTitle }}"
|
|
7
|
+
subtitle="{{ subtitle }}"
|
|
8
|
+
showSubtitle="{{ showSubtitle }}"
|
|
9
|
+
firstDayOfWeek="{{ firstDayOfWeek }}"
|
|
10
|
+
bind:click-subtitle="onClickSubtitle"
|
|
11
|
+
>
|
|
12
|
+
<slot name="title" slot="title"></slot>
|
|
13
|
+
</header>
|
|
14
|
+
|
|
15
|
+
<scroll-view
|
|
16
|
+
class="van-calendar__body"
|
|
17
|
+
scroll-y
|
|
18
|
+
scroll-into-view="{{ scrollIntoView }}"
|
|
19
|
+
>
|
|
20
|
+
<month
|
|
21
|
+
wx:for="{{ computed.getMonths(minDate, maxDate) }}"
|
|
22
|
+
wx:key="index"
|
|
23
|
+
id="month{{ index }}"
|
|
24
|
+
class="month"
|
|
25
|
+
data-date="{{ item }}"
|
|
26
|
+
date="{{ item }}"
|
|
27
|
+
type="{{ type }}"
|
|
28
|
+
color="{{ color }}"
|
|
29
|
+
minDate="{{ minDate }}"
|
|
30
|
+
maxDate="{{ maxDate }}"
|
|
31
|
+
showMark="{{ showMark }}"
|
|
32
|
+
formatter="{{ formatter }}"
|
|
33
|
+
rowHeight="{{ rowHeight }}"
|
|
34
|
+
currentDate="{{ currentDate }}"
|
|
35
|
+
showSubtitle="{{ showSubtitle }}"
|
|
36
|
+
allowSameDay="{{ allowSameDay }}"
|
|
37
|
+
showMonthTitle="{{ index !== 0 || !showSubtitle }}"
|
|
38
|
+
firstDayOfWeek="{{ firstDayOfWeek }}"
|
|
39
|
+
bind:click="onClickDay"
|
|
40
|
+
/>
|
|
41
|
+
</scroll-view>
|
|
42
|
+
|
|
43
|
+
<view
|
|
44
|
+
class="{{ utils.bem('calendar__footer', { safeAreaInsetBottom }) }}"
|
|
45
|
+
>
|
|
46
|
+
<slot name="footer"></slot>
|
|
47
|
+
</view>
|
|
48
|
+
|
|
49
|
+
<view
|
|
50
|
+
class="{{ utils.bem('calendar__footer', { safeAreaInsetBottom }) }}"
|
|
51
|
+
>
|
|
52
|
+
<van-button
|
|
53
|
+
wx:if="{{ showConfirm }}"
|
|
54
|
+
round
|
|
55
|
+
block
|
|
56
|
+
type="danger"
|
|
57
|
+
color="{{ color }}"
|
|
58
|
+
custom-class="van-calendar__confirm"
|
|
59
|
+
disabled="{{ computed.getButtonDisabled(type, currentDate, minRange) }}"
|
|
60
|
+
nativeType="text"
|
|
61
|
+
bind:click="onConfirm"
|
|
62
|
+
>
|
|
63
|
+
{{
|
|
64
|
+
computed.getButtonDisabled(type, currentDate, minRange)
|
|
65
|
+
? confirmDisabledText
|
|
66
|
+
: confirmText
|
|
67
|
+
}}
|
|
68
|
+
</van-button>
|
|
69
|
+
</view>
|
|
70
|
+
</view>
|