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,138 @@
|
|
|
1
|
+
import { nextTick } from '../common/utils';
|
|
2
|
+
import { VantComponent } from '../common/component';
|
|
3
|
+
import { commonProps, inputProps, textareaProps } from './props';
|
|
4
|
+
VantComponent({
|
|
5
|
+
field: true,
|
|
6
|
+
classes: ['input-class', 'right-icon-class', 'label-class'],
|
|
7
|
+
props: Object.assign(Object.assign(Object.assign(Object.assign({}, commonProps), inputProps), textareaProps), { size: String, icon: String, label: String, error: Boolean, center: Boolean, isLink: Boolean, leftIcon: String, rightIcon: String, autosize: null, required: Boolean, iconClass: String, clickable: Boolean, inputAlign: String, customStyle: String, errorMessage: String, arrowDirection: String, showWordLimit: Boolean, errorMessageAlign: String, readonly: {
|
|
8
|
+
type: Boolean,
|
|
9
|
+
observer: 'setShowClear',
|
|
10
|
+
}, clearable: {
|
|
11
|
+
type: Boolean,
|
|
12
|
+
observer: 'setShowClear',
|
|
13
|
+
}, clearTrigger: {
|
|
14
|
+
type: String,
|
|
15
|
+
value: 'focus',
|
|
16
|
+
}, border: {
|
|
17
|
+
type: Boolean,
|
|
18
|
+
value: true,
|
|
19
|
+
}, titleWidth: {
|
|
20
|
+
type: String,
|
|
21
|
+
value: '6.2em',
|
|
22
|
+
}, clearIcon: {
|
|
23
|
+
type: String,
|
|
24
|
+
value: 'clear',
|
|
25
|
+
}, extraEventParams: {
|
|
26
|
+
type: Boolean,
|
|
27
|
+
value: false,
|
|
28
|
+
} }),
|
|
29
|
+
data: {
|
|
30
|
+
focused: false,
|
|
31
|
+
innerValue: '',
|
|
32
|
+
showClear: false,
|
|
33
|
+
},
|
|
34
|
+
watch: {
|
|
35
|
+
value(value) {
|
|
36
|
+
if (value !== this.value) {
|
|
37
|
+
this.setData({ innerValue: value });
|
|
38
|
+
this.value = value;
|
|
39
|
+
this.setShowClear();
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
clearTrigger() {
|
|
43
|
+
this.setShowClear();
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
created() {
|
|
47
|
+
this.value = this.data.value;
|
|
48
|
+
this.setData({ innerValue: this.value });
|
|
49
|
+
},
|
|
50
|
+
methods: {
|
|
51
|
+
formatValue(value) {
|
|
52
|
+
const { maxlength } = this.data;
|
|
53
|
+
if (maxlength !== -1 && value.length > maxlength) {
|
|
54
|
+
return value.slice(0, maxlength);
|
|
55
|
+
}
|
|
56
|
+
return value;
|
|
57
|
+
},
|
|
58
|
+
onInput(event) {
|
|
59
|
+
const { value = '' } = event.detail || {};
|
|
60
|
+
const formatValue = this.formatValue(value);
|
|
61
|
+
this.value = formatValue;
|
|
62
|
+
this.setShowClear();
|
|
63
|
+
return this.emitChange(Object.assign(Object.assign({}, event.detail), { value: formatValue }));
|
|
64
|
+
},
|
|
65
|
+
onFocus(event) {
|
|
66
|
+
this.focused = true;
|
|
67
|
+
this.setShowClear();
|
|
68
|
+
this.$emit('focus', event.detail);
|
|
69
|
+
},
|
|
70
|
+
onBlur(event) {
|
|
71
|
+
this.focused = false;
|
|
72
|
+
this.setShowClear();
|
|
73
|
+
this.$emit('blur', event.detail);
|
|
74
|
+
},
|
|
75
|
+
onClickIcon() {
|
|
76
|
+
this.$emit('click-icon');
|
|
77
|
+
},
|
|
78
|
+
onClickInput(event) {
|
|
79
|
+
this.$emit('click-input', event.detail);
|
|
80
|
+
},
|
|
81
|
+
onClear() {
|
|
82
|
+
this.setData({ innerValue: '' });
|
|
83
|
+
this.value = '';
|
|
84
|
+
this.setShowClear();
|
|
85
|
+
nextTick(() => {
|
|
86
|
+
this.emitChange({ value: '' });
|
|
87
|
+
this.$emit('clear', '');
|
|
88
|
+
});
|
|
89
|
+
},
|
|
90
|
+
onConfirm(event) {
|
|
91
|
+
const { value = '' } = event.detail || {};
|
|
92
|
+
this.value = value;
|
|
93
|
+
this.setShowClear();
|
|
94
|
+
this.$emit('confirm', value);
|
|
95
|
+
},
|
|
96
|
+
setValue(value) {
|
|
97
|
+
this.value = value;
|
|
98
|
+
this.setShowClear();
|
|
99
|
+
if (value === '') {
|
|
100
|
+
this.setData({ innerValue: '' });
|
|
101
|
+
}
|
|
102
|
+
this.emitChange({ value });
|
|
103
|
+
},
|
|
104
|
+
onLineChange(event) {
|
|
105
|
+
this.$emit('linechange', event.detail);
|
|
106
|
+
},
|
|
107
|
+
onKeyboardHeightChange(event) {
|
|
108
|
+
this.$emit('keyboardheightchange', event.detail);
|
|
109
|
+
},
|
|
110
|
+
onBindNicknameReview(event) {
|
|
111
|
+
this.$emit('nicknamereview', event.detail);
|
|
112
|
+
},
|
|
113
|
+
emitChange(detail) {
|
|
114
|
+
const { extraEventParams } = this.data;
|
|
115
|
+
this.setData({ value: detail.value });
|
|
116
|
+
let result;
|
|
117
|
+
const data = extraEventParams
|
|
118
|
+
? Object.assign(Object.assign({}, detail), { callback: (data) => {
|
|
119
|
+
result = data;
|
|
120
|
+
} }) : detail.value;
|
|
121
|
+
this.$emit('input', data);
|
|
122
|
+
this.$emit('change', data);
|
|
123
|
+
return result;
|
|
124
|
+
},
|
|
125
|
+
setShowClear() {
|
|
126
|
+
const { clearable, readonly, clearTrigger } = this.data;
|
|
127
|
+
const { focused, value } = this;
|
|
128
|
+
let showClear = false;
|
|
129
|
+
if (clearable && !readonly) {
|
|
130
|
+
const hasValue = !!value;
|
|
131
|
+
const trigger = clearTrigger === 'always' || (clearTrigger === 'focus' && focused);
|
|
132
|
+
showClear = hasValue && trigger;
|
|
133
|
+
}
|
|
134
|
+
this.setView({ showClear });
|
|
135
|
+
},
|
|
136
|
+
noop() { },
|
|
137
|
+
},
|
|
138
|
+
});
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
<wxs src="../wxs/utils.wxs" module="utils" />
|
|
2
|
+
<wxs src="./index.wxs" module="computed" />
|
|
3
|
+
|
|
4
|
+
<van-cell
|
|
5
|
+
size="{{ size }}"
|
|
6
|
+
icon="{{ leftIcon }}"
|
|
7
|
+
center="{{ center }}"
|
|
8
|
+
border="{{ border }}"
|
|
9
|
+
is-link="{{ isLink }}"
|
|
10
|
+
required="{{ required }}"
|
|
11
|
+
clickable="{{ clickable }}"
|
|
12
|
+
title-width="{{ titleWidth }}"
|
|
13
|
+
title-style="margin-right: 12px;"
|
|
14
|
+
custom-style="{{ customStyle }}"
|
|
15
|
+
arrow-direction="{{ arrowDirection }}"
|
|
16
|
+
custom-class="custom-class van-field"
|
|
17
|
+
>
|
|
18
|
+
<slot name="left-icon" slot="icon" />
|
|
19
|
+
<label for="{{ name }}" wx:if="{{ label }}" class="label-class {{ utils.bem('field__label', { disabled }) }}" slot="title">
|
|
20
|
+
{{ label }}
|
|
21
|
+
</label>
|
|
22
|
+
<slot wx:else name="label" slot="title" />
|
|
23
|
+
<view class="{{ utils.bem('field__body', [type]) }}">
|
|
24
|
+
<view class="{{ utils.bem('field__control', [inputAlign, 'custom']) }}" bindtap="onClickInput">
|
|
25
|
+
<slot name="input" />
|
|
26
|
+
</view>
|
|
27
|
+
<include wx:if="{{ type === 'textarea' }}" src="./textarea.wxml" />
|
|
28
|
+
<include wx:else src="./input.wxml" />
|
|
29
|
+
|
|
30
|
+
<van-icon
|
|
31
|
+
wx:if="{{ showClear }}"
|
|
32
|
+
name="{{ clearIcon }}"
|
|
33
|
+
class="van-field__clear-root van-field__icon-root"
|
|
34
|
+
catch:touchstart="onClear"
|
|
35
|
+
/>
|
|
36
|
+
<view class="van-field__icon-container" bind:tap="onClickIcon">
|
|
37
|
+
<van-icon
|
|
38
|
+
wx:if="{{ rightIcon || icon }}"
|
|
39
|
+
name="{{ rightIcon || icon }}"
|
|
40
|
+
class="van-field__icon-root {{ iconClass }}"
|
|
41
|
+
custom-class="right-icon-class"
|
|
42
|
+
/>
|
|
43
|
+
<slot name="right-icon" />
|
|
44
|
+
<slot name="icon" />
|
|
45
|
+
</view>
|
|
46
|
+
<view class="van-field__button">
|
|
47
|
+
<slot name="button" />
|
|
48
|
+
</view>
|
|
49
|
+
</view>
|
|
50
|
+
<label for="{{ name }}" wx:if="{{ showWordLimit && maxlength }}" class="van-field__word-limit">
|
|
51
|
+
<view class="{{ utils.bem('field__word-num', { full: value.length >= maxlength }) }}">{{ value.length >= maxlength ? maxlength : value.length }}</view>/{{ maxlength }}
|
|
52
|
+
</label>
|
|
53
|
+
<label for="{{ name }}" wx:if="{{ errorMessage }}" class="{{ utils.bem('field__error-message', [errorMessageAlign, { disabled, error }]) }}">
|
|
54
|
+
{{ errorMessage }}
|
|
55
|
+
</label>
|
|
56
|
+
</van-cell>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
var style = require('../wxs/style.wxs');
|
|
3
|
+
var addUnit = require('../wxs/add-unit.wxs');
|
|
4
|
+
|
|
5
|
+
function inputStyle(autosize) {
|
|
6
|
+
if (autosize && autosize.constructor === 'Object') {
|
|
7
|
+
return style({
|
|
8
|
+
'min-height': addUnit(autosize.minHeight),
|
|
9
|
+
'max-height': addUnit(autosize.maxHeight),
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
return '';
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
module.exports = {
|
|
17
|
+
inputStyle: inputStyle,
|
|
18
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import '../common/index.wxss';.van-field{--cell-icon-size:var(--field-icon-size,16px)}.van-field__label{color:var(--field-label-color,#646566)}.van-field__label--disabled{color:var(--field-disabled-text-color,#c8c9cc)}.van-field__body{align-items:center;display:flex}.van-field__body--textarea{box-sizing:border-box;line-height:1.2em;min-height:var(--cell-line-height,24px);padding:3.6px 0}.van-field__control:empty+.van-field__control{display:block}.van-field__control{background-color:initial;border:0;box-sizing:border-box;color:var(--field-input-text-color,#323233);display:none;height:var(--cell-line-height,24px);line-height:inherit;margin:0;min-height:var(--cell-line-height,24px);padding:0;position:relative;resize:none;text-align:left;width:100%}.van-field__control:empty{display:none}.van-field__control--textarea{height:var(--field-text-area-min-height,18px);min-height:var(--field-text-area-min-height,18px)}.van-field__control--error{color:var(--field-input-error-text-color,#ee0a24)}.van-field__control--disabled{background-color:initial;color:var(--field-input-disabled-text-color,#c8c9cc);opacity:1}.van-field__control--center{text-align:center}.van-field__control--right{text-align:right}.van-field__control--custom{align-items:center;display:flex;min-height:var(--cell-line-height,24px)}.van-field__placeholder{color:var(--field-placeholder-text-color,#c8c9cc);left:0;pointer-events:none;position:absolute;right:0;top:0}.van-field__placeholder--error{color:var(--field-error-message-color,#ee0a24)}.van-field__icon-root{align-items:center;display:flex;min-height:var(--cell-line-height,24px)}.van-field__clear-root,.van-field__icon-container{line-height:inherit;margin-right:calc(var(--padding-xs, 8px)*-1);padding:0 var(--padding-xs,8px);vertical-align:middle}.van-field__button,.van-field__clear-root,.van-field__icon-container{flex-shrink:0}.van-field__clear-root{color:var(--field-clear-icon-color,#c8c9cc);font-size:var(--field-clear-icon-size,16px)}.van-field__icon-container{color:var(--field-icon-container-color,#969799);font-size:var(--field-icon-size,16px)}.van-field__icon-container:empty{display:none}.van-field__button{padding-left:var(--padding-xs,8px)}.van-field__button:empty{display:none}.van-field__error-message{color:var(--field-error-message-color,#ee0a24);display:block;font-size:var(--field-error-message-text-font-size,12px);text-align:left}.van-field__error-message--center{text-align:center}.van-field__error-message--right{text-align:right}.van-field__word-limit{color:var(--field-word-limit-color,#646566);font-size:var(--field-word-limit-font-size,12px);line-height:var(--field-word-limit-line-height,16px);margin-top:var(--padding-base,4px);text-align:right}.van-field__word-num{display:inline}.van-field__word-num--full{color:var(--field-word-num-full-color,#ee0a24)}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<wxs src="../wxs/utils.wxs" module="utils" />
|
|
2
|
+
<input
|
|
3
|
+
id="{{ name }}"
|
|
4
|
+
class="{{ utils.bem('field__control', [inputAlign, { disabled, error }]) }} input-class"
|
|
5
|
+
type="{{ type }}"
|
|
6
|
+
focus="{{ focus }}"
|
|
7
|
+
cursor="{{ cursor }}"
|
|
8
|
+
value="{{ innerValue }}"
|
|
9
|
+
auto-focus="{{ autoFocus }}"
|
|
10
|
+
disabled="{{ disabled || readonly }}"
|
|
11
|
+
maxlength="{{ maxlength }}"
|
|
12
|
+
placeholder="{{ placeholder }}"
|
|
13
|
+
placeholder-style="{{ placeholderStyle }}"
|
|
14
|
+
placeholder-class="{{ utils.bem('field__placeholder', { error }) }}"
|
|
15
|
+
confirm-type="{{ confirmType }}"
|
|
16
|
+
confirm-hold="{{ confirmHold }}"
|
|
17
|
+
hold-keyboard="{{ holdKeyboard }}"
|
|
18
|
+
cursor-spacing="{{ cursorSpacing }}"
|
|
19
|
+
adjust-position="{{ adjustPosition }}"
|
|
20
|
+
selection-end="{{ selectionEnd }}"
|
|
21
|
+
selection-start="{{ selectionStart }}"
|
|
22
|
+
always-embed="{{ alwaysEmbed }}"
|
|
23
|
+
password="{{ password || type === 'password' }}"
|
|
24
|
+
bindinput="onInput"
|
|
25
|
+
bindtap="onClickInput"
|
|
26
|
+
bindblur="onBlur"
|
|
27
|
+
bindfocus="onFocus"
|
|
28
|
+
bindconfirm="onConfirm"
|
|
29
|
+
bindkeyboardheightchange="onKeyboardHeightChange"
|
|
30
|
+
bindnicknamereview="onBindNicknameReview"
|
|
31
|
+
/>
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/// <reference types="miniprogram-api-typings" />
|
|
2
|
+
export declare const commonProps: WechatMiniprogram.Component.PropertyOption;
|
|
3
|
+
export declare const inputProps: WechatMiniprogram.Component.PropertyOption;
|
|
4
|
+
export declare const textareaProps: WechatMiniprogram.Component.PropertyOption;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
export const commonProps = {
|
|
2
|
+
value: String,
|
|
3
|
+
placeholder: String,
|
|
4
|
+
placeholderStyle: String,
|
|
5
|
+
placeholderClass: String,
|
|
6
|
+
disabled: Boolean,
|
|
7
|
+
maxlength: {
|
|
8
|
+
type: Number,
|
|
9
|
+
value: -1,
|
|
10
|
+
},
|
|
11
|
+
cursorSpacing: {
|
|
12
|
+
type: Number,
|
|
13
|
+
value: 50,
|
|
14
|
+
},
|
|
15
|
+
autoFocus: Boolean,
|
|
16
|
+
focus: Boolean,
|
|
17
|
+
cursor: {
|
|
18
|
+
type: Number,
|
|
19
|
+
value: -1,
|
|
20
|
+
},
|
|
21
|
+
selectionStart: {
|
|
22
|
+
type: Number,
|
|
23
|
+
value: -1,
|
|
24
|
+
},
|
|
25
|
+
selectionEnd: {
|
|
26
|
+
type: Number,
|
|
27
|
+
value: -1,
|
|
28
|
+
},
|
|
29
|
+
adjustPosition: {
|
|
30
|
+
type: Boolean,
|
|
31
|
+
value: true,
|
|
32
|
+
},
|
|
33
|
+
holdKeyboard: Boolean,
|
|
34
|
+
};
|
|
35
|
+
export const inputProps = {
|
|
36
|
+
type: {
|
|
37
|
+
type: String,
|
|
38
|
+
value: 'text',
|
|
39
|
+
},
|
|
40
|
+
password: Boolean,
|
|
41
|
+
confirmType: String,
|
|
42
|
+
confirmHold: Boolean,
|
|
43
|
+
alwaysEmbed: Boolean,
|
|
44
|
+
};
|
|
45
|
+
export const textareaProps = {
|
|
46
|
+
autoHeight: Boolean,
|
|
47
|
+
fixed: Boolean,
|
|
48
|
+
showConfirmBar: {
|
|
49
|
+
type: Boolean,
|
|
50
|
+
value: true,
|
|
51
|
+
},
|
|
52
|
+
disableDefaultPadding: {
|
|
53
|
+
type: Boolean,
|
|
54
|
+
value: true,
|
|
55
|
+
},
|
|
56
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<wxs src="../wxs/utils.wxs" module="utils" />
|
|
2
|
+
<wxs src="./index.wxs" module="computed" />
|
|
3
|
+
<textarea
|
|
4
|
+
id="{{ name }}"
|
|
5
|
+
class="{{ utils.bem('field__control', [inputAlign, type, { disabled, error }]) }} input-class"
|
|
6
|
+
fixed="{{ fixed }}"
|
|
7
|
+
focus="{{ focus }}"
|
|
8
|
+
cursor="{{ cursor }}"
|
|
9
|
+
value="{{ innerValue }}"
|
|
10
|
+
auto-focus="{{ autoFocus }}"
|
|
11
|
+
disabled="{{ disabled || readonly }}"
|
|
12
|
+
maxlength="{{ maxlength }}"
|
|
13
|
+
placeholder="{{ placeholder }}"
|
|
14
|
+
placeholder-style="{{ placeholderStyle }}"
|
|
15
|
+
placeholder-class="{{ utils.bem('field__placeholder', { error, disabled }) }}"
|
|
16
|
+
auto-height="{{ !!autosize }}"
|
|
17
|
+
style="{{ computed.inputStyle(autosize) }}"
|
|
18
|
+
cursor-spacing="{{ cursorSpacing }}"
|
|
19
|
+
adjust-position="{{ adjustPosition }}"
|
|
20
|
+
show-confirm-bar="{{ showConfirmBar }}"
|
|
21
|
+
hold-keyboard="{{ holdKeyboard }}"
|
|
22
|
+
selection-end="{{ selectionEnd }}"
|
|
23
|
+
selection-start="{{ selectionStart }}"
|
|
24
|
+
disable-default-padding="{{ disableDefaultPadding }}"
|
|
25
|
+
bindinput="onInput"
|
|
26
|
+
bindtap="onClickInput"
|
|
27
|
+
bindblur="onBlur"
|
|
28
|
+
bindfocus="onFocus"
|
|
29
|
+
bindconfirm="onConfirm"
|
|
30
|
+
bindlinechange="onLineChange"
|
|
31
|
+
bindkeyboardheightchange="onKeyboardHeightChange"
|
|
32
|
+
/>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { VantComponent } from '../common/component';
|
|
2
|
+
import { useChildren } from '../common/relation';
|
|
3
|
+
VantComponent({
|
|
4
|
+
relation: useChildren('goods-action-button', function () {
|
|
5
|
+
this.children.forEach((item) => {
|
|
6
|
+
item.updateStyle();
|
|
7
|
+
});
|
|
8
|
+
}),
|
|
9
|
+
props: {
|
|
10
|
+
safeAreaInsetBottom: {
|
|
11
|
+
type: Boolean,
|
|
12
|
+
value: true,
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import '../common/index.wxss';.van-goods-action{align-items:center;background-color:var(--goods-action-background-color,#fff);bottom:0;box-sizing:initial;display:flex;height:var(--goods-action-height,50px);left:0;position:fixed;right:0}.van-goods-action--safe{padding-bottom:env(safe-area-inset-bottom)}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { VantComponent } from '../common/component';
|
|
2
|
+
import { useParent } from '../common/relation';
|
|
3
|
+
import { button } from '../mixins/button';
|
|
4
|
+
import { link } from '../mixins/link';
|
|
5
|
+
VantComponent({
|
|
6
|
+
mixins: [link, button],
|
|
7
|
+
relation: useParent('goods-action'),
|
|
8
|
+
props: {
|
|
9
|
+
text: String,
|
|
10
|
+
color: String,
|
|
11
|
+
size: {
|
|
12
|
+
type: String,
|
|
13
|
+
value: 'normal',
|
|
14
|
+
},
|
|
15
|
+
loading: Boolean,
|
|
16
|
+
disabled: Boolean,
|
|
17
|
+
plain: Boolean,
|
|
18
|
+
type: {
|
|
19
|
+
type: String,
|
|
20
|
+
value: 'danger',
|
|
21
|
+
},
|
|
22
|
+
customStyle: {
|
|
23
|
+
type: String,
|
|
24
|
+
value: '',
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
methods: {
|
|
28
|
+
onClick(event) {
|
|
29
|
+
this.$emit('click', event.detail);
|
|
30
|
+
this.jumpLink();
|
|
31
|
+
},
|
|
32
|
+
updateStyle() {
|
|
33
|
+
if (this.parent == null) {
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
const { index } = this;
|
|
37
|
+
const { children = [] } = this.parent;
|
|
38
|
+
this.setData({
|
|
39
|
+
isFirst: index === 0,
|
|
40
|
+
isLast: index === children.length - 1,
|
|
41
|
+
});
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
});
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
<wxs src="../wxs/utils.wxs" module="utils" />
|
|
2
|
+
<van-button
|
|
3
|
+
id="{{ id }}"
|
|
4
|
+
button-id="{{ buttonId }}"
|
|
5
|
+
lang="{{ lang }}"
|
|
6
|
+
type="{{ type }}"
|
|
7
|
+
size="{{ size }}"
|
|
8
|
+
color="{{ color }}"
|
|
9
|
+
plain="{{ plain }}"
|
|
10
|
+
loading="{{ loading }}"
|
|
11
|
+
disabled="{{ disabled }}"
|
|
12
|
+
open-type="{{ openType }}"
|
|
13
|
+
class="{{ utils.bem('goods-action-button', [type, { first: isFirst, last: isLast, plain: plain }])}}"
|
|
14
|
+
custom-class="van-goods-action-button__inner custom-class"
|
|
15
|
+
custom-style="{{customStyle}}"
|
|
16
|
+
business-id="{{ businessId }}"
|
|
17
|
+
session-from="{{ sessionFrom }}"
|
|
18
|
+
app-parameter="{{ appParameter }}"
|
|
19
|
+
send-message-img="{{ sendMessageImg }}"
|
|
20
|
+
send-message-path="{{ sendMessagePath }}"
|
|
21
|
+
show-message-card="{{ showMessageCard }}"
|
|
22
|
+
send-message-title="{{ sendMessageTitle }}"
|
|
23
|
+
bind:click="onClick"
|
|
24
|
+
binderror="onError"
|
|
25
|
+
bindcontact="onContact"
|
|
26
|
+
bindopensetting="onOpenSetting"
|
|
27
|
+
bindgetuserinfo="onGetUserInfo"
|
|
28
|
+
bindagreeprivacyauthorization="onAgreePrivacyAuthorization"
|
|
29
|
+
bindgetRealTimePhoneNumber="onGetRealTimePhoneNumber"
|
|
30
|
+
bindgetphonenumber="onGetPhoneNumber"
|
|
31
|
+
bindlaunchapp="onLaunchApp"
|
|
32
|
+
>
|
|
33
|
+
{{ text }}
|
|
34
|
+
<slot></slot>
|
|
35
|
+
</van-button>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import '../common/index.wxss';:host{flex:1}.van-goods-action-button{--button-warning-background-color:var(--goods-action-button-warning-color,linear-gradient(to right,#ffd01e,#ff8917));--button-danger-background-color:var(--goods-action-button-danger-color,linear-gradient(to right,#ff6034,#ee0a24));--button-default-height:var(--goods-action-button-height,40px);--button-line-height:var(--goods-action-button-line-height,20px);--button-plain-background-color:var(--goods-action-button-plain-color,#fff);--button-border-width:0;display:block}.van-goods-action-button--first{--button-border-radius:999px 0 0 var(--goods-action-button-border-radius,999px);margin-left:5px}.van-goods-action-button--last{--button-border-radius:0 999px var(--goods-action-button-border-radius,999px) 0;margin-right:5px}.van-goods-action-button--first.van-goods-action-button--last{--button-border-radius:var(--goods-action-button-border-radius,999px)}.van-goods-action-button--plain{--button-border-width:1px}.van-goods-action-button__inner{font-weight:var(--font-weight-bold,500)!important;width:100%}@media (max-width:321px){.van-goods-action-button{font-size:13px}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { VantComponent } from '../common/component';
|
|
2
|
+
import { button } from '../mixins/button';
|
|
3
|
+
import { link } from '../mixins/link';
|
|
4
|
+
VantComponent({
|
|
5
|
+
classes: ['icon-class', 'text-class', 'info-class'],
|
|
6
|
+
mixins: [link, button],
|
|
7
|
+
props: {
|
|
8
|
+
text: String,
|
|
9
|
+
dot: Boolean,
|
|
10
|
+
info: String,
|
|
11
|
+
icon: String,
|
|
12
|
+
size: String,
|
|
13
|
+
color: String,
|
|
14
|
+
classPrefix: {
|
|
15
|
+
type: String,
|
|
16
|
+
value: 'van-icon',
|
|
17
|
+
},
|
|
18
|
+
disabled: Boolean,
|
|
19
|
+
loading: Boolean,
|
|
20
|
+
},
|
|
21
|
+
methods: {
|
|
22
|
+
onClick(event) {
|
|
23
|
+
this.$emit('click', event.detail);
|
|
24
|
+
this.jumpLink();
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
});
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
<van-button
|
|
2
|
+
square
|
|
3
|
+
id="{{ id }}"
|
|
4
|
+
size="large"
|
|
5
|
+
lang="{{ lang }}"
|
|
6
|
+
loading="{{ loading }}"
|
|
7
|
+
disabled="{{ disabled }}"
|
|
8
|
+
open-type="{{ openType }}"
|
|
9
|
+
business-id="{{ businessId }}"
|
|
10
|
+
custom-class="van-goods-action-icon"
|
|
11
|
+
session-from="{{ sessionFrom }}"
|
|
12
|
+
app-parameter="{{ appParameter }}"
|
|
13
|
+
send-message-img="{{ sendMessageImg }}"
|
|
14
|
+
send-message-path="{{ sendMessagePath }}"
|
|
15
|
+
show-message-card="{{ showMessageCard }}"
|
|
16
|
+
send-message-title="{{ sendMessageTitle }}"
|
|
17
|
+
bind:click="onClick"
|
|
18
|
+
binderror="onError"
|
|
19
|
+
bindcontact="onContact"
|
|
20
|
+
bindopensetting="onOpenSetting"
|
|
21
|
+
bindgetuserinfo="onGetUserInfo"
|
|
22
|
+
bindgetphonenumber="onGetPhoneNumber"
|
|
23
|
+
bindlaunchapp="onLaunchApp"
|
|
24
|
+
>
|
|
25
|
+
<van-icon
|
|
26
|
+
wx:if="{{ icon }}"
|
|
27
|
+
name="{{ icon }}"
|
|
28
|
+
dot="{{ dot }}"
|
|
29
|
+
info="{{ info }}"
|
|
30
|
+
size="{{ size }}"
|
|
31
|
+
color="{{ color }}"
|
|
32
|
+
class-prefix="{{ classPrefix }}"
|
|
33
|
+
class="van-goods-action-icon__icon"
|
|
34
|
+
custom-class="icon-class"
|
|
35
|
+
info-class="info-class"
|
|
36
|
+
/>
|
|
37
|
+
<view wx:else>
|
|
38
|
+
<slot name="icon" />
|
|
39
|
+
</view>
|
|
40
|
+
<text class="text-class">{{ text }}</text>
|
|
41
|
+
</van-button>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import '../common/index.wxss';.van-goods-action-icon{border:none!important;color:var(--goods-action-icon-text-color,#646566)!important;display:flex!important;flex-direction:column;font-size:var(--goods-action-icon-font-size,10px)!important;height:var(--goods-action-icon-height,50px)!important;justify-content:center!important;line-height:1!important;min-width:var(--goods-action-icon-width,48px)}.van-goods-action-icon__icon{color:var(--goods-action-icon-color,#323233);display:flex;font-size:var(--goods-action-icon-size,18px);margin:0 auto 5px}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { VantComponent } from '../common/component';
|
|
2
|
+
import { useChildren } from '../common/relation';
|
|
3
|
+
VantComponent({
|
|
4
|
+
relation: useChildren('grid-item'),
|
|
5
|
+
props: {
|
|
6
|
+
square: {
|
|
7
|
+
type: Boolean,
|
|
8
|
+
observer: 'updateChildren',
|
|
9
|
+
},
|
|
10
|
+
gutter: {
|
|
11
|
+
type: null,
|
|
12
|
+
value: 0,
|
|
13
|
+
observer: 'updateChildren',
|
|
14
|
+
},
|
|
15
|
+
clickable: {
|
|
16
|
+
type: Boolean,
|
|
17
|
+
observer: 'updateChildren',
|
|
18
|
+
},
|
|
19
|
+
columnNum: {
|
|
20
|
+
type: Number,
|
|
21
|
+
value: 4,
|
|
22
|
+
observer: 'updateChildren',
|
|
23
|
+
},
|
|
24
|
+
center: {
|
|
25
|
+
type: Boolean,
|
|
26
|
+
value: true,
|
|
27
|
+
observer: 'updateChildren',
|
|
28
|
+
},
|
|
29
|
+
border: {
|
|
30
|
+
type: Boolean,
|
|
31
|
+
value: true,
|
|
32
|
+
observer: 'updateChildren',
|
|
33
|
+
},
|
|
34
|
+
direction: {
|
|
35
|
+
type: String,
|
|
36
|
+
observer: 'updateChildren',
|
|
37
|
+
},
|
|
38
|
+
iconSize: {
|
|
39
|
+
type: String,
|
|
40
|
+
observer: 'updateChildren',
|
|
41
|
+
},
|
|
42
|
+
reverse: {
|
|
43
|
+
type: Boolean,
|
|
44
|
+
value: false,
|
|
45
|
+
observer: 'updateChildren',
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
methods: {
|
|
49
|
+
updateChildren() {
|
|
50
|
+
this.children.forEach((child) => {
|
|
51
|
+
child.updateStyle();
|
|
52
|
+
});
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
});
|