From 209b93650ceefa4780a8c6ac253d8ead4dc0149d Mon Sep 17 00:00:00 2001 From: renjianbo <263303411@qq.com> Date: Sat, 18 Feb 2023 16:24:17 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AC=AC=E4=B8=80=E6=AC=A1=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .idea/.gitignore | 3 + .idea/coupon.iml | 9 + .idea/misc.xml | 6 + .idea/modules.xml | 8 + .idea/vcs.xml | 6 + app.js | 94 +++ app.json | 74 +++ app.wxss | 10 + component/picker/GetDate.js | 113 ++++ component/picker/picker.js | 172 +++++ component/picker/picker.json | 5 + component/picker/picker.wxml | 5 + component/picker/picker.wxss | 14 + component/picker/readme.md | 98 +++ miniprogram/@vant/weapp/LICENSE | 7 + miniprogram/@vant/weapp/README.md | 125 ++++ .../@vant/weapp/changelog.generated.md | 29 + .../@vant/weapp/dist/action-sheet/index.js | 70 +++ .../@vant/weapp/dist/action-sheet/index.json | 8 + .../@vant/weapp/dist/action-sheet/index.wxml | 69 ++ .../@vant/weapp/dist/action-sheet/index.wxss | 1 + miniprogram/@vant/weapp/dist/area/index.js | 217 +++++++ miniprogram/@vant/weapp/dist/area/index.json | 6 + miniprogram/@vant/weapp/dist/area/index.wxml | 20 + miniprogram/@vant/weapp/dist/area/index.wxs | 8 + miniprogram/@vant/weapp/dist/area/index.wxss | 1 + miniprogram/@vant/weapp/dist/button/index.js | 64 ++ .../@vant/weapp/dist/button/index.json | 7 + .../@vant/weapp/dist/button/index.wxml | 53 ++ miniprogram/@vant/weapp/dist/button/index.wxs | 39 ++ .../@vant/weapp/dist/button/index.wxss | 1 + .../@vant/weapp/dist/calendar/calendar.wxml | 68 ++ .../dist/calendar/components/header/index.js | 37 ++ .../calendar/components/header/index.json | 3 + .../calendar/components/header/index.wxml | 16 + .../calendar/components/header/index.wxss | 1 + .../dist/calendar/components/month/index.js | 154 +++++ .../dist/calendar/components/month/index.json | 3 + .../dist/calendar/components/month/index.wxml | 39 ++ .../dist/calendar/components/month/index.wxs | 71 +++ .../dist/calendar/components/month/index.wxss | 1 + .../@vant/weapp/dist/calendar/index.js | 337 ++++++++++ .../@vant/weapp/dist/calendar/index.json | 10 + .../@vant/weapp/dist/calendar/index.wxml | 25 + .../@vant/weapp/dist/calendar/index.wxs | 38 ++ .../@vant/weapp/dist/calendar/index.wxss | 1 + .../@vant/weapp/dist/calendar/utils.js | 83 +++ .../@vant/weapp/dist/calendar/utils.wxs | 25 + miniprogram/@vant/weapp/dist/card/index.js | 49 ++ miniprogram/@vant/weapp/dist/card/index.json | 6 + miniprogram/@vant/weapp/dist/card/index.wxml | 56 ++ miniprogram/@vant/weapp/dist/card/index.wxss | 1 + .../@vant/weapp/dist/cell-group/index.js | 11 + .../@vant/weapp/dist/cell-group/index.json | 3 + .../@vant/weapp/dist/cell-group/index.wxml | 11 + .../@vant/weapp/dist/cell-group/index.wxss | 1 + miniprogram/@vant/weapp/dist/cell/index.js | 38 ++ miniprogram/@vant/weapp/dist/cell/index.json | 6 + miniprogram/@vant/weapp/dist/cell/index.wxml | 47 ++ miniprogram/@vant/weapp/dist/cell/index.wxs | 17 + miniprogram/@vant/weapp/dist/cell/index.wxss | 1 + .../@vant/weapp/dist/checkbox-group/index.js | 36 ++ .../weapp/dist/checkbox-group/index.json | 3 + .../weapp/dist/checkbox-group/index.wxml | 5 + .../weapp/dist/checkbox-group/index.wxss | 1 + .../@vant/weapp/dist/checkbox/index.js | 77 +++ .../@vant/weapp/dist/checkbox/index.json | 6 + .../@vant/weapp/dist/checkbox/index.wxml | 31 + .../@vant/weapp/dist/checkbox/index.wxs | 20 + .../@vant/weapp/dist/checkbox/index.wxss | 1 + miniprogram/@vant/weapp/dist/circle/canvas.js | 43 ++ miniprogram/@vant/weapp/dist/circle/index.js | 193 ++++++ .../@vant/weapp/dist/circle/index.json | 3 + .../@vant/weapp/dist/circle/index.wxml | 9 + .../@vant/weapp/dist/circle/index.wxss | 1 + miniprogram/@vant/weapp/dist/col/index.js | 9 + miniprogram/@vant/weapp/dist/col/index.json | 3 + miniprogram/@vant/weapp/dist/col/index.wxml | 9 + miniprogram/@vant/weapp/dist/col/index.wxs | 18 + miniprogram/@vant/weapp/dist/col/index.wxss | 1 + .../@vant/weapp/dist/collapse-item/animate.js | 39 ++ .../@vant/weapp/dist/collapse-item/index.js | 59 ++ .../@vant/weapp/dist/collapse-item/index.json | 6 + .../@vant/weapp/dist/collapse-item/index.wxml | 44 ++ .../@vant/weapp/dist/collapse-item/index.wxss | 1 + .../@vant/weapp/dist/collapse/index.js | 46 ++ .../@vant/weapp/dist/collapse/index.json | 3 + .../@vant/weapp/dist/collapse/index.wxml | 3 + .../@vant/weapp/dist/collapse/index.wxss | 1 + miniprogram/@vant/weapp/dist/common/color.js | 7 + .../@vant/weapp/dist/common/component.js | 45 ++ .../@vant/weapp/dist/common/index.wxss | 1 + .../@vant/weapp/dist/common/relation.js | 56 ++ .../weapp/dist/common/style/clearfix.wxss | 1 + .../weapp/dist/common/style/ellipsis.wxss | 1 + .../weapp/dist/common/style/hairline.wxss | 1 + .../dist/common/style/mixins/clearfix.wxss | 0 .../dist/common/style/mixins/ellipsis.wxss | 0 .../dist/common/style/mixins/hairline.wxss | 0 .../@vant/weapp/dist/common/style/var.wxss | 0 miniprogram/@vant/weapp/dist/common/utils.js | 92 +++ .../@vant/weapp/dist/common/validator.js | 31 + .../@vant/weapp/dist/common/version.js | 48 ++ .../@vant/weapp/dist/config-provider/index.js | 9 + .../weapp/dist/config-provider/index.json | 3 + .../weapp/dist/config-provider/index.wxml | 5 + .../weapp/dist/config-provider/index.wxs | 29 + .../@vant/weapp/dist/count-down/index.js | 100 +++ .../@vant/weapp/dist/count-down/index.json | 3 + .../@vant/weapp/dist/count-down/index.wxml | 4 + .../@vant/weapp/dist/count-down/index.wxss | 1 + .../@vant/weapp/dist/count-down/utils.js | 57 ++ .../@vant/weapp/dist/datetime-picker/index.js | 295 +++++++++ .../weapp/dist/datetime-picker/index.json | 6 + .../weapp/dist/datetime-picker/index.wxml | 16 + .../weapp/dist/datetime-picker/index.wxss | 1 + .../@vant/weapp/dist/definitions/index.js | 1 + miniprogram/@vant/weapp/dist/dialog/dialog.js | 75 +++ miniprogram/@vant/weapp/dist/dialog/index.js | 122 ++++ .../@vant/weapp/dist/dialog/index.json | 9 + .../@vant/weapp/dist/dialog/index.wxml | 113 ++++ .../@vant/weapp/dist/dialog/index.wxss | 1 + miniprogram/@vant/weapp/dist/divider/index.js | 12 + .../@vant/weapp/dist/divider/index.json | 4 + .../@vant/weapp/dist/divider/index.wxml | 9 + .../@vant/weapp/dist/divider/index.wxs | 18 + .../@vant/weapp/dist/divider/index.wxss | 1 + .../@vant/weapp/dist/dropdown-item/index.js | 102 +++ .../@vant/weapp/dist/dropdown-item/index.json | 8 + .../@vant/weapp/dist/dropdown-item/index.wxml | 48 ++ .../@vant/weapp/dist/dropdown-item/index.wxss | 1 + .../@vant/weapp/dist/dropdown-item/shared.js | 1 + .../@vant/weapp/dist/dropdown-menu/index.js | 112 ++++ .../@vant/weapp/dist/dropdown-menu/index.json | 3 + .../@vant/weapp/dist/dropdown-menu/index.wxml | 23 + .../@vant/weapp/dist/dropdown-menu/index.wxs | 16 + .../@vant/weapp/dist/dropdown-menu/index.wxss | 1 + miniprogram/@vant/weapp/dist/empty/index.js | 10 + miniprogram/@vant/weapp/dist/empty/index.json | 4 + miniprogram/@vant/weapp/dist/empty/index.wxml | 22 + miniprogram/@vant/weapp/dist/empty/index.wxs | 15 + miniprogram/@vant/weapp/dist/empty/index.wxss | 1 + miniprogram/@vant/weapp/dist/field/index.js | 107 ++++ miniprogram/@vant/weapp/dist/field/index.json | 7 + miniprogram/@vant/weapp/dist/field/index.wxml | 56 ++ miniprogram/@vant/weapp/dist/field/index.wxs | 18 + miniprogram/@vant/weapp/dist/field/index.wxss | 1 + miniprogram/@vant/weapp/dist/field/input.wxml | 28 + miniprogram/@vant/weapp/dist/field/props.js | 64 ++ .../@vant/weapp/dist/field/textarea.wxml | 29 + .../weapp/dist/goods-action-button/index.js | 36 ++ .../weapp/dist/goods-action-button/index.json | 6 + .../weapp/dist/goods-action-button/index.wxml | 30 + .../weapp/dist/goods-action-button/index.wxss | 1 + .../weapp/dist/goods-action-icon/index.js | 21 + .../weapp/dist/goods-action-icon/index.json | 7 + .../weapp/dist/goods-action-icon/index.wxml | 35 ++ .../weapp/dist/goods-action-icon/index.wxss | 1 + .../@vant/weapp/dist/goods-action/index.js | 15 + .../@vant/weapp/dist/goods-action/index.json | 3 + .../@vant/weapp/dist/goods-action/index.wxml | 5 + .../@vant/weapp/dist/goods-action/index.wxss | 1 + .../@vant/weapp/dist/grid-item/index.js | 52 ++ .../@vant/weapp/dist/grid-item/index.json | 6 + .../@vant/weapp/dist/grid-item/index.wxml | 27 + .../@vant/weapp/dist/grid-item/index.wxs | 32 + .../@vant/weapp/dist/grid-item/index.wxss | 1 + miniprogram/@vant/weapp/dist/grid/index.js | 55 ++ miniprogram/@vant/weapp/dist/grid/index.json | 3 + miniprogram/@vant/weapp/dist/grid/index.wxml | 8 + miniprogram/@vant/weapp/dist/grid/index.wxs | 13 + miniprogram/@vant/weapp/dist/grid/index.wxss | 1 + miniprogram/@vant/weapp/dist/icon/index.js | 20 + miniprogram/@vant/weapp/dist/icon/index.json | 6 + miniprogram/@vant/weapp/dist/icon/index.wxml | 20 + miniprogram/@vant/weapp/dist/icon/index.wxs | 39 ++ miniprogram/@vant/weapp/dist/icon/index.wxss | 1 + miniprogram/@vant/weapp/dist/image/index.js | 60 ++ miniprogram/@vant/weapp/dist/image/index.json | 7 + miniprogram/@vant/weapp/dist/image/index.wxml | 34 + miniprogram/@vant/weapp/dist/image/index.wxs | 32 + miniprogram/@vant/weapp/dist/image/index.wxss | 1 + .../@vant/weapp/dist/index-anchor/index.js | 25 + .../@vant/weapp/dist/index-anchor/index.json | 3 + .../@vant/weapp/dist/index-anchor/index.wxml | 14 + .../@vant/weapp/dist/index-anchor/index.wxss | 1 + .../@vant/weapp/dist/index-bar/index.js | 243 ++++++++ .../@vant/weapp/dist/index-bar/index.json | 3 + .../@vant/weapp/dist/index-bar/index.wxml | 22 + .../@vant/weapp/dist/index-bar/index.wxss | 1 + miniprogram/@vant/weapp/dist/info/index.js | 8 + miniprogram/@vant/weapp/dist/info/index.json | 3 + miniprogram/@vant/weapp/dist/info/index.wxml | 7 + miniprogram/@vant/weapp/dist/info/index.wxss | 1 + miniprogram/@vant/weapp/dist/loading/index.js | 16 + .../@vant/weapp/dist/loading/index.json | 3 + .../@vant/weapp/dist/loading/index.wxml | 19 + .../@vant/weapp/dist/loading/index.wxs | 22 + .../@vant/weapp/dist/loading/index.wxss | 1 + miniprogram/@vant/weapp/dist/mixins/basic.js | 11 + miniprogram/@vant/weapp/dist/mixins/button.js | 41 ++ miniprogram/@vant/weapp/dist/mixins/link.js | 23 + .../@vant/weapp/dist/mixins/page-scroll.js | 36 ++ miniprogram/@vant/weapp/dist/mixins/touch.js | 37 ++ .../@vant/weapp/dist/mixins/transition.js | 115 ++++ miniprogram/@vant/weapp/dist/nav-bar/index.js | 65 ++ .../@vant/weapp/dist/nav-bar/index.json | 6 + .../@vant/weapp/dist/nav-bar/index.wxml | 42 ++ .../@vant/weapp/dist/nav-bar/index.wxs | 13 + .../@vant/weapp/dist/nav-bar/index.wxss | 1 + .../@vant/weapp/dist/notice-bar/index.js | 120 ++++ .../@vant/weapp/dist/notice-bar/index.json | 6 + .../@vant/weapp/dist/notice-bar/index.wxml | 39 ++ .../@vant/weapp/dist/notice-bar/index.wxs | 15 + .../@vant/weapp/dist/notice-bar/index.wxss | 1 + miniprogram/@vant/weapp/dist/notify/index.js | 65 ++ .../@vant/weapp/dist/notify/index.json | 6 + .../@vant/weapp/dist/notify/index.wxml | 21 + miniprogram/@vant/weapp/dist/notify/index.wxs | 22 + .../@vant/weapp/dist/notify/index.wxss | 1 + miniprogram/@vant/weapp/dist/notify/notify.js | 46 ++ miniprogram/@vant/weapp/dist/overlay/index.js | 26 + .../@vant/weapp/dist/overlay/index.json | 6 + .../@vant/weapp/dist/overlay/index.wxml | 21 + .../@vant/weapp/dist/overlay/index.wxss | 1 + miniprogram/@vant/weapp/dist/panel/index.js | 9 + miniprogram/@vant/weapp/dist/panel/index.json | 6 + miniprogram/@vant/weapp/dist/panel/index.wxml | 19 + miniprogram/@vant/weapp/dist/panel/index.wxss | 1 + .../@vant/weapp/dist/picker-column/index.js | 118 ++++ .../@vant/weapp/dist/picker-column/index.json | 3 + .../@vant/weapp/dist/picker-column/index.wxml | 23 + .../@vant/weapp/dist/picker-column/index.wxs | 36 ++ .../@vant/weapp/dist/picker-column/index.wxss | 1 + miniprogram/@vant/weapp/dist/picker/index.js | 136 ++++ .../@vant/weapp/dist/picker/index.json | 7 + .../@vant/weapp/dist/picker/index.wxml | 37 ++ miniprogram/@vant/weapp/dist/picker/index.wxs | 42 ++ .../@vant/weapp/dist/picker/index.wxss | 1 + miniprogram/@vant/weapp/dist/picker/shared.js | 21 + .../@vant/weapp/dist/picker/toolbar.wxml | 23 + miniprogram/@vant/weapp/dist/popup/index.js | 89 +++ miniprogram/@vant/weapp/dist/popup/index.json | 7 + miniprogram/@vant/weapp/dist/popup/index.wxml | 26 + miniprogram/@vant/weapp/dist/popup/index.wxs | 18 + miniprogram/@vant/weapp/dist/popup/index.wxss | 1 + .../@vant/weapp/dist/progress/index.js | 51 ++ .../@vant/weapp/dist/progress/index.json | 3 + .../@vant/weapp/dist/progress/index.wxml | 20 + .../@vant/weapp/dist/progress/index.wxs | 36 ++ .../@vant/weapp/dist/progress/index.wxss | 1 + .../@vant/weapp/dist/radio-group/index.js | 22 + .../@vant/weapp/dist/radio-group/index.json | 3 + .../@vant/weapp/dist/radio-group/index.wxml | 5 + .../@vant/weapp/dist/radio-group/index.wxss | 1 + miniprogram/@vant/weapp/dist/radio/index.js | 66 ++ miniprogram/@vant/weapp/dist/radio/index.json | 6 + miniprogram/@vant/weapp/dist/radio/index.wxml | 30 + miniprogram/@vant/weapp/dist/radio/index.wxs | 33 + miniprogram/@vant/weapp/dist/radio/index.wxss | 1 + miniprogram/@vant/weapp/dist/rate/index.js | 78 +++ miniprogram/@vant/weapp/dist/rate/index.json | 6 + miniprogram/@vant/weapp/dist/rate/index.wxml | 35 ++ miniprogram/@vant/weapp/dist/rate/index.wxss | 1 + miniprogram/@vant/weapp/dist/row/index.js | 23 + miniprogram/@vant/weapp/dist/row/index.json | 3 + miniprogram/@vant/weapp/dist/row/index.wxml | 5 + miniprogram/@vant/weapp/dist/row/index.wxs | 18 + miniprogram/@vant/weapp/dist/row/index.wxss | 1 + miniprogram/@vant/weapp/dist/search/index.js | 89 +++ .../@vant/weapp/dist/search/index.json | 6 + .../@vant/weapp/dist/search/index.wxml | 53 ++ .../@vant/weapp/dist/search/index.wxss | 1 + .../@vant/weapp/dist/share-sheet/index.js | 55 ++ .../@vant/weapp/dist/share-sheet/index.json | 7 + .../@vant/weapp/dist/share-sheet/index.wxml | 46 ++ .../@vant/weapp/dist/share-sheet/index.wxs | 12 + .../@vant/weapp/dist/share-sheet/index.wxss | 1 + .../@vant/weapp/dist/share-sheet/options.js | 14 + .../@vant/weapp/dist/share-sheet/options.json | 3 + .../@vant/weapp/dist/share-sheet/options.wxml | 20 + .../@vant/weapp/dist/share-sheet/options.wxs | 14 + .../@vant/weapp/dist/share-sheet/options.wxss | 1 + .../@vant/weapp/dist/sidebar-item/index.js | 29 + .../@vant/weapp/dist/sidebar-item/index.json | 6 + .../@vant/weapp/dist/sidebar-item/index.wxml | 18 + .../@vant/weapp/dist/sidebar-item/index.wxss | 1 + miniprogram/@vant/weapp/dist/sidebar/index.js | 34 + .../@vant/weapp/dist/sidebar/index.json | 3 + .../@vant/weapp/dist/sidebar/index.wxml | 3 + .../@vant/weapp/dist/sidebar/index.wxss | 1 + .../@vant/weapp/dist/skeleton/index.js | 46 ++ .../@vant/weapp/dist/skeleton/index.json | 4 + .../@vant/weapp/dist/skeleton/index.wxml | 29 + .../@vant/weapp/dist/skeleton/index.wxss | 1 + miniprogram/@vant/weapp/dist/slider/index.js | 191 ++++++ .../@vant/weapp/dist/slider/index.json | 3 + .../@vant/weapp/dist/slider/index.wxml | 68 ++ miniprogram/@vant/weapp/dist/slider/index.wxs | 14 + .../@vant/weapp/dist/slider/index.wxss | 1 + miniprogram/@vant/weapp/dist/stepper/index.js | 185 ++++++ .../@vant/weapp/dist/stepper/index.json | 3 + .../@vant/weapp/dist/stepper/index.wxml | 44 ++ .../@vant/weapp/dist/stepper/index.wxs | 22 + .../@vant/weapp/dist/stepper/index.wxss | 1 + miniprogram/@vant/weapp/dist/steps/index.js | 33 + miniprogram/@vant/weapp/dist/steps/index.json | 6 + miniprogram/@vant/weapp/dist/steps/index.wxml | 54 ++ miniprogram/@vant/weapp/dist/steps/index.wxss | 1 + miniprogram/@vant/weapp/dist/sticky/index.js | 118 ++++ .../@vant/weapp/dist/sticky/index.json | 3 + .../@vant/weapp/dist/sticky/index.wxml | 8 + miniprogram/@vant/weapp/dist/sticky/index.wxs | 25 + .../@vant/weapp/dist/sticky/index.wxss | 1 + .../@vant/weapp/dist/submit-bar/index.js | 56 ++ .../@vant/weapp/dist/submit-bar/index.json | 7 + .../@vant/weapp/dist/submit-bar/index.wxml | 44 ++ .../@vant/weapp/dist/submit-bar/index.wxss | 1 + .../@vant/weapp/dist/swipe-cell/index.js | 133 ++++ .../@vant/weapp/dist/swipe-cell/index.json | 3 + .../@vant/weapp/dist/swipe-cell/index.wxml | 20 + .../@vant/weapp/dist/swipe-cell/index.wxss | 1 + miniprogram/@vant/weapp/dist/switch/index.js | 36 ++ .../@vant/weapp/dist/switch/index.json | 6 + .../@vant/weapp/dist/switch/index.wxml | 16 + miniprogram/@vant/weapp/dist/switch/index.wxs | 26 + .../@vant/weapp/dist/switch/index.wxss | 1 + miniprogram/@vant/weapp/dist/tab/index.js | 56 ++ miniprogram/@vant/weapp/dist/tab/index.json | 3 + miniprogram/@vant/weapp/dist/tab/index.wxml | 8 + miniprogram/@vant/weapp/dist/tab/index.wxss | 1 + .../@vant/weapp/dist/tabbar-item/index.js | 56 ++ .../@vant/weapp/dist/tabbar-item/index.json | 7 + .../@vant/weapp/dist/tabbar-item/index.wxml | 28 + .../@vant/weapp/dist/tabbar-item/index.wxss | 1 + miniprogram/@vant/weapp/dist/tabbar/index.js | 65 ++ .../@vant/weapp/dist/tabbar/index.json | 3 + .../@vant/weapp/dist/tabbar/index.wxml | 10 + .../@vant/weapp/dist/tabbar/index.wxss | 1 + miniprogram/@vant/weapp/dist/tabs/index.js | 269 ++++++++ miniprogram/@vant/weapp/dist/tabs/index.json | 7 + miniprogram/@vant/weapp/dist/tabs/index.wxml | 63 ++ miniprogram/@vant/weapp/dist/tabs/index.wxs | 82 +++ miniprogram/@vant/weapp/dist/tabs/index.wxss | 1 + miniprogram/@vant/weapp/dist/tag/index.js | 21 + miniprogram/@vant/weapp/dist/tag/index.json | 6 + miniprogram/@vant/weapp/dist/tag/index.wxml | 15 + miniprogram/@vant/weapp/dist/tag/index.wxs | 13 + miniprogram/@vant/weapp/dist/tag/index.wxss | 1 + miniprogram/@vant/weapp/dist/toast/index.js | 29 + miniprogram/@vant/weapp/dist/toast/index.json | 9 + miniprogram/@vant/weapp/dist/toast/index.wxml | 36 ++ miniprogram/@vant/weapp/dist/toast/index.wxss | 1 + miniprogram/@vant/weapp/dist/toast/toast.js | 66 ++ .../@vant/weapp/dist/transition/index.js | 13 + .../@vant/weapp/dist/transition/index.json | 3 + .../@vant/weapp/dist/transition/index.wxml | 10 + .../@vant/weapp/dist/transition/index.wxs | 17 + .../@vant/weapp/dist/transition/index.wxss | 1 + .../@vant/weapp/dist/tree-select/index.js | 68 ++ .../@vant/weapp/dist/tree-select/index.json | 8 + .../@vant/weapp/dist/tree-select/index.wxml | 41 ++ .../@vant/weapp/dist/tree-select/index.wxs | 12 + .../@vant/weapp/dist/tree-select/index.wxss | 1 + .../@vant/weapp/dist/uploader/index.js | 155 +++++ .../@vant/weapp/dist/uploader/index.json | 7 + .../@vant/weapp/dist/uploader/index.wxml | 83 +++ .../@vant/weapp/dist/uploader/index.wxs | 14 + .../@vant/weapp/dist/uploader/index.wxss | 1 + .../@vant/weapp/dist/uploader/shared.js | 30 + .../@vant/weapp/dist/uploader/utils.js | 84 +++ miniprogram/@vant/weapp/dist/wxs/add-unit.wxs | 12 + miniprogram/@vant/weapp/dist/wxs/array.wxs | 5 + miniprogram/@vant/weapp/dist/wxs/bem.wxs | 39 ++ miniprogram/@vant/weapp/dist/wxs/memoize.wxs | 55 ++ miniprogram/@vant/weapp/dist/wxs/object.wxs | 13 + miniprogram/@vant/weapp/dist/wxs/style.wxs | 42 ++ miniprogram/@vant/weapp/dist/wxs/utils.wxs | 10 + .../@vant/weapp/lib/action-sheet/index.js | 73 +++ .../@vant/weapp/lib/action-sheet/index.json | 8 + .../@vant/weapp/lib/action-sheet/index.wxml | 69 ++ .../@vant/weapp/lib/action-sheet/index.wxss | 1 + miniprogram/@vant/weapp/lib/area/index.js | 232 +++++++ miniprogram/@vant/weapp/lib/area/index.json | 6 + miniprogram/@vant/weapp/lib/area/index.wxml | 20 + miniprogram/@vant/weapp/lib/area/index.wxs | 8 + miniprogram/@vant/weapp/lib/area/index.wxss | 1 + miniprogram/@vant/weapp/lib/button/index.js | 67 ++ miniprogram/@vant/weapp/lib/button/index.json | 7 + miniprogram/@vant/weapp/lib/button/index.wxml | 53 ++ miniprogram/@vant/weapp/lib/button/index.wxs | 39 ++ miniprogram/@vant/weapp/lib/button/index.wxss | 1 + .../@vant/weapp/lib/calendar/calendar.wxml | 68 ++ .../lib/calendar/components/header/index.js | 45 ++ .../lib/calendar/components/header/index.json | 3 + .../lib/calendar/components/header/index.wxml | 16 + .../lib/calendar/components/header/index.wxss | 1 + .../lib/calendar/components/month/index.js | 158 +++++ .../lib/calendar/components/month/index.json | 3 + .../lib/calendar/components/month/index.wxml | 39 ++ .../lib/calendar/components/month/index.wxs | 71 +++ .../lib/calendar/components/month/index.wxss | 1 + miniprogram/@vant/weapp/lib/calendar/index.js | 360 +++++++++++ .../@vant/weapp/lib/calendar/index.json | 10 + .../@vant/weapp/lib/calendar/index.wxml | 25 + .../@vant/weapp/lib/calendar/index.wxs | 38 ++ .../@vant/weapp/lib/calendar/index.wxss | 1 + miniprogram/@vant/weapp/lib/calendar/utils.js | 97 +++ .../@vant/weapp/lib/calendar/utils.wxs | 25 + miniprogram/@vant/weapp/lib/card/index.js | 51 ++ miniprogram/@vant/weapp/lib/card/index.json | 6 + miniprogram/@vant/weapp/lib/card/index.wxml | 56 ++ miniprogram/@vant/weapp/lib/card/index.wxss | 1 + .../@vant/weapp/lib/cell-group/index.js | 13 + .../@vant/weapp/lib/cell-group/index.json | 3 + .../@vant/weapp/lib/cell-group/index.wxml | 11 + .../@vant/weapp/lib/cell-group/index.wxss | 1 + miniprogram/@vant/weapp/lib/cell/index.js | 40 ++ miniprogram/@vant/weapp/lib/cell/index.json | 6 + miniprogram/@vant/weapp/lib/cell/index.wxml | 47 ++ miniprogram/@vant/weapp/lib/cell/index.wxs | 17 + miniprogram/@vant/weapp/lib/cell/index.wxss | 1 + .../@vant/weapp/lib/checkbox-group/index.js | 39 ++ .../@vant/weapp/lib/checkbox-group/index.json | 3 + .../@vant/weapp/lib/checkbox-group/index.wxml | 5 + .../@vant/weapp/lib/checkbox-group/index.wxss | 1 + miniprogram/@vant/weapp/lib/checkbox/index.js | 79 +++ .../@vant/weapp/lib/checkbox/index.json | 6 + .../@vant/weapp/lib/checkbox/index.wxml | 31 + .../@vant/weapp/lib/checkbox/index.wxs | 20 + .../@vant/weapp/lib/checkbox/index.wxss | 1 + miniprogram/@vant/weapp/lib/circle/canvas.js | 47 ++ miniprogram/@vant/weapp/lib/circle/index.js | 203 ++++++ miniprogram/@vant/weapp/lib/circle/index.json | 3 + miniprogram/@vant/weapp/lib/circle/index.wxml | 9 + miniprogram/@vant/weapp/lib/circle/index.wxss | 1 + miniprogram/@vant/weapp/lib/col/index.js | 11 + miniprogram/@vant/weapp/lib/col/index.json | 3 + miniprogram/@vant/weapp/lib/col/index.wxml | 9 + miniprogram/@vant/weapp/lib/col/index.wxs | 18 + miniprogram/@vant/weapp/lib/col/index.wxss | 1 + .../@vant/weapp/lib/collapse-item/animate.js | 43 ++ .../@vant/weapp/lib/collapse-item/index.js | 61 ++ .../@vant/weapp/lib/collapse-item/index.json | 6 + .../@vant/weapp/lib/collapse-item/index.wxml | 44 ++ .../@vant/weapp/lib/collapse-item/index.wxss | 1 + miniprogram/@vant/weapp/lib/collapse/index.js | 48 ++ .../@vant/weapp/lib/collapse/index.json | 3 + .../@vant/weapp/lib/collapse/index.wxml | 3 + .../@vant/weapp/lib/collapse/index.wxss | 1 + miniprogram/@vant/weapp/lib/common/color.js | 10 + .../@vant/weapp/lib/common/component.js | 48 ++ miniprogram/@vant/weapp/lib/common/index.wxss | 1 + .../@vant/weapp/lib/common/relation.js | 65 ++ .../weapp/lib/common/style/clearfix.wxss | 1 + .../weapp/lib/common/style/ellipsis.wxss | 1 + .../weapp/lib/common/style/hairline.wxss | 1 + .../lib/common/style/mixins/clearfix.wxss | 0 .../lib/common/style/mixins/ellipsis.wxss | 0 .../lib/common/style/mixins/hairline.wxss | 0 .../@vant/weapp/lib/common/style/var.wxss | 0 miniprogram/@vant/weapp/lib/common/utils.js | 113 ++++ .../@vant/weapp/lib/common/validator.js | 43 ++ miniprogram/@vant/weapp/lib/common/version.js | 58 ++ .../@vant/weapp/lib/config-provider/index.js | 11 + .../weapp/lib/config-provider/index.json | 3 + .../weapp/lib/config-provider/index.wxml | 5 + .../@vant/weapp/lib/config-provider/index.wxs | 29 + .../@vant/weapp/lib/count-down/index.js | 104 ++++ .../@vant/weapp/lib/count-down/index.json | 3 + .../@vant/weapp/lib/count-down/index.wxml | 4 + .../@vant/weapp/lib/count-down/index.wxss | 1 + .../@vant/weapp/lib/count-down/utils.js | 64 ++ .../@vant/weapp/lib/datetime-picker/index.js | 329 ++++++++++ .../weapp/lib/datetime-picker/index.json | 6 + .../weapp/lib/datetime-picker/index.wxml | 16 + .../weapp/lib/datetime-picker/index.wxss | 1 + .../@vant/weapp/lib/definitions/index.js | 2 + miniprogram/@vant/weapp/lib/dialog/dialog.js | 90 +++ miniprogram/@vant/weapp/lib/dialog/index.js | 127 ++++ miniprogram/@vant/weapp/lib/dialog/index.json | 9 + miniprogram/@vant/weapp/lib/dialog/index.wxml | 113 ++++ miniprogram/@vant/weapp/lib/dialog/index.wxss | 1 + miniprogram/@vant/weapp/lib/divider/index.js | 14 + .../@vant/weapp/lib/divider/index.json | 4 + .../@vant/weapp/lib/divider/index.wxml | 9 + miniprogram/@vant/weapp/lib/divider/index.wxs | 18 + .../@vant/weapp/lib/divider/index.wxss | 1 + .../@vant/weapp/lib/dropdown-item/index.js | 107 ++++ .../@vant/weapp/lib/dropdown-item/index.json | 8 + .../@vant/weapp/lib/dropdown-item/index.wxml | 48 ++ .../@vant/weapp/lib/dropdown-item/index.wxss | 1 + .../@vant/weapp/lib/dropdown-item/shared.js | 2 + .../@vant/weapp/lib/dropdown-menu/index.js | 117 ++++ .../@vant/weapp/lib/dropdown-menu/index.json | 3 + .../@vant/weapp/lib/dropdown-menu/index.wxml | 23 + .../@vant/weapp/lib/dropdown-menu/index.wxs | 16 + .../@vant/weapp/lib/dropdown-menu/index.wxss | 1 + miniprogram/@vant/weapp/lib/empty/index.js | 12 + miniprogram/@vant/weapp/lib/empty/index.json | 4 + miniprogram/@vant/weapp/lib/empty/index.wxml | 22 + miniprogram/@vant/weapp/lib/empty/index.wxs | 15 + miniprogram/@vant/weapp/lib/empty/index.wxss | 1 + miniprogram/@vant/weapp/lib/field/index.js | 122 ++++ miniprogram/@vant/weapp/lib/field/index.json | 7 + miniprogram/@vant/weapp/lib/field/index.wxml | 56 ++ miniprogram/@vant/weapp/lib/field/index.wxs | 18 + miniprogram/@vant/weapp/lib/field/index.wxss | 1 + miniprogram/@vant/weapp/lib/field/input.wxml | 28 + miniprogram/@vant/weapp/lib/field/props.js | 67 ++ .../@vant/weapp/lib/field/textarea.wxml | 29 + .../weapp/lib/goods-action-button/index.js | 38 ++ .../weapp/lib/goods-action-button/index.json | 6 + .../weapp/lib/goods-action-button/index.wxml | 30 + .../weapp/lib/goods-action-button/index.wxss | 1 + .../weapp/lib/goods-action-icon/index.js | 23 + .../weapp/lib/goods-action-icon/index.json | 7 + .../weapp/lib/goods-action-icon/index.wxml | 35 ++ .../weapp/lib/goods-action-icon/index.wxss | 1 + .../@vant/weapp/lib/goods-action/index.js | 17 + .../@vant/weapp/lib/goods-action/index.json | 3 + .../@vant/weapp/lib/goods-action/index.wxml | 5 + .../@vant/weapp/lib/goods-action/index.wxss | 1 + .../@vant/weapp/lib/grid-item/index.js | 54 ++ .../@vant/weapp/lib/grid-item/index.json | 6 + .../@vant/weapp/lib/grid-item/index.wxml | 27 + .../@vant/weapp/lib/grid-item/index.wxs | 32 + .../@vant/weapp/lib/grid-item/index.wxss | 1 + miniprogram/@vant/weapp/lib/grid/index.js | 57 ++ miniprogram/@vant/weapp/lib/grid/index.json | 3 + miniprogram/@vant/weapp/lib/grid/index.wxml | 8 + miniprogram/@vant/weapp/lib/grid/index.wxs | 13 + miniprogram/@vant/weapp/lib/grid/index.wxss | 1 + miniprogram/@vant/weapp/lib/icon/index.js | 22 + miniprogram/@vant/weapp/lib/icon/index.json | 6 + miniprogram/@vant/weapp/lib/icon/index.wxml | 20 + miniprogram/@vant/weapp/lib/icon/index.wxs | 39 ++ miniprogram/@vant/weapp/lib/icon/index.wxss | 1 + miniprogram/@vant/weapp/lib/image/index.js | 62 ++ miniprogram/@vant/weapp/lib/image/index.json | 7 + miniprogram/@vant/weapp/lib/image/index.wxml | 34 + miniprogram/@vant/weapp/lib/image/index.wxs | 32 + miniprogram/@vant/weapp/lib/image/index.wxss | 1 + .../@vant/weapp/lib/index-anchor/index.js | 28 + .../@vant/weapp/lib/index-anchor/index.json | 3 + .../@vant/weapp/lib/index-anchor/index.wxml | 14 + .../@vant/weapp/lib/index-anchor/index.wxss | 1 + .../@vant/weapp/lib/index-bar/index.js | 240 +++++++ .../@vant/weapp/lib/index-bar/index.json | 3 + .../@vant/weapp/lib/index-bar/index.wxml | 22 + .../@vant/weapp/lib/index-bar/index.wxss | 1 + miniprogram/@vant/weapp/lib/info/index.js | 10 + miniprogram/@vant/weapp/lib/info/index.json | 3 + miniprogram/@vant/weapp/lib/info/index.wxml | 7 + miniprogram/@vant/weapp/lib/info/index.wxss | 1 + miniprogram/@vant/weapp/lib/loading/index.js | 18 + .../@vant/weapp/lib/loading/index.json | 3 + .../@vant/weapp/lib/loading/index.wxml | 19 + miniprogram/@vant/weapp/lib/loading/index.wxs | 22 + .../@vant/weapp/lib/loading/index.wxss | 1 + miniprogram/@vant/weapp/lib/mixins/basic.js | 14 + miniprogram/@vant/weapp/lib/mixins/button.js | 44 ++ miniprogram/@vant/weapp/lib/mixins/link.js | 27 + .../@vant/weapp/lib/mixins/page-scroll.js | 42 ++ miniprogram/@vant/weapp/lib/mixins/touch.js | 40 ++ .../@vant/weapp/lib/mixins/transition.js | 121 ++++ miniprogram/@vant/weapp/lib/nav-bar/index.js | 68 ++ .../@vant/weapp/lib/nav-bar/index.json | 6 + .../@vant/weapp/lib/nav-bar/index.wxml | 42 ++ miniprogram/@vant/weapp/lib/nav-bar/index.wxs | 13 + .../@vant/weapp/lib/nav-bar/index.wxss | 1 + .../@vant/weapp/lib/notice-bar/index.js | 124 ++++ .../@vant/weapp/lib/notice-bar/index.json | 6 + .../@vant/weapp/lib/notice-bar/index.wxml | 39 ++ .../@vant/weapp/lib/notice-bar/index.wxs | 15 + .../@vant/weapp/lib/notice-bar/index.wxss | 1 + miniprogram/@vant/weapp/lib/notify/index.js | 68 ++ miniprogram/@vant/weapp/lib/notify/index.json | 6 + miniprogram/@vant/weapp/lib/notify/index.wxml | 21 + miniprogram/@vant/weapp/lib/notify/index.wxs | 22 + miniprogram/@vant/weapp/lib/notify/index.wxss | 1 + miniprogram/@vant/weapp/lib/notify/notify.js | 60 ++ miniprogram/@vant/weapp/lib/overlay/index.js | 28 + .../@vant/weapp/lib/overlay/index.json | 6 + .../@vant/weapp/lib/overlay/index.wxml | 21 + .../@vant/weapp/lib/overlay/index.wxss | 1 + miniprogram/@vant/weapp/lib/panel/index.js | 11 + miniprogram/@vant/weapp/lib/panel/index.json | 6 + miniprogram/@vant/weapp/lib/panel/index.wxml | 19 + miniprogram/@vant/weapp/lib/panel/index.wxss | 1 + .../@vant/weapp/lib/picker-column/index.js | 122 ++++ .../@vant/weapp/lib/picker-column/index.json | 3 + .../@vant/weapp/lib/picker-column/index.wxml | 23 + .../@vant/weapp/lib/picker-column/index.wxs | 36 ++ .../@vant/weapp/lib/picker-column/index.wxss | 1 + miniprogram/@vant/weapp/lib/picker/index.js | 161 +++++ miniprogram/@vant/weapp/lib/picker/index.json | 7 + miniprogram/@vant/weapp/lib/picker/index.wxml | 37 ++ miniprogram/@vant/weapp/lib/picker/index.wxs | 42 ++ miniprogram/@vant/weapp/lib/picker/index.wxss | 1 + miniprogram/@vant/weapp/lib/picker/shared.js | 24 + .../@vant/weapp/lib/picker/toolbar.wxml | 23 + miniprogram/@vant/weapp/lib/popup/index.js | 91 +++ miniprogram/@vant/weapp/lib/popup/index.json | 7 + miniprogram/@vant/weapp/lib/popup/index.wxml | 26 + miniprogram/@vant/weapp/lib/popup/index.wxs | 18 + miniprogram/@vant/weapp/lib/popup/index.wxss | 1 + miniprogram/@vant/weapp/lib/progress/index.js | 55 ++ .../@vant/weapp/lib/progress/index.json | 3 + .../@vant/weapp/lib/progress/index.wxml | 20 + .../@vant/weapp/lib/progress/index.wxs | 36 ++ .../@vant/weapp/lib/progress/index.wxss | 1 + .../@vant/weapp/lib/radio-group/index.js | 24 + .../@vant/weapp/lib/radio-group/index.json | 3 + .../@vant/weapp/lib/radio-group/index.wxml | 5 + .../@vant/weapp/lib/radio-group/index.wxss | 1 + miniprogram/@vant/weapp/lib/radio/index.js | 68 ++ miniprogram/@vant/weapp/lib/radio/index.json | 6 + miniprogram/@vant/weapp/lib/radio/index.wxml | 30 + miniprogram/@vant/weapp/lib/radio/index.wxs | 33 + miniprogram/@vant/weapp/lib/radio/index.wxss | 1 + miniprogram/@vant/weapp/lib/rate/index.js | 93 +++ miniprogram/@vant/weapp/lib/rate/index.json | 6 + miniprogram/@vant/weapp/lib/rate/index.wxml | 35 ++ miniprogram/@vant/weapp/lib/rate/index.wxss | 1 + miniprogram/@vant/weapp/lib/row/index.js | 26 + miniprogram/@vant/weapp/lib/row/index.json | 3 + miniprogram/@vant/weapp/lib/row/index.wxml | 5 + miniprogram/@vant/weapp/lib/row/index.wxs | 18 + miniprogram/@vant/weapp/lib/row/index.wxss | 1 + miniprogram/@vant/weapp/lib/search/index.js | 92 +++ miniprogram/@vant/weapp/lib/search/index.json | 6 + miniprogram/@vant/weapp/lib/search/index.wxml | 53 ++ miniprogram/@vant/weapp/lib/search/index.wxss | 1 + .../@vant/weapp/lib/share-sheet/index.js | 57 ++ .../@vant/weapp/lib/share-sheet/index.json | 7 + .../@vant/weapp/lib/share-sheet/index.wxml | 46 ++ .../@vant/weapp/lib/share-sheet/index.wxs | 12 + .../@vant/weapp/lib/share-sheet/index.wxss | 1 + .../@vant/weapp/lib/share-sheet/options.js | 27 + .../@vant/weapp/lib/share-sheet/options.json | 3 + .../@vant/weapp/lib/share-sheet/options.wxml | 20 + .../@vant/weapp/lib/share-sheet/options.wxs | 14 + .../@vant/weapp/lib/share-sheet/options.wxss | 1 + .../@vant/weapp/lib/sidebar-item/index.js | 32 + .../@vant/weapp/lib/sidebar-item/index.json | 6 + .../@vant/weapp/lib/sidebar-item/index.wxml | 18 + .../@vant/weapp/lib/sidebar-item/index.wxss | 1 + miniprogram/@vant/weapp/lib/sidebar/index.js | 36 ++ .../@vant/weapp/lib/sidebar/index.json | 3 + .../@vant/weapp/lib/sidebar/index.wxml | 3 + .../@vant/weapp/lib/sidebar/index.wxss | 1 + miniprogram/@vant/weapp/lib/skeleton/index.js | 48 ++ .../@vant/weapp/lib/skeleton/index.json | 4 + .../@vant/weapp/lib/skeleton/index.wxml | 29 + .../@vant/weapp/lib/skeleton/index.wxss | 1 + miniprogram/@vant/weapp/lib/slider/index.js | 189 ++++++ miniprogram/@vant/weapp/lib/slider/index.json | 3 + miniprogram/@vant/weapp/lib/slider/index.wxml | 68 ++ miniprogram/@vant/weapp/lib/slider/index.wxs | 14 + miniprogram/@vant/weapp/lib/slider/index.wxss | 1 + miniprogram/@vant/weapp/lib/stepper/index.js | 200 ++++++ .../@vant/weapp/lib/stepper/index.json | 3 + .../@vant/weapp/lib/stepper/index.wxml | 44 ++ miniprogram/@vant/weapp/lib/stepper/index.wxs | 22 + .../@vant/weapp/lib/stepper/index.wxss | 1 + miniprogram/@vant/weapp/lib/steps/index.js | 35 ++ miniprogram/@vant/weapp/lib/steps/index.json | 6 + miniprogram/@vant/weapp/lib/steps/index.wxml | 54 ++ miniprogram/@vant/weapp/lib/steps/index.wxss | 1 + miniprogram/@vant/weapp/lib/sticky/index.js | 124 ++++ miniprogram/@vant/weapp/lib/sticky/index.json | 3 + miniprogram/@vant/weapp/lib/sticky/index.wxml | 8 + miniprogram/@vant/weapp/lib/sticky/index.wxs | 25 + miniprogram/@vant/weapp/lib/sticky/index.wxss | 1 + .../@vant/weapp/lib/submit-bar/index.js | 58 ++ .../@vant/weapp/lib/submit-bar/index.json | 7 + .../@vant/weapp/lib/submit-bar/index.wxml | 44 ++ .../@vant/weapp/lib/submit-bar/index.wxss | 1 + .../@vant/weapp/lib/swipe-cell/index.js | 135 ++++ .../@vant/weapp/lib/swipe-cell/index.json | 3 + .../@vant/weapp/lib/swipe-cell/index.wxml | 20 + .../@vant/weapp/lib/swipe-cell/index.wxss | 1 + miniprogram/@vant/weapp/lib/switch/index.js | 38 ++ miniprogram/@vant/weapp/lib/switch/index.json | 6 + miniprogram/@vant/weapp/lib/switch/index.wxml | 16 + miniprogram/@vant/weapp/lib/switch/index.wxs | 26 + miniprogram/@vant/weapp/lib/switch/index.wxss | 1 + miniprogram/@vant/weapp/lib/tab/index.js | 58 ++ miniprogram/@vant/weapp/lib/tab/index.json | 3 + miniprogram/@vant/weapp/lib/tab/index.wxml | 8 + miniprogram/@vant/weapp/lib/tab/index.wxss | 1 + .../@vant/weapp/lib/tabbar-item/index.js | 58 ++ .../@vant/weapp/lib/tabbar-item/index.json | 7 + .../@vant/weapp/lib/tabbar-item/index.wxml | 28 + .../@vant/weapp/lib/tabbar-item/index.wxss | 1 + miniprogram/@vant/weapp/lib/tabbar/index.js | 68 ++ miniprogram/@vant/weapp/lib/tabbar/index.json | 3 + miniprogram/@vant/weapp/lib/tabbar/index.wxml | 10 + miniprogram/@vant/weapp/lib/tabbar/index.wxss | 1 + miniprogram/@vant/weapp/lib/tabs/index.js | 281 +++++++++ miniprogram/@vant/weapp/lib/tabs/index.json | 7 + miniprogram/@vant/weapp/lib/tabs/index.wxml | 63 ++ miniprogram/@vant/weapp/lib/tabs/index.wxs | 82 +++ miniprogram/@vant/weapp/lib/tabs/index.wxss | 1 + miniprogram/@vant/weapp/lib/tag/index.js | 23 + miniprogram/@vant/weapp/lib/tag/index.json | 6 + miniprogram/@vant/weapp/lib/tag/index.wxml | 15 + miniprogram/@vant/weapp/lib/tag/index.wxs | 13 + miniprogram/@vant/weapp/lib/tag/index.wxss | 1 + miniprogram/@vant/weapp/lib/toast/index.js | 31 + miniprogram/@vant/weapp/lib/toast/index.json | 9 + miniprogram/@vant/weapp/lib/toast/index.wxml | 36 ++ miniprogram/@vant/weapp/lib/toast/index.wxss | 1 + miniprogram/@vant/weapp/lib/toast/toast.js | 81 +++ .../@vant/weapp/lib/transition/index.js | 15 + .../@vant/weapp/lib/transition/index.json | 3 + .../@vant/weapp/lib/transition/index.wxml | 10 + .../@vant/weapp/lib/transition/index.wxs | 17 + .../@vant/weapp/lib/transition/index.wxss | 1 + .../@vant/weapp/lib/tree-select/index.js | 70 +++ .../@vant/weapp/lib/tree-select/index.json | 8 + .../@vant/weapp/lib/tree-select/index.wxml | 41 ++ .../@vant/weapp/lib/tree-select/index.wxs | 12 + .../@vant/weapp/lib/tree-select/index.wxss | 1 + miniprogram/@vant/weapp/lib/uploader/index.js | 170 +++++ .../@vant/weapp/lib/uploader/index.json | 7 + .../@vant/weapp/lib/uploader/index.wxml | 83 +++ .../@vant/weapp/lib/uploader/index.wxs | 14 + .../@vant/weapp/lib/uploader/index.wxss | 1 + .../@vant/weapp/lib/uploader/shared.js | 33 + miniprogram/@vant/weapp/lib/uploader/utils.js | 102 +++ miniprogram/@vant/weapp/lib/wxs/add-unit.wxs | 12 + miniprogram/@vant/weapp/lib/wxs/array.wxs | 5 + miniprogram/@vant/weapp/lib/wxs/bem.wxs | 39 ++ miniprogram/@vant/weapp/lib/wxs/memoize.wxs | 55 ++ miniprogram/@vant/weapp/lib/wxs/object.wxs | 13 + miniprogram/@vant/weapp/lib/wxs/style.wxs | 42 ++ miniprogram/@vant/weapp/lib/wxs/utils.wxs | 10 + miniprogram/@vant/weapp/package.json | 102 +++ .../@vant/weapp/action-sheet/index.js | 73 +++ .../@vant/weapp/action-sheet/index.json | 8 + .../@vant/weapp/action-sheet/index.wxml | 73 +++ .../@vant/weapp/action-sheet/index.wxss | 1 + .../miniprogram_npm/@vant/weapp/area/index.js | 232 +++++++ .../@vant/weapp/area/index.json | 6 + .../@vant/weapp/area/index.wxml | 20 + .../@vant/weapp/area/index.wxs | 8 + .../@vant/weapp/area/index.wxss | 1 + .../@vant/weapp/button/index.js | 67 ++ .../@vant/weapp/button/index.json | 7 + .../@vant/weapp/button/index.wxml | 53 ++ .../@vant/weapp/button/index.wxs | 39 ++ .../@vant/weapp/button/index.wxss | 1 + .../@vant/weapp/calendar/calendar.wxml | 68 ++ .../weapp/calendar/components/header/index.js | 45 ++ .../calendar/components/header/index.json | 3 + .../calendar/components/header/index.wxml | 16 + .../calendar/components/header/index.wxss | 1 + .../weapp/calendar/components/month/index.js | 158 +++++ .../calendar/components/month/index.json | 3 + .../calendar/components/month/index.wxml | 39 ++ .../weapp/calendar/components/month/index.wxs | 71 +++ .../calendar/components/month/index.wxss | 1 + .../@vant/weapp/calendar/index.js | 360 +++++++++++ .../@vant/weapp/calendar/index.json | 10 + .../@vant/weapp/calendar/index.wxml | 25 + .../@vant/weapp/calendar/index.wxs | 38 ++ .../@vant/weapp/calendar/index.wxss | 1 + .../@vant/weapp/calendar/utils.js | 97 +++ .../@vant/weapp/calendar/utils.wxs | 25 + .../miniprogram_npm/@vant/weapp/card/index.js | 51 ++ .../@vant/weapp/card/index.json | 6 + .../@vant/weapp/card/index.wxml | 56 ++ .../@vant/weapp/card/index.wxss | 1 + .../@vant/weapp/cell-group/index.js | 13 + .../@vant/weapp/cell-group/index.json | 3 + .../@vant/weapp/cell-group/index.wxml | 11 + .../@vant/weapp/cell-group/index.wxss | 1 + .../miniprogram_npm/@vant/weapp/cell/index.js | 40 ++ .../@vant/weapp/cell/index.json | 6 + .../@vant/weapp/cell/index.wxml | 47 ++ .../@vant/weapp/cell/index.wxs | 17 + .../@vant/weapp/cell/index.wxss | 1 + .../@vant/weapp/checkbox-group/index.js | 39 ++ .../@vant/weapp/checkbox-group/index.json | 3 + .../@vant/weapp/checkbox-group/index.wxml | 5 + .../@vant/weapp/checkbox-group/index.wxss | 1 + .../@vant/weapp/checkbox/index.js | 79 +++ .../@vant/weapp/checkbox/index.json | 6 + .../@vant/weapp/checkbox/index.wxml | 31 + .../@vant/weapp/checkbox/index.wxs | 20 + .../@vant/weapp/checkbox/index.wxss | 1 + .../@vant/weapp/circle/canvas.js | 47 ++ .../@vant/weapp/circle/index.js | 203 ++++++ .../@vant/weapp/circle/index.json | 3 + .../@vant/weapp/circle/index.wxml | 9 + .../@vant/weapp/circle/index.wxss | 1 + .../miniprogram_npm/@vant/weapp/col/index.js | 11 + .../@vant/weapp/col/index.json | 3 + .../@vant/weapp/col/index.wxml | 9 + .../miniprogram_npm/@vant/weapp/col/index.wxs | 18 + .../@vant/weapp/col/index.wxss | 1 + .../@vant/weapp/collapse-item/animate.js | 43 ++ .../@vant/weapp/collapse-item/index.js | 61 ++ .../@vant/weapp/collapse-item/index.json | 6 + .../@vant/weapp/collapse-item/index.wxml | 44 ++ .../@vant/weapp/collapse-item/index.wxss | 1 + .../@vant/weapp/collapse/index.js | 48 ++ .../@vant/weapp/collapse/index.json | 3 + .../@vant/weapp/collapse/index.wxml | 3 + .../@vant/weapp/collapse/index.wxss | 1 + .../@vant/weapp/common/color.js | 10 + .../@vant/weapp/common/component.js | 48 ++ .../@vant/weapp/common/index.wxss | 1 + .../@vant/weapp/common/relation.js | 65 ++ .../@vant/weapp/common/style/clearfix.wxss | 1 + .../@vant/weapp/common/style/ellipsis.wxss | 1 + .../@vant/weapp/common/style/hairline.wxss | 1 + .../weapp/common/style/mixins/clearfix.wxss | 0 .../weapp/common/style/mixins/ellipsis.wxss | 0 .../weapp/common/style/mixins/hairline.wxss | 0 .../@vant/weapp/common/style/var.wxss | 0 .../@vant/weapp/common/utils.js | 113 ++++ .../@vant/weapp/common/validator.js | 43 ++ .../@vant/weapp/common/version.js | 58 ++ .../@vant/weapp/config-provider/index.js | 11 + .../@vant/weapp/config-provider/index.json | 3 + .../@vant/weapp/config-provider/index.wxml | 5 + .../@vant/weapp/config-provider/index.wxs | 29 + .../@vant/weapp/count-down/index.js | 104 ++++ .../@vant/weapp/count-down/index.json | 3 + .../@vant/weapp/count-down/index.wxml | 4 + .../@vant/weapp/count-down/index.wxss | 1 + .../@vant/weapp/count-down/utils.js | 64 ++ .../@vant/weapp/datetime-picker/index.js | 329 ++++++++++ .../@vant/weapp/datetime-picker/index.json | 6 + .../@vant/weapp/datetime-picker/index.wxml | 16 + .../@vant/weapp/datetime-picker/index.wxss | 1 + .../@vant/weapp/definitions/index.js | 2 + .../@vant/weapp/dialog/dialog.js | 90 +++ .../@vant/weapp/dialog/index.js | 127 ++++ .../@vant/weapp/dialog/index.json | 9 + .../@vant/weapp/dialog/index.wxml | 113 ++++ .../@vant/weapp/dialog/index.wxss | 1 + .../@vant/weapp/divider/index.js | 14 + .../@vant/weapp/divider/index.json | 4 + .../@vant/weapp/divider/index.wxml | 9 + .../@vant/weapp/divider/index.wxs | 18 + .../@vant/weapp/divider/index.wxss | 1 + .../@vant/weapp/dropdown-item/index.js | 107 ++++ .../@vant/weapp/dropdown-item/index.json | 8 + .../@vant/weapp/dropdown-item/index.wxml | 48 ++ .../@vant/weapp/dropdown-item/index.wxss | 1 + .../@vant/weapp/dropdown-item/shared.js | 2 + .../@vant/weapp/dropdown-menu/index.js | 117 ++++ .../@vant/weapp/dropdown-menu/index.json | 3 + .../@vant/weapp/dropdown-menu/index.wxml | 23 + .../@vant/weapp/dropdown-menu/index.wxs | 16 + .../@vant/weapp/dropdown-menu/index.wxss | 1 + .../@vant/weapp/empty/index.js | 12 + .../@vant/weapp/empty/index.json | 4 + .../@vant/weapp/empty/index.wxml | 22 + .../@vant/weapp/empty/index.wxs | 15 + .../@vant/weapp/empty/index.wxss | 1 + .../@vant/weapp/field/index.js | 122 ++++ .../@vant/weapp/field/index.json | 7 + .../@vant/weapp/field/index.wxml | 56 ++ .../@vant/weapp/field/index.wxs | 18 + .../@vant/weapp/field/index.wxss | 1 + .../@vant/weapp/field/input.wxml | 28 + .../@vant/weapp/field/props.js | 67 ++ .../@vant/weapp/field/textarea.wxml | 29 + .../@vant/weapp/goods-action-button/index.js | 38 ++ .../weapp/goods-action-button/index.json | 6 + .../weapp/goods-action-button/index.wxml | 30 + .../weapp/goods-action-button/index.wxss | 1 + .../@vant/weapp/goods-action-icon/index.js | 23 + .../@vant/weapp/goods-action-icon/index.json | 7 + .../@vant/weapp/goods-action-icon/index.wxml | 35 ++ .../@vant/weapp/goods-action-icon/index.wxss | 1 + .../@vant/weapp/goods-action/index.js | 17 + .../@vant/weapp/goods-action/index.json | 3 + .../@vant/weapp/goods-action/index.wxml | 5 + .../@vant/weapp/goods-action/index.wxss | 1 + .../@vant/weapp/grid-item/index.js | 54 ++ .../@vant/weapp/grid-item/index.json | 6 + .../@vant/weapp/grid-item/index.wxml | 27 + .../@vant/weapp/grid-item/index.wxs | 32 + .../@vant/weapp/grid-item/index.wxss | 1 + .../miniprogram_npm/@vant/weapp/grid/index.js | 57 ++ .../@vant/weapp/grid/index.json | 3 + .../@vant/weapp/grid/index.wxml | 8 + .../@vant/weapp/grid/index.wxs | 13 + .../@vant/weapp/grid/index.wxss | 1 + .../miniprogram_npm/@vant/weapp/icon/index.js | 22 + .../@vant/weapp/icon/index.json | 6 + .../@vant/weapp/icon/index.wxml | 20 + .../@vant/weapp/icon/index.wxs | 39 ++ .../@vant/weapp/icon/index.wxss | 1 + .../@vant/weapp/image/index.js | 62 ++ .../@vant/weapp/image/index.json | 7 + .../@vant/weapp/image/index.wxml | 34 + .../@vant/weapp/image/index.wxs | 32 + .../@vant/weapp/image/index.wxss | 1 + .../@vant/weapp/index-anchor/index.js | 28 + .../@vant/weapp/index-anchor/index.json | 3 + .../@vant/weapp/index-anchor/index.wxml | 14 + .../@vant/weapp/index-anchor/index.wxss | 1 + .../@vant/weapp/index-bar/index.js | 240 +++++++ .../@vant/weapp/index-bar/index.json | 3 + .../@vant/weapp/index-bar/index.wxml | 22 + .../@vant/weapp/index-bar/index.wxss | 1 + .../miniprogram_npm/@vant/weapp/info/index.js | 10 + .../@vant/weapp/info/index.json | 3 + .../@vant/weapp/info/index.wxml | 7 + .../@vant/weapp/info/index.wxss | 1 + .../@vant/weapp/loading/index.js | 18 + .../@vant/weapp/loading/index.json | 3 + .../@vant/weapp/loading/index.wxml | 19 + .../@vant/weapp/loading/index.wxs | 22 + .../@vant/weapp/loading/index.wxss | 1 + .../@vant/weapp/mixins/basic.js | 14 + .../@vant/weapp/mixins/button.js | 44 ++ .../@vant/weapp/mixins/link.js | 27 + .../@vant/weapp/mixins/page-scroll.js | 42 ++ .../@vant/weapp/mixins/touch.js | 40 ++ .../@vant/weapp/mixins/transition.js | 121 ++++ .../@vant/weapp/nav-bar/index.js | 68 ++ .../@vant/weapp/nav-bar/index.json | 6 + .../@vant/weapp/nav-bar/index.wxml | 42 ++ .../@vant/weapp/nav-bar/index.wxs | 13 + .../@vant/weapp/nav-bar/index.wxss | 1 + .../@vant/weapp/notice-bar/index.js | 124 ++++ .../@vant/weapp/notice-bar/index.json | 6 + .../@vant/weapp/notice-bar/index.wxml | 39 ++ .../@vant/weapp/notice-bar/index.wxs | 15 + .../@vant/weapp/notice-bar/index.wxss | 1 + .../@vant/weapp/notify/index.js | 68 ++ .../@vant/weapp/notify/index.json | 6 + .../@vant/weapp/notify/index.wxml | 21 + .../@vant/weapp/notify/index.wxs | 22 + .../@vant/weapp/notify/index.wxss | 1 + .../@vant/weapp/notify/notify.js | 60 ++ .../@vant/weapp/overlay/index.js | 28 + .../@vant/weapp/overlay/index.json | 6 + .../@vant/weapp/overlay/index.wxml | 21 + .../@vant/weapp/overlay/index.wxss | 1 + .../@vant/weapp/panel/index.js | 11 + .../@vant/weapp/panel/index.json | 6 + .../@vant/weapp/panel/index.wxml | 19 + .../@vant/weapp/panel/index.wxss | 1 + .../@vant/weapp/picker-column/index.js | 122 ++++ .../@vant/weapp/picker-column/index.json | 3 + .../@vant/weapp/picker-column/index.wxml | 23 + .../@vant/weapp/picker-column/index.wxs | 36 ++ .../@vant/weapp/picker-column/index.wxss | 1 + .../@vant/weapp/picker/index.js | 161 +++++ .../@vant/weapp/picker/index.json | 7 + .../@vant/weapp/picker/index.wxml | 37 ++ .../@vant/weapp/picker/index.wxs | 42 ++ .../@vant/weapp/picker/index.wxss | 1 + .../@vant/weapp/picker/shared.js | 24 + .../@vant/weapp/picker/toolbar.wxml | 23 + .../@vant/weapp/popup/index.js | 91 +++ .../@vant/weapp/popup/index.json | 7 + .../@vant/weapp/popup/index.wxml | 26 + .../@vant/weapp/popup/index.wxs | 18 + .../@vant/weapp/popup/index.wxss | 1 + .../@vant/weapp/progress/index.js | 55 ++ .../@vant/weapp/progress/index.json | 3 + .../@vant/weapp/progress/index.wxml | 20 + .../@vant/weapp/progress/index.wxs | 36 ++ .../@vant/weapp/progress/index.wxss | 1 + .../@vant/weapp/radio-group/index.js | 24 + .../@vant/weapp/radio-group/index.json | 3 + .../@vant/weapp/radio-group/index.wxml | 5 + .../@vant/weapp/radio-group/index.wxss | 1 + .../@vant/weapp/radio/index.js | 68 ++ .../@vant/weapp/radio/index.json | 6 + .../@vant/weapp/radio/index.wxml | 30 + .../@vant/weapp/radio/index.wxs | 33 + .../@vant/weapp/radio/index.wxss | 1 + .../miniprogram_npm/@vant/weapp/rate/index.js | 93 +++ .../@vant/weapp/rate/index.json | 6 + .../@vant/weapp/rate/index.wxml | 35 ++ .../@vant/weapp/rate/index.wxss | 1 + .../miniprogram_npm/@vant/weapp/row/index.js | 26 + .../@vant/weapp/row/index.json | 3 + .../@vant/weapp/row/index.wxml | 5 + .../miniprogram_npm/@vant/weapp/row/index.wxs | 18 + .../@vant/weapp/row/index.wxss | 1 + .../@vant/weapp/search/index.js | 92 +++ .../@vant/weapp/search/index.json | 6 + .../@vant/weapp/search/index.wxml | 53 ++ .../@vant/weapp/search/index.wxss | 1 + .../@vant/weapp/share-sheet/index.js | 57 ++ .../@vant/weapp/share-sheet/index.json | 7 + .../@vant/weapp/share-sheet/index.wxml | 46 ++ .../@vant/weapp/share-sheet/index.wxs | 12 + .../@vant/weapp/share-sheet/index.wxss | 1 + .../@vant/weapp/share-sheet/options.js | 27 + .../@vant/weapp/share-sheet/options.json | 3 + .../@vant/weapp/share-sheet/options.wxml | 20 + .../@vant/weapp/share-sheet/options.wxs | 14 + .../@vant/weapp/share-sheet/options.wxss | 1 + .../@vant/weapp/sidebar-item/index.js | 32 + .../@vant/weapp/sidebar-item/index.json | 6 + .../@vant/weapp/sidebar-item/index.wxml | 18 + .../@vant/weapp/sidebar-item/index.wxss | 1 + .../@vant/weapp/sidebar/index.js | 36 ++ .../@vant/weapp/sidebar/index.json | 3 + .../@vant/weapp/sidebar/index.wxml | 3 + .../@vant/weapp/sidebar/index.wxss | 1 + .../@vant/weapp/skeleton/index.js | 48 ++ .../@vant/weapp/skeleton/index.json | 4 + .../@vant/weapp/skeleton/index.wxml | 29 + .../@vant/weapp/skeleton/index.wxss | 1 + .../@vant/weapp/slider/index.js | 189 ++++++ .../@vant/weapp/slider/index.json | 3 + .../@vant/weapp/slider/index.wxml | 68 ++ .../@vant/weapp/slider/index.wxs | 14 + .../@vant/weapp/slider/index.wxss | 1 + .../@vant/weapp/stepper/index.js | 200 ++++++ .../@vant/weapp/stepper/index.json | 3 + .../@vant/weapp/stepper/index.wxml | 44 ++ .../@vant/weapp/stepper/index.wxs | 22 + .../@vant/weapp/stepper/index.wxss | 1 + .../@vant/weapp/steps/index.js | 35 ++ .../@vant/weapp/steps/index.json | 6 + .../@vant/weapp/steps/index.wxml | 54 ++ .../@vant/weapp/steps/index.wxss | 1 + .../@vant/weapp/sticky/index.js | 124 ++++ .../@vant/weapp/sticky/index.json | 3 + .../@vant/weapp/sticky/index.wxml | 8 + .../@vant/weapp/sticky/index.wxs | 25 + .../@vant/weapp/sticky/index.wxss | 1 + .../@vant/weapp/submit-bar/index.js | 58 ++ .../@vant/weapp/submit-bar/index.json | 7 + .../@vant/weapp/submit-bar/index.wxml | 44 ++ .../@vant/weapp/submit-bar/index.wxss | 1 + .../@vant/weapp/swipe-cell/index.js | 135 ++++ .../@vant/weapp/swipe-cell/index.json | 3 + .../@vant/weapp/swipe-cell/index.wxml | 20 + .../@vant/weapp/swipe-cell/index.wxss | 1 + .../@vant/weapp/switch/index.js | 38 ++ .../@vant/weapp/switch/index.json | 6 + .../@vant/weapp/switch/index.wxml | 16 + .../@vant/weapp/switch/index.wxs | 26 + .../@vant/weapp/switch/index.wxss | 1 + .../miniprogram_npm/@vant/weapp/tab/index.js | 58 ++ .../@vant/weapp/tab/index.json | 3 + .../@vant/weapp/tab/index.wxml | 8 + .../@vant/weapp/tab/index.wxss | 1 + .../@vant/weapp/tabbar-item/index.js | 58 ++ .../@vant/weapp/tabbar-item/index.json | 7 + .../@vant/weapp/tabbar-item/index.wxml | 28 + .../@vant/weapp/tabbar-item/index.wxss | 1 + .../@vant/weapp/tabbar/index.js | 68 ++ .../@vant/weapp/tabbar/index.json | 3 + .../@vant/weapp/tabbar/index.wxml | 10 + .../@vant/weapp/tabbar/index.wxss | 1 + .../miniprogram_npm/@vant/weapp/tabs/index.js | 281 +++++++++ .../@vant/weapp/tabs/index.json | 7 + .../@vant/weapp/tabs/index.wxml | 63 ++ .../@vant/weapp/tabs/index.wxs | 82 +++ .../@vant/weapp/tabs/index.wxss | 1 + .../miniprogram_npm/@vant/weapp/tag/index.js | 23 + .../@vant/weapp/tag/index.json | 6 + .../@vant/weapp/tag/index.wxml | 15 + .../miniprogram_npm/@vant/weapp/tag/index.wxs | 13 + .../@vant/weapp/tag/index.wxss | 1 + .../@vant/weapp/toast/index.js | 31 + .../@vant/weapp/toast/index.json | 9 + .../@vant/weapp/toast/index.wxml | 36 ++ .../@vant/weapp/toast/index.wxss | 1 + .../@vant/weapp/toast/toast.js | 81 +++ .../@vant/weapp/transition/index.js | 15 + .../@vant/weapp/transition/index.json | 3 + .../@vant/weapp/transition/index.wxml | 10 + .../@vant/weapp/transition/index.wxs | 17 + .../@vant/weapp/transition/index.wxss | 1 + .../@vant/weapp/tree-select/index.js | 70 +++ .../@vant/weapp/tree-select/index.json | 8 + .../@vant/weapp/tree-select/index.wxml | 41 ++ .../@vant/weapp/tree-select/index.wxs | 12 + .../@vant/weapp/tree-select/index.wxss | 1 + .../@vant/weapp/uploader/index.js | 170 +++++ .../@vant/weapp/uploader/index.json | 7 + .../@vant/weapp/uploader/index.wxml | 83 +++ .../@vant/weapp/uploader/index.wxs | 14 + .../@vant/weapp/uploader/index.wxss | 1 + .../@vant/weapp/uploader/shared.js | 33 + .../@vant/weapp/uploader/utils.js | 102 +++ .../@vant/weapp/wxs/add-unit.wxs | 12 + .../miniprogram_npm/@vant/weapp/wxs/array.wxs | 5 + .../miniprogram_npm/@vant/weapp/wxs/bem.wxs | 39 ++ .../@vant/weapp/wxs/memoize.wxs | 55 ++ .../@vant/weapp/wxs/object.wxs | 13 + .../miniprogram_npm/@vant/weapp/wxs/style.wxs | 42 ++ .../miniprogram_npm/@vant/weapp/wxs/utils.wxs | 10 + package-lock.json | 13 + package.json | 18 + pages/activity/activity.js | 158 +++++ pages/activity/activity.json | 4 + pages/activity/activity.wxml | 45 ++ pages/activity/activity.wxss | 128 ++++ .../appointmentDetails/appointmentDetails.js | 201 ++++++ .../appointmentDetails.json | 9 + .../appointmentDetails.wxml | 77 +++ .../appointmentDetails.wxss | 315 ++++++++++ pages/cardBag/cardBag.js | 66 ++ pages/cardBag/cardBag.wxml | 2 + pages/image/Bargain.png | Bin 0 -> 982 bytes pages/image/Collage.png | Bin 0 -> 1511 bytes pages/image/Collection.png | Bin 0 -> 2474 bytes pages/image/Hairdressing.png | Bin 0 -> 4431 bytes pages/image/Micro.png | Bin 0 -> 1484 bytes pages/image/Shaping.png | Bin 0 -> 3750 bytes pages/image/Skin.png | Bin 0 -> 2925 bytes pages/image/Star.png | Bin 0 -> 821 bytes pages/image/White.png | Bin 0 -> 3065 bytes pages/image/address.png | Bin 0 -> 1507 bytes pages/image/antifading.png | Bin 0 -> 4837 bytes pages/image/beauty.png | Bin 0 -> 7632 bytes pages/image/bifu.png | Bin 0 -> 6554 bytes pages/image/caitiao.png | Bin 0 -> 1239 bytes pages/image/cardbag.png | Bin 0 -> 547 bytes pages/image/cardbag_a.png | Bin 0 -> 569 bytes pages/image/clock.png | Bin 0 -> 715 bytes pages/image/colleme.png | Bin 0 -> 1846 bytes pages/image/cosmetology.png | Bin 0 -> 4181 bytes pages/image/erweima.png | Bin 0 -> 2424 bytes pages/image/erweimama.png | Bin 0 -> 8370 bytes pages/image/expired.png | Bin 0 -> 7426 bytes pages/image/goru.png | Bin 0 -> 47139 bytes pages/image/home_bj.png | Bin 0 -> 51109 bytes pages/image/hospital.png | Bin 0 -> 66700 bytes pages/image/image_left.png | Bin 0 -> 4399 bytes pages/image/image_right.png | Bin 0 -> 6742 bytes pages/image/income.png | Bin 0 -> 1800 bytes pages/image/income_a.png | Bin 0 -> 1888 bytes pages/image/jigou.png | Bin 0 -> 168957 bytes pages/image/left.png | Bin 0 -> 425 bytes pages/image/manicure.png | Bin 0 -> 2113 bytes pages/image/max.png | Bin 0 -> 696 bytes pages/image/max_a.png | Bin 0 -> 612 bytes pages/image/medical.png | Bin 0 -> 5508 bytes pages/image/money.png | Bin 0 -> 687 bytes pages/image/my.png | Bin 0 -> 1465 bytes pages/image/my_a.png | Bin 0 -> 1482 bytes pages/image/needle.png | Bin 0 -> 91890 bytes pages/image/notice.png | Bin 0 -> 498 bytes pages/image/null.png | Bin 0 -> 31297 bytes pages/image/one.png | Bin 0 -> 936 bytes pages/image/order.png | Bin 0 -> 1156 bytes pages/image/order_a.png | Bin 0 -> 1086 bytes pages/image/phone.png | Bin 0 -> 498 bytes pages/image/pintuan.png | Bin 0 -> 161664 bytes pages/image/qingyan.png | Bin 0 -> 6201 bytes pages/image/right.png | Bin 0 -> 648 bytes pages/image/right1.png | Bin 0 -> 297 bytes pages/image/save.png | Bin 0 -> 287 bytes pages/image/service.png | Bin 0 -> 514 bytes pages/image/service_bg.png | Bin 0 -> 8996 bytes pages/image/shoucang.png | Bin 0 -> 597 bytes pages/image/site.png | Bin 0 -> 891 bytes pages/image/success.png | Bin 0 -> 4103 bytes pages/image/tuiguang_bg.jpg | Bin 0 -> 81984 bytes pages/image/tuiguang_bj.png | Bin 0 -> 168316 bytes pages/image/tuiguang_i.png | Bin 0 -> 9315 bytes pages/image/userimg.png | Bin 0 -> 4898 bytes pages/image/wallet.png | Bin 0 -> 2135 bytes pages/image/yixing.png | Bin 0 -> 7632 bytes pages/index/index.js | 325 ++++++++++ pages/index/index.json | 12 + pages/index/index.wxml | 44 ++ pages/index/index.wxss | 118 ++++ pages/institutions/institutions.js | 105 ++++ pages/institutions/institutions.json | 4 + pages/institutions/institutions.wxml | 65 ++ pages/institutions/institutions.wxss | 194 ++++++ pages/login/login.js | 203 ++++++ pages/login/login.json | 5 + pages/login/login.wxml | 2 + pages/login/login.wxss | 7 + pages/mechanism/mechanism.js | 207 ++++++ pages/mechanism/mechanism.json | 6 + pages/mechanism/mechanism.wxml | 67 ++ pages/mechanism/mechanism.wxss | 130 ++++ pages/my/my.js | 254 ++++++++ pages/my/my.json | 6 + pages/my/my.wxml | 64 ++ pages/my/my.wxss | 93 +++ pages/myshoucang/myorderdetail.js | 153 +++++ pages/myshoucang/myorderdetail.json | 7 + pages/myshoucang/myorderdetail.wxml | 67 ++ pages/myshoucang/myorderdetail.wxss | 248 ++++++++ pages/myshoucang/myshoucang_index.js | 250 ++++++++ pages/myshoucang/myshoucang_index.json | 4 + pages/myshoucang/myshoucang_index.wxml | 25 + pages/myshoucang/myshoucang_index.wxss | 127 ++++ pages/order/order.js | 232 +++++++ pages/order/order.json | 9 + pages/order/order.wxml | 59 ++ pages/order/order.wxss | 194 ++++++ pages/order/re_orderdetail.js | 190 ++++++ pages/order/re_orderdetail.json | 7 + pages/order/re_orderdetail.wxml | 96 +++ pages/order/re_orderdetail.wxss | 248 ++++++++ pages/orderdetail/orderdetail.js | 525 ++++++++++++++++ pages/orderdetail/orderdetail.json | 7 + pages/orderdetail/orderdetail.wxml | 338 ++++++++++ pages/orderdetail/orderdetail.wxss | 507 +++++++++++++++ pages/paysuccess/paysuccess.js | 66 ++ pages/paysuccess/paysuccess.json | 3 + pages/paysuccess/paysuccess.wxml | 2 + pages/paysuccess/paysuccess.wxss | 1 + pages/reforderdetail/reforderdetail.js | 455 ++++++++++++++ pages/reforderdetail/reforderdetail.json | 7 + pages/reforderdetail/reforderdetail.wxml | 142 +++++ pages/reforderdetail/reforderdetail.wxss | 271 ++++++++ pages/refund/refund.js | 456 ++++++++++++++ pages/refund/refund.json | 8 + pages/refund/refund.wxml | 172 +++++ pages/refund/refund.wxss | 587 ++++++++++++++++++ pages/switchcity/switchcity.js | 97 +++ pages/tuiguang/extensionInfor.js | 63 ++ pages/tuiguang/extensionInfor.json | 8 + pages/tuiguang/extensionInfor.wxml | 55 ++ pages/tuiguang/extensionInfor.wxss | 204 ++++++ pages/tuiguang/tuiguang.js | 60 ++ pages/tuiguang/tuiguang.json | 8 + pages/tuiguang/tuiguang.wxml | 50 ++ pages/tuiguang/tuiguang.wxss | 176 ++++++ pages/wodeqianbao/qianbao.js | 194 ++++++ pages/wodeqianbao/qianbao.json | 4 + pages/wodeqianbao/qianbao.wxml | 20 + pages/wodeqianbao/qianbao.wxss | 116 ++++ project.config.json | 78 +++ project.private.config.json | 103 +++ shopping/image/Alipay.png | Bin 0 -> 5046 bytes shopping/image/WeChat.png | Bin 0 -> 5646 bytes shopping/image/back_home.png | Bin 0 -> 3303 bytes shopping/image/userimg.png | Bin 0 -> 4898 bytes shopping/pages/goddess/goddess.js | 335 ++++++++++ shopping/pages/goddess/goddess.json | 11 + shopping/pages/goddess/goddess.wxml | 105 ++++ shopping/pages/goddess/goddess.wxss | 390 ++++++++++++ shopping/pages/payment/payment.js | 75 +++ shopping/pages/payment/payment.json | 4 + shopping/pages/payment/payment.wxml | 36 ++ shopping/pages/payment/payment.wxss | 124 ++++ shopping/pages/paysuccess/paysuccess.js | 188 ++++++ shopping/pages/paysuccess/paysuccess.json | 7 + shopping/pages/paysuccess/paysuccess.wxml | 235 +++++++ shopping/pages/paysuccess/paysuccess.wxss | 583 +++++++++++++++++ shopping/pages/withdrawal/withdrawal.js | 258 ++++++++ shopping/pages/withdrawal/withdrawal.json | 7 + shopping/pages/withdrawal/withdrawal.wxml | 41 ++ shopping/pages/withdrawal/withdrawal.wxss | 97 +++ sitemap.json | 7 + subPackages/pages/withdrawal/withdrawal.js | 66 ++ subPackages/pages/withdrawal/withdrawal.json | 3 + subPackages/pages/withdrawal/withdrawal.wxml | 2 + subPackages/pages/withdrawal/withdrawal.wxss | 1 + temp.json | 52 ++ utils/dateTimePicker.js | 80 +++ utils/shareLogo.js | 5 + utils/util.js | 58 ++ 1270 files changed, 45211 insertions(+) create mode 100644 .idea/.gitignore create mode 100644 .idea/coupon.iml create mode 100644 .idea/misc.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/vcs.xml create mode 100644 app.js create mode 100644 app.json create mode 100644 app.wxss create mode 100644 component/picker/GetDate.js create mode 100644 component/picker/picker.js create mode 100644 component/picker/picker.json create mode 100644 component/picker/picker.wxml create mode 100644 component/picker/picker.wxss create mode 100644 component/picker/readme.md create mode 100644 miniprogram/@vant/weapp/LICENSE create mode 100644 miniprogram/@vant/weapp/README.md create mode 100644 miniprogram/@vant/weapp/changelog.generated.md create mode 100644 miniprogram/@vant/weapp/dist/action-sheet/index.js create mode 100644 miniprogram/@vant/weapp/dist/action-sheet/index.json create mode 100644 miniprogram/@vant/weapp/dist/action-sheet/index.wxml create mode 100644 miniprogram/@vant/weapp/dist/action-sheet/index.wxss create mode 100644 miniprogram/@vant/weapp/dist/area/index.js create mode 100644 miniprogram/@vant/weapp/dist/area/index.json create mode 100644 miniprogram/@vant/weapp/dist/area/index.wxml create mode 100644 miniprogram/@vant/weapp/dist/area/index.wxs create mode 100644 miniprogram/@vant/weapp/dist/area/index.wxss create mode 100644 miniprogram/@vant/weapp/dist/button/index.js create mode 100644 miniprogram/@vant/weapp/dist/button/index.json create mode 100644 miniprogram/@vant/weapp/dist/button/index.wxml create mode 100644 miniprogram/@vant/weapp/dist/button/index.wxs create mode 100644 miniprogram/@vant/weapp/dist/button/index.wxss create mode 100644 miniprogram/@vant/weapp/dist/calendar/calendar.wxml create mode 100644 miniprogram/@vant/weapp/dist/calendar/components/header/index.js create mode 100644 miniprogram/@vant/weapp/dist/calendar/components/header/index.json create mode 100644 miniprogram/@vant/weapp/dist/calendar/components/header/index.wxml create mode 100644 miniprogram/@vant/weapp/dist/calendar/components/header/index.wxss create mode 100644 miniprogram/@vant/weapp/dist/calendar/components/month/index.js create mode 100644 miniprogram/@vant/weapp/dist/calendar/components/month/index.json create mode 100644 miniprogram/@vant/weapp/dist/calendar/components/month/index.wxml create mode 100644 miniprogram/@vant/weapp/dist/calendar/components/month/index.wxs create mode 100644 miniprogram/@vant/weapp/dist/calendar/components/month/index.wxss create mode 100644 miniprogram/@vant/weapp/dist/calendar/index.js create mode 100644 miniprogram/@vant/weapp/dist/calendar/index.json create mode 100644 miniprogram/@vant/weapp/dist/calendar/index.wxml create mode 100644 miniprogram/@vant/weapp/dist/calendar/index.wxs create mode 100644 miniprogram/@vant/weapp/dist/calendar/index.wxss create mode 100644 miniprogram/@vant/weapp/dist/calendar/utils.js create mode 100644 miniprogram/@vant/weapp/dist/calendar/utils.wxs create mode 100644 miniprogram/@vant/weapp/dist/card/index.js create mode 100644 miniprogram/@vant/weapp/dist/card/index.json create mode 100644 miniprogram/@vant/weapp/dist/card/index.wxml create mode 100644 miniprogram/@vant/weapp/dist/card/index.wxss create mode 100644 miniprogram/@vant/weapp/dist/cell-group/index.js create mode 100644 miniprogram/@vant/weapp/dist/cell-group/index.json create mode 100644 miniprogram/@vant/weapp/dist/cell-group/index.wxml create mode 100644 miniprogram/@vant/weapp/dist/cell-group/index.wxss create mode 100644 miniprogram/@vant/weapp/dist/cell/index.js create mode 100644 miniprogram/@vant/weapp/dist/cell/index.json create mode 100644 miniprogram/@vant/weapp/dist/cell/index.wxml create mode 100644 miniprogram/@vant/weapp/dist/cell/index.wxs create mode 100644 miniprogram/@vant/weapp/dist/cell/index.wxss create mode 100644 miniprogram/@vant/weapp/dist/checkbox-group/index.js create mode 100644 miniprogram/@vant/weapp/dist/checkbox-group/index.json create mode 100644 miniprogram/@vant/weapp/dist/checkbox-group/index.wxml create mode 100644 miniprogram/@vant/weapp/dist/checkbox-group/index.wxss create mode 100644 miniprogram/@vant/weapp/dist/checkbox/index.js create mode 100644 miniprogram/@vant/weapp/dist/checkbox/index.json create mode 100644 miniprogram/@vant/weapp/dist/checkbox/index.wxml create mode 100644 miniprogram/@vant/weapp/dist/checkbox/index.wxs create mode 100644 miniprogram/@vant/weapp/dist/checkbox/index.wxss create mode 100644 miniprogram/@vant/weapp/dist/circle/canvas.js create mode 100644 miniprogram/@vant/weapp/dist/circle/index.js create mode 100644 miniprogram/@vant/weapp/dist/circle/index.json create mode 100644 miniprogram/@vant/weapp/dist/circle/index.wxml create mode 100644 miniprogram/@vant/weapp/dist/circle/index.wxss create mode 100644 miniprogram/@vant/weapp/dist/col/index.js create mode 100644 miniprogram/@vant/weapp/dist/col/index.json create mode 100644 miniprogram/@vant/weapp/dist/col/index.wxml create mode 100644 miniprogram/@vant/weapp/dist/col/index.wxs create mode 100644 miniprogram/@vant/weapp/dist/col/index.wxss create mode 100644 miniprogram/@vant/weapp/dist/collapse-item/animate.js create mode 100644 miniprogram/@vant/weapp/dist/collapse-item/index.js create mode 100644 miniprogram/@vant/weapp/dist/collapse-item/index.json create mode 100644 miniprogram/@vant/weapp/dist/collapse-item/index.wxml create mode 100644 miniprogram/@vant/weapp/dist/collapse-item/index.wxss create mode 100644 miniprogram/@vant/weapp/dist/collapse/index.js create mode 100644 miniprogram/@vant/weapp/dist/collapse/index.json create mode 100644 miniprogram/@vant/weapp/dist/collapse/index.wxml create mode 100644 miniprogram/@vant/weapp/dist/collapse/index.wxss create mode 100644 miniprogram/@vant/weapp/dist/common/color.js create mode 100644 miniprogram/@vant/weapp/dist/common/component.js create mode 100644 miniprogram/@vant/weapp/dist/common/index.wxss create mode 100644 miniprogram/@vant/weapp/dist/common/relation.js create mode 100644 miniprogram/@vant/weapp/dist/common/style/clearfix.wxss create mode 100644 miniprogram/@vant/weapp/dist/common/style/ellipsis.wxss create mode 100644 miniprogram/@vant/weapp/dist/common/style/hairline.wxss create mode 100644 miniprogram/@vant/weapp/dist/common/style/mixins/clearfix.wxss create mode 100644 miniprogram/@vant/weapp/dist/common/style/mixins/ellipsis.wxss create mode 100644 miniprogram/@vant/weapp/dist/common/style/mixins/hairline.wxss create mode 100644 miniprogram/@vant/weapp/dist/common/style/var.wxss create mode 100644 miniprogram/@vant/weapp/dist/common/utils.js create mode 100644 miniprogram/@vant/weapp/dist/common/validator.js create mode 100644 miniprogram/@vant/weapp/dist/common/version.js create mode 100644 miniprogram/@vant/weapp/dist/config-provider/index.js create mode 100644 miniprogram/@vant/weapp/dist/config-provider/index.json create mode 100644 miniprogram/@vant/weapp/dist/config-provider/index.wxml create mode 100644 miniprogram/@vant/weapp/dist/config-provider/index.wxs create mode 100644 miniprogram/@vant/weapp/dist/count-down/index.js create mode 100644 miniprogram/@vant/weapp/dist/count-down/index.json create mode 100644 miniprogram/@vant/weapp/dist/count-down/index.wxml create mode 100644 miniprogram/@vant/weapp/dist/count-down/index.wxss create mode 100644 miniprogram/@vant/weapp/dist/count-down/utils.js create mode 100644 miniprogram/@vant/weapp/dist/datetime-picker/index.js create mode 100644 miniprogram/@vant/weapp/dist/datetime-picker/index.json create mode 100644 miniprogram/@vant/weapp/dist/datetime-picker/index.wxml create mode 100644 miniprogram/@vant/weapp/dist/datetime-picker/index.wxss create mode 100644 miniprogram/@vant/weapp/dist/definitions/index.js create mode 100644 miniprogram/@vant/weapp/dist/dialog/dialog.js create mode 100644 miniprogram/@vant/weapp/dist/dialog/index.js create mode 100644 miniprogram/@vant/weapp/dist/dialog/index.json create mode 100644 miniprogram/@vant/weapp/dist/dialog/index.wxml create mode 100644 miniprogram/@vant/weapp/dist/dialog/index.wxss create mode 100644 miniprogram/@vant/weapp/dist/divider/index.js create mode 100644 miniprogram/@vant/weapp/dist/divider/index.json create mode 100644 miniprogram/@vant/weapp/dist/divider/index.wxml create mode 100644 miniprogram/@vant/weapp/dist/divider/index.wxs create mode 100644 miniprogram/@vant/weapp/dist/divider/index.wxss create mode 100644 miniprogram/@vant/weapp/dist/dropdown-item/index.js create mode 100644 miniprogram/@vant/weapp/dist/dropdown-item/index.json create mode 100644 miniprogram/@vant/weapp/dist/dropdown-item/index.wxml create mode 100644 miniprogram/@vant/weapp/dist/dropdown-item/index.wxss create mode 100644 miniprogram/@vant/weapp/dist/dropdown-item/shared.js create mode 100644 miniprogram/@vant/weapp/dist/dropdown-menu/index.js create mode 100644 miniprogram/@vant/weapp/dist/dropdown-menu/index.json create mode 100644 miniprogram/@vant/weapp/dist/dropdown-menu/index.wxml create mode 100644 miniprogram/@vant/weapp/dist/dropdown-menu/index.wxs create mode 100644 miniprogram/@vant/weapp/dist/dropdown-menu/index.wxss create mode 100644 miniprogram/@vant/weapp/dist/empty/index.js create mode 100644 miniprogram/@vant/weapp/dist/empty/index.json create mode 100644 miniprogram/@vant/weapp/dist/empty/index.wxml create mode 100644 miniprogram/@vant/weapp/dist/empty/index.wxs create mode 100644 miniprogram/@vant/weapp/dist/empty/index.wxss create mode 100644 miniprogram/@vant/weapp/dist/field/index.js create mode 100644 miniprogram/@vant/weapp/dist/field/index.json create mode 100644 miniprogram/@vant/weapp/dist/field/index.wxml create mode 100644 miniprogram/@vant/weapp/dist/field/index.wxs create mode 100644 miniprogram/@vant/weapp/dist/field/index.wxss create mode 100644 miniprogram/@vant/weapp/dist/field/input.wxml create mode 100644 miniprogram/@vant/weapp/dist/field/props.js create mode 100644 miniprogram/@vant/weapp/dist/field/textarea.wxml create mode 100644 miniprogram/@vant/weapp/dist/goods-action-button/index.js create mode 100644 miniprogram/@vant/weapp/dist/goods-action-button/index.json create mode 100644 miniprogram/@vant/weapp/dist/goods-action-button/index.wxml create mode 100644 miniprogram/@vant/weapp/dist/goods-action-button/index.wxss create mode 100644 miniprogram/@vant/weapp/dist/goods-action-icon/index.js create mode 100644 miniprogram/@vant/weapp/dist/goods-action-icon/index.json create mode 100644 miniprogram/@vant/weapp/dist/goods-action-icon/index.wxml create mode 100644 miniprogram/@vant/weapp/dist/goods-action-icon/index.wxss create mode 100644 miniprogram/@vant/weapp/dist/goods-action/index.js create mode 100644 miniprogram/@vant/weapp/dist/goods-action/index.json create mode 100644 miniprogram/@vant/weapp/dist/goods-action/index.wxml create mode 100644 miniprogram/@vant/weapp/dist/goods-action/index.wxss create mode 100644 miniprogram/@vant/weapp/dist/grid-item/index.js create mode 100644 miniprogram/@vant/weapp/dist/grid-item/index.json create mode 100644 miniprogram/@vant/weapp/dist/grid-item/index.wxml create mode 100644 miniprogram/@vant/weapp/dist/grid-item/index.wxs create mode 100644 miniprogram/@vant/weapp/dist/grid-item/index.wxss create mode 100644 miniprogram/@vant/weapp/dist/grid/index.js create mode 100644 miniprogram/@vant/weapp/dist/grid/index.json create mode 100644 miniprogram/@vant/weapp/dist/grid/index.wxml create mode 100644 miniprogram/@vant/weapp/dist/grid/index.wxs create mode 100644 miniprogram/@vant/weapp/dist/grid/index.wxss create mode 100644 miniprogram/@vant/weapp/dist/icon/index.js create mode 100644 miniprogram/@vant/weapp/dist/icon/index.json create mode 100644 miniprogram/@vant/weapp/dist/icon/index.wxml create mode 100644 miniprogram/@vant/weapp/dist/icon/index.wxs create mode 100644 miniprogram/@vant/weapp/dist/icon/index.wxss create mode 100644 miniprogram/@vant/weapp/dist/image/index.js create mode 100644 miniprogram/@vant/weapp/dist/image/index.json create mode 100644 miniprogram/@vant/weapp/dist/image/index.wxml create mode 100644 miniprogram/@vant/weapp/dist/image/index.wxs create mode 100644 miniprogram/@vant/weapp/dist/image/index.wxss create mode 100644 miniprogram/@vant/weapp/dist/index-anchor/index.js create mode 100644 miniprogram/@vant/weapp/dist/index-anchor/index.json create mode 100644 miniprogram/@vant/weapp/dist/index-anchor/index.wxml create mode 100644 miniprogram/@vant/weapp/dist/index-anchor/index.wxss create mode 100644 miniprogram/@vant/weapp/dist/index-bar/index.js create mode 100644 miniprogram/@vant/weapp/dist/index-bar/index.json create mode 100644 miniprogram/@vant/weapp/dist/index-bar/index.wxml create mode 100644 miniprogram/@vant/weapp/dist/index-bar/index.wxss create mode 100644 miniprogram/@vant/weapp/dist/info/index.js create mode 100644 miniprogram/@vant/weapp/dist/info/index.json create mode 100644 miniprogram/@vant/weapp/dist/info/index.wxml create mode 100644 miniprogram/@vant/weapp/dist/info/index.wxss create mode 100644 miniprogram/@vant/weapp/dist/loading/index.js create mode 100644 miniprogram/@vant/weapp/dist/loading/index.json create mode 100644 miniprogram/@vant/weapp/dist/loading/index.wxml create mode 100644 miniprogram/@vant/weapp/dist/loading/index.wxs create mode 100644 miniprogram/@vant/weapp/dist/loading/index.wxss create mode 100644 miniprogram/@vant/weapp/dist/mixins/basic.js create mode 100644 miniprogram/@vant/weapp/dist/mixins/button.js create mode 100644 miniprogram/@vant/weapp/dist/mixins/link.js create mode 100644 miniprogram/@vant/weapp/dist/mixins/page-scroll.js create mode 100644 miniprogram/@vant/weapp/dist/mixins/touch.js create mode 100644 miniprogram/@vant/weapp/dist/mixins/transition.js create mode 100644 miniprogram/@vant/weapp/dist/nav-bar/index.js create mode 100644 miniprogram/@vant/weapp/dist/nav-bar/index.json create mode 100644 miniprogram/@vant/weapp/dist/nav-bar/index.wxml create mode 100644 miniprogram/@vant/weapp/dist/nav-bar/index.wxs create mode 100644 miniprogram/@vant/weapp/dist/nav-bar/index.wxss create mode 100644 miniprogram/@vant/weapp/dist/notice-bar/index.js create mode 100644 miniprogram/@vant/weapp/dist/notice-bar/index.json create mode 100644 miniprogram/@vant/weapp/dist/notice-bar/index.wxml create mode 100644 miniprogram/@vant/weapp/dist/notice-bar/index.wxs create mode 100644 miniprogram/@vant/weapp/dist/notice-bar/index.wxss create mode 100644 miniprogram/@vant/weapp/dist/notify/index.js create mode 100644 miniprogram/@vant/weapp/dist/notify/index.json create mode 100644 miniprogram/@vant/weapp/dist/notify/index.wxml create mode 100644 miniprogram/@vant/weapp/dist/notify/index.wxs create mode 100644 miniprogram/@vant/weapp/dist/notify/index.wxss create mode 100644 miniprogram/@vant/weapp/dist/notify/notify.js create mode 100644 miniprogram/@vant/weapp/dist/overlay/index.js create mode 100644 miniprogram/@vant/weapp/dist/overlay/index.json create mode 100644 miniprogram/@vant/weapp/dist/overlay/index.wxml create mode 100644 miniprogram/@vant/weapp/dist/overlay/index.wxss create mode 100644 miniprogram/@vant/weapp/dist/panel/index.js create mode 100644 miniprogram/@vant/weapp/dist/panel/index.json create mode 100644 miniprogram/@vant/weapp/dist/panel/index.wxml create mode 100644 miniprogram/@vant/weapp/dist/panel/index.wxss create mode 100644 miniprogram/@vant/weapp/dist/picker-column/index.js create mode 100644 miniprogram/@vant/weapp/dist/picker-column/index.json create mode 100644 miniprogram/@vant/weapp/dist/picker-column/index.wxml create mode 100644 miniprogram/@vant/weapp/dist/picker-column/index.wxs create mode 100644 miniprogram/@vant/weapp/dist/picker-column/index.wxss create mode 100644 miniprogram/@vant/weapp/dist/picker/index.js create mode 100644 miniprogram/@vant/weapp/dist/picker/index.json create mode 100644 miniprogram/@vant/weapp/dist/picker/index.wxml create mode 100644 miniprogram/@vant/weapp/dist/picker/index.wxs create mode 100644 miniprogram/@vant/weapp/dist/picker/index.wxss create mode 100644 miniprogram/@vant/weapp/dist/picker/shared.js create mode 100644 miniprogram/@vant/weapp/dist/picker/toolbar.wxml create mode 100644 miniprogram/@vant/weapp/dist/popup/index.js create mode 100644 miniprogram/@vant/weapp/dist/popup/index.json create mode 100644 miniprogram/@vant/weapp/dist/popup/index.wxml create mode 100644 miniprogram/@vant/weapp/dist/popup/index.wxs create mode 100644 miniprogram/@vant/weapp/dist/popup/index.wxss create mode 100644 miniprogram/@vant/weapp/dist/progress/index.js create mode 100644 miniprogram/@vant/weapp/dist/progress/index.json create mode 100644 miniprogram/@vant/weapp/dist/progress/index.wxml create mode 100644 miniprogram/@vant/weapp/dist/progress/index.wxs create mode 100644 miniprogram/@vant/weapp/dist/progress/index.wxss create mode 100644 miniprogram/@vant/weapp/dist/radio-group/index.js create mode 100644 miniprogram/@vant/weapp/dist/radio-group/index.json create mode 100644 miniprogram/@vant/weapp/dist/radio-group/index.wxml create mode 100644 miniprogram/@vant/weapp/dist/radio-group/index.wxss create mode 100644 miniprogram/@vant/weapp/dist/radio/index.js create mode 100644 miniprogram/@vant/weapp/dist/radio/index.json create mode 100644 miniprogram/@vant/weapp/dist/radio/index.wxml create mode 100644 miniprogram/@vant/weapp/dist/radio/index.wxs create mode 100644 miniprogram/@vant/weapp/dist/radio/index.wxss create mode 100644 miniprogram/@vant/weapp/dist/rate/index.js create mode 100644 miniprogram/@vant/weapp/dist/rate/index.json create mode 100644 miniprogram/@vant/weapp/dist/rate/index.wxml create mode 100644 miniprogram/@vant/weapp/dist/rate/index.wxss create mode 100644 miniprogram/@vant/weapp/dist/row/index.js create mode 100644 miniprogram/@vant/weapp/dist/row/index.json create mode 100644 miniprogram/@vant/weapp/dist/row/index.wxml create mode 100644 miniprogram/@vant/weapp/dist/row/index.wxs create mode 100644 miniprogram/@vant/weapp/dist/row/index.wxss create mode 100644 miniprogram/@vant/weapp/dist/search/index.js create mode 100644 miniprogram/@vant/weapp/dist/search/index.json create mode 100644 miniprogram/@vant/weapp/dist/search/index.wxml create mode 100644 miniprogram/@vant/weapp/dist/search/index.wxss create mode 100644 miniprogram/@vant/weapp/dist/share-sheet/index.js create mode 100644 miniprogram/@vant/weapp/dist/share-sheet/index.json create mode 100644 miniprogram/@vant/weapp/dist/share-sheet/index.wxml create mode 100644 miniprogram/@vant/weapp/dist/share-sheet/index.wxs create mode 100644 miniprogram/@vant/weapp/dist/share-sheet/index.wxss create mode 100644 miniprogram/@vant/weapp/dist/share-sheet/options.js create mode 100644 miniprogram/@vant/weapp/dist/share-sheet/options.json create mode 100644 miniprogram/@vant/weapp/dist/share-sheet/options.wxml create mode 100644 miniprogram/@vant/weapp/dist/share-sheet/options.wxs create mode 100644 miniprogram/@vant/weapp/dist/share-sheet/options.wxss create mode 100644 miniprogram/@vant/weapp/dist/sidebar-item/index.js create mode 100644 miniprogram/@vant/weapp/dist/sidebar-item/index.json create mode 100644 miniprogram/@vant/weapp/dist/sidebar-item/index.wxml create mode 100644 miniprogram/@vant/weapp/dist/sidebar-item/index.wxss create mode 100644 miniprogram/@vant/weapp/dist/sidebar/index.js create mode 100644 miniprogram/@vant/weapp/dist/sidebar/index.json create mode 100644 miniprogram/@vant/weapp/dist/sidebar/index.wxml create mode 100644 miniprogram/@vant/weapp/dist/sidebar/index.wxss create mode 100644 miniprogram/@vant/weapp/dist/skeleton/index.js create mode 100644 miniprogram/@vant/weapp/dist/skeleton/index.json create mode 100644 miniprogram/@vant/weapp/dist/skeleton/index.wxml create mode 100644 miniprogram/@vant/weapp/dist/skeleton/index.wxss create mode 100644 miniprogram/@vant/weapp/dist/slider/index.js create mode 100644 miniprogram/@vant/weapp/dist/slider/index.json create mode 100644 miniprogram/@vant/weapp/dist/slider/index.wxml create mode 100644 miniprogram/@vant/weapp/dist/slider/index.wxs create mode 100644 miniprogram/@vant/weapp/dist/slider/index.wxss create mode 100644 miniprogram/@vant/weapp/dist/stepper/index.js create mode 100644 miniprogram/@vant/weapp/dist/stepper/index.json create mode 100644 miniprogram/@vant/weapp/dist/stepper/index.wxml create mode 100644 miniprogram/@vant/weapp/dist/stepper/index.wxs create mode 100644 miniprogram/@vant/weapp/dist/stepper/index.wxss create mode 100644 miniprogram/@vant/weapp/dist/steps/index.js create mode 100644 miniprogram/@vant/weapp/dist/steps/index.json create mode 100644 miniprogram/@vant/weapp/dist/steps/index.wxml create mode 100644 miniprogram/@vant/weapp/dist/steps/index.wxss create mode 100644 miniprogram/@vant/weapp/dist/sticky/index.js create mode 100644 miniprogram/@vant/weapp/dist/sticky/index.json create mode 100644 miniprogram/@vant/weapp/dist/sticky/index.wxml create mode 100644 miniprogram/@vant/weapp/dist/sticky/index.wxs create mode 100644 miniprogram/@vant/weapp/dist/sticky/index.wxss create mode 100644 miniprogram/@vant/weapp/dist/submit-bar/index.js create mode 100644 miniprogram/@vant/weapp/dist/submit-bar/index.json create mode 100644 miniprogram/@vant/weapp/dist/submit-bar/index.wxml create mode 100644 miniprogram/@vant/weapp/dist/submit-bar/index.wxss create mode 100644 miniprogram/@vant/weapp/dist/swipe-cell/index.js create mode 100644 miniprogram/@vant/weapp/dist/swipe-cell/index.json create mode 100644 miniprogram/@vant/weapp/dist/swipe-cell/index.wxml create mode 100644 miniprogram/@vant/weapp/dist/swipe-cell/index.wxss create mode 100644 miniprogram/@vant/weapp/dist/switch/index.js create mode 100644 miniprogram/@vant/weapp/dist/switch/index.json create mode 100644 miniprogram/@vant/weapp/dist/switch/index.wxml create mode 100644 miniprogram/@vant/weapp/dist/switch/index.wxs create mode 100644 miniprogram/@vant/weapp/dist/switch/index.wxss create mode 100644 miniprogram/@vant/weapp/dist/tab/index.js create mode 100644 miniprogram/@vant/weapp/dist/tab/index.json create mode 100644 miniprogram/@vant/weapp/dist/tab/index.wxml create mode 100644 miniprogram/@vant/weapp/dist/tab/index.wxss create mode 100644 miniprogram/@vant/weapp/dist/tabbar-item/index.js create mode 100644 miniprogram/@vant/weapp/dist/tabbar-item/index.json create mode 100644 miniprogram/@vant/weapp/dist/tabbar-item/index.wxml create mode 100644 miniprogram/@vant/weapp/dist/tabbar-item/index.wxss create mode 100644 miniprogram/@vant/weapp/dist/tabbar/index.js create mode 100644 miniprogram/@vant/weapp/dist/tabbar/index.json create mode 100644 miniprogram/@vant/weapp/dist/tabbar/index.wxml create mode 100644 miniprogram/@vant/weapp/dist/tabbar/index.wxss create mode 100644 miniprogram/@vant/weapp/dist/tabs/index.js create mode 100644 miniprogram/@vant/weapp/dist/tabs/index.json create mode 100644 miniprogram/@vant/weapp/dist/tabs/index.wxml create mode 100644 miniprogram/@vant/weapp/dist/tabs/index.wxs create mode 100644 miniprogram/@vant/weapp/dist/tabs/index.wxss create mode 100644 miniprogram/@vant/weapp/dist/tag/index.js create mode 100644 miniprogram/@vant/weapp/dist/tag/index.json create mode 100644 miniprogram/@vant/weapp/dist/tag/index.wxml create mode 100644 miniprogram/@vant/weapp/dist/tag/index.wxs create mode 100644 miniprogram/@vant/weapp/dist/tag/index.wxss create mode 100644 miniprogram/@vant/weapp/dist/toast/index.js create mode 100644 miniprogram/@vant/weapp/dist/toast/index.json create mode 100644 miniprogram/@vant/weapp/dist/toast/index.wxml create mode 100644 miniprogram/@vant/weapp/dist/toast/index.wxss create mode 100644 miniprogram/@vant/weapp/dist/toast/toast.js create mode 100644 miniprogram/@vant/weapp/dist/transition/index.js create mode 100644 miniprogram/@vant/weapp/dist/transition/index.json create mode 100644 miniprogram/@vant/weapp/dist/transition/index.wxml create mode 100644 miniprogram/@vant/weapp/dist/transition/index.wxs create mode 100644 miniprogram/@vant/weapp/dist/transition/index.wxss create mode 100644 miniprogram/@vant/weapp/dist/tree-select/index.js create mode 100644 miniprogram/@vant/weapp/dist/tree-select/index.json create mode 100644 miniprogram/@vant/weapp/dist/tree-select/index.wxml create mode 100644 miniprogram/@vant/weapp/dist/tree-select/index.wxs create mode 100644 miniprogram/@vant/weapp/dist/tree-select/index.wxss create mode 100644 miniprogram/@vant/weapp/dist/uploader/index.js create mode 100644 miniprogram/@vant/weapp/dist/uploader/index.json create mode 100644 miniprogram/@vant/weapp/dist/uploader/index.wxml create mode 100644 miniprogram/@vant/weapp/dist/uploader/index.wxs create mode 100644 miniprogram/@vant/weapp/dist/uploader/index.wxss create mode 100644 miniprogram/@vant/weapp/dist/uploader/shared.js create mode 100644 miniprogram/@vant/weapp/dist/uploader/utils.js create mode 100644 miniprogram/@vant/weapp/dist/wxs/add-unit.wxs create mode 100644 miniprogram/@vant/weapp/dist/wxs/array.wxs create mode 100644 miniprogram/@vant/weapp/dist/wxs/bem.wxs create mode 100644 miniprogram/@vant/weapp/dist/wxs/memoize.wxs create mode 100644 miniprogram/@vant/weapp/dist/wxs/object.wxs create mode 100644 miniprogram/@vant/weapp/dist/wxs/style.wxs create mode 100644 miniprogram/@vant/weapp/dist/wxs/utils.wxs create mode 100644 miniprogram/@vant/weapp/lib/action-sheet/index.js create mode 100644 miniprogram/@vant/weapp/lib/action-sheet/index.json create mode 100644 miniprogram/@vant/weapp/lib/action-sheet/index.wxml create mode 100644 miniprogram/@vant/weapp/lib/action-sheet/index.wxss create mode 100644 miniprogram/@vant/weapp/lib/area/index.js create mode 100644 miniprogram/@vant/weapp/lib/area/index.json create mode 100644 miniprogram/@vant/weapp/lib/area/index.wxml create mode 100644 miniprogram/@vant/weapp/lib/area/index.wxs create mode 100644 miniprogram/@vant/weapp/lib/area/index.wxss create mode 100644 miniprogram/@vant/weapp/lib/button/index.js create mode 100644 miniprogram/@vant/weapp/lib/button/index.json create mode 100644 miniprogram/@vant/weapp/lib/button/index.wxml create mode 100644 miniprogram/@vant/weapp/lib/button/index.wxs create mode 100644 miniprogram/@vant/weapp/lib/button/index.wxss create mode 100644 miniprogram/@vant/weapp/lib/calendar/calendar.wxml create mode 100644 miniprogram/@vant/weapp/lib/calendar/components/header/index.js create mode 100644 miniprogram/@vant/weapp/lib/calendar/components/header/index.json create mode 100644 miniprogram/@vant/weapp/lib/calendar/components/header/index.wxml create mode 100644 miniprogram/@vant/weapp/lib/calendar/components/header/index.wxss create mode 100644 miniprogram/@vant/weapp/lib/calendar/components/month/index.js create mode 100644 miniprogram/@vant/weapp/lib/calendar/components/month/index.json create mode 100644 miniprogram/@vant/weapp/lib/calendar/components/month/index.wxml create mode 100644 miniprogram/@vant/weapp/lib/calendar/components/month/index.wxs create mode 100644 miniprogram/@vant/weapp/lib/calendar/components/month/index.wxss create mode 100644 miniprogram/@vant/weapp/lib/calendar/index.js create mode 100644 miniprogram/@vant/weapp/lib/calendar/index.json create mode 100644 miniprogram/@vant/weapp/lib/calendar/index.wxml create mode 100644 miniprogram/@vant/weapp/lib/calendar/index.wxs create mode 100644 miniprogram/@vant/weapp/lib/calendar/index.wxss create mode 100644 miniprogram/@vant/weapp/lib/calendar/utils.js create mode 100644 miniprogram/@vant/weapp/lib/calendar/utils.wxs create mode 100644 miniprogram/@vant/weapp/lib/card/index.js create mode 100644 miniprogram/@vant/weapp/lib/card/index.json create mode 100644 miniprogram/@vant/weapp/lib/card/index.wxml create mode 100644 miniprogram/@vant/weapp/lib/card/index.wxss create mode 100644 miniprogram/@vant/weapp/lib/cell-group/index.js create mode 100644 miniprogram/@vant/weapp/lib/cell-group/index.json create mode 100644 miniprogram/@vant/weapp/lib/cell-group/index.wxml create mode 100644 miniprogram/@vant/weapp/lib/cell-group/index.wxss create mode 100644 miniprogram/@vant/weapp/lib/cell/index.js create mode 100644 miniprogram/@vant/weapp/lib/cell/index.json create mode 100644 miniprogram/@vant/weapp/lib/cell/index.wxml create mode 100644 miniprogram/@vant/weapp/lib/cell/index.wxs create mode 100644 miniprogram/@vant/weapp/lib/cell/index.wxss create mode 100644 miniprogram/@vant/weapp/lib/checkbox-group/index.js create mode 100644 miniprogram/@vant/weapp/lib/checkbox-group/index.json create mode 100644 miniprogram/@vant/weapp/lib/checkbox-group/index.wxml create mode 100644 miniprogram/@vant/weapp/lib/checkbox-group/index.wxss create mode 100644 miniprogram/@vant/weapp/lib/checkbox/index.js create mode 100644 miniprogram/@vant/weapp/lib/checkbox/index.json create mode 100644 miniprogram/@vant/weapp/lib/checkbox/index.wxml create mode 100644 miniprogram/@vant/weapp/lib/checkbox/index.wxs create mode 100644 miniprogram/@vant/weapp/lib/checkbox/index.wxss create mode 100644 miniprogram/@vant/weapp/lib/circle/canvas.js create mode 100644 miniprogram/@vant/weapp/lib/circle/index.js create mode 100644 miniprogram/@vant/weapp/lib/circle/index.json create mode 100644 miniprogram/@vant/weapp/lib/circle/index.wxml create mode 100644 miniprogram/@vant/weapp/lib/circle/index.wxss create mode 100644 miniprogram/@vant/weapp/lib/col/index.js create mode 100644 miniprogram/@vant/weapp/lib/col/index.json create mode 100644 miniprogram/@vant/weapp/lib/col/index.wxml create mode 100644 miniprogram/@vant/weapp/lib/col/index.wxs create mode 100644 miniprogram/@vant/weapp/lib/col/index.wxss create mode 100644 miniprogram/@vant/weapp/lib/collapse-item/animate.js create mode 100644 miniprogram/@vant/weapp/lib/collapse-item/index.js create mode 100644 miniprogram/@vant/weapp/lib/collapse-item/index.json create mode 100644 miniprogram/@vant/weapp/lib/collapse-item/index.wxml create mode 100644 miniprogram/@vant/weapp/lib/collapse-item/index.wxss create mode 100644 miniprogram/@vant/weapp/lib/collapse/index.js create mode 100644 miniprogram/@vant/weapp/lib/collapse/index.json create mode 100644 miniprogram/@vant/weapp/lib/collapse/index.wxml create mode 100644 miniprogram/@vant/weapp/lib/collapse/index.wxss create mode 100644 miniprogram/@vant/weapp/lib/common/color.js create mode 100644 miniprogram/@vant/weapp/lib/common/component.js create mode 100644 miniprogram/@vant/weapp/lib/common/index.wxss create mode 100644 miniprogram/@vant/weapp/lib/common/relation.js create mode 100644 miniprogram/@vant/weapp/lib/common/style/clearfix.wxss create mode 100644 miniprogram/@vant/weapp/lib/common/style/ellipsis.wxss create mode 100644 miniprogram/@vant/weapp/lib/common/style/hairline.wxss create mode 100644 miniprogram/@vant/weapp/lib/common/style/mixins/clearfix.wxss create mode 100644 miniprogram/@vant/weapp/lib/common/style/mixins/ellipsis.wxss create mode 100644 miniprogram/@vant/weapp/lib/common/style/mixins/hairline.wxss create mode 100644 miniprogram/@vant/weapp/lib/common/style/var.wxss create mode 100644 miniprogram/@vant/weapp/lib/common/utils.js create mode 100644 miniprogram/@vant/weapp/lib/common/validator.js create mode 100644 miniprogram/@vant/weapp/lib/common/version.js create mode 100644 miniprogram/@vant/weapp/lib/config-provider/index.js create mode 100644 miniprogram/@vant/weapp/lib/config-provider/index.json create mode 100644 miniprogram/@vant/weapp/lib/config-provider/index.wxml create mode 100644 miniprogram/@vant/weapp/lib/config-provider/index.wxs create mode 100644 miniprogram/@vant/weapp/lib/count-down/index.js create mode 100644 miniprogram/@vant/weapp/lib/count-down/index.json create mode 100644 miniprogram/@vant/weapp/lib/count-down/index.wxml create mode 100644 miniprogram/@vant/weapp/lib/count-down/index.wxss create mode 100644 miniprogram/@vant/weapp/lib/count-down/utils.js create mode 100644 miniprogram/@vant/weapp/lib/datetime-picker/index.js create mode 100644 miniprogram/@vant/weapp/lib/datetime-picker/index.json create mode 100644 miniprogram/@vant/weapp/lib/datetime-picker/index.wxml create mode 100644 miniprogram/@vant/weapp/lib/datetime-picker/index.wxss create mode 100644 miniprogram/@vant/weapp/lib/definitions/index.js create mode 100644 miniprogram/@vant/weapp/lib/dialog/dialog.js create mode 100644 miniprogram/@vant/weapp/lib/dialog/index.js create mode 100644 miniprogram/@vant/weapp/lib/dialog/index.json create mode 100644 miniprogram/@vant/weapp/lib/dialog/index.wxml create mode 100644 miniprogram/@vant/weapp/lib/dialog/index.wxss create mode 100644 miniprogram/@vant/weapp/lib/divider/index.js create mode 100644 miniprogram/@vant/weapp/lib/divider/index.json create mode 100644 miniprogram/@vant/weapp/lib/divider/index.wxml create mode 100644 miniprogram/@vant/weapp/lib/divider/index.wxs create mode 100644 miniprogram/@vant/weapp/lib/divider/index.wxss create mode 100644 miniprogram/@vant/weapp/lib/dropdown-item/index.js create mode 100644 miniprogram/@vant/weapp/lib/dropdown-item/index.json create mode 100644 miniprogram/@vant/weapp/lib/dropdown-item/index.wxml create mode 100644 miniprogram/@vant/weapp/lib/dropdown-item/index.wxss create mode 100644 miniprogram/@vant/weapp/lib/dropdown-item/shared.js create mode 100644 miniprogram/@vant/weapp/lib/dropdown-menu/index.js create mode 100644 miniprogram/@vant/weapp/lib/dropdown-menu/index.json create mode 100644 miniprogram/@vant/weapp/lib/dropdown-menu/index.wxml create mode 100644 miniprogram/@vant/weapp/lib/dropdown-menu/index.wxs create mode 100644 miniprogram/@vant/weapp/lib/dropdown-menu/index.wxss create mode 100644 miniprogram/@vant/weapp/lib/empty/index.js create mode 100644 miniprogram/@vant/weapp/lib/empty/index.json create mode 100644 miniprogram/@vant/weapp/lib/empty/index.wxml create mode 100644 miniprogram/@vant/weapp/lib/empty/index.wxs create mode 100644 miniprogram/@vant/weapp/lib/empty/index.wxss create mode 100644 miniprogram/@vant/weapp/lib/field/index.js create mode 100644 miniprogram/@vant/weapp/lib/field/index.json create mode 100644 miniprogram/@vant/weapp/lib/field/index.wxml create mode 100644 miniprogram/@vant/weapp/lib/field/index.wxs create mode 100644 miniprogram/@vant/weapp/lib/field/index.wxss create mode 100644 miniprogram/@vant/weapp/lib/field/input.wxml create mode 100644 miniprogram/@vant/weapp/lib/field/props.js create mode 100644 miniprogram/@vant/weapp/lib/field/textarea.wxml create mode 100644 miniprogram/@vant/weapp/lib/goods-action-button/index.js create mode 100644 miniprogram/@vant/weapp/lib/goods-action-button/index.json create mode 100644 miniprogram/@vant/weapp/lib/goods-action-button/index.wxml create mode 100644 miniprogram/@vant/weapp/lib/goods-action-button/index.wxss create mode 100644 miniprogram/@vant/weapp/lib/goods-action-icon/index.js create mode 100644 miniprogram/@vant/weapp/lib/goods-action-icon/index.json create mode 100644 miniprogram/@vant/weapp/lib/goods-action-icon/index.wxml create mode 100644 miniprogram/@vant/weapp/lib/goods-action-icon/index.wxss create mode 100644 miniprogram/@vant/weapp/lib/goods-action/index.js create mode 100644 miniprogram/@vant/weapp/lib/goods-action/index.json create mode 100644 miniprogram/@vant/weapp/lib/goods-action/index.wxml create mode 100644 miniprogram/@vant/weapp/lib/goods-action/index.wxss create mode 100644 miniprogram/@vant/weapp/lib/grid-item/index.js create mode 100644 miniprogram/@vant/weapp/lib/grid-item/index.json create mode 100644 miniprogram/@vant/weapp/lib/grid-item/index.wxml create mode 100644 miniprogram/@vant/weapp/lib/grid-item/index.wxs create mode 100644 miniprogram/@vant/weapp/lib/grid-item/index.wxss create mode 100644 miniprogram/@vant/weapp/lib/grid/index.js create mode 100644 miniprogram/@vant/weapp/lib/grid/index.json create mode 100644 miniprogram/@vant/weapp/lib/grid/index.wxml create mode 100644 miniprogram/@vant/weapp/lib/grid/index.wxs create mode 100644 miniprogram/@vant/weapp/lib/grid/index.wxss create mode 100644 miniprogram/@vant/weapp/lib/icon/index.js create mode 100644 miniprogram/@vant/weapp/lib/icon/index.json create mode 100644 miniprogram/@vant/weapp/lib/icon/index.wxml create mode 100644 miniprogram/@vant/weapp/lib/icon/index.wxs create mode 100644 miniprogram/@vant/weapp/lib/icon/index.wxss create mode 100644 miniprogram/@vant/weapp/lib/image/index.js create mode 100644 miniprogram/@vant/weapp/lib/image/index.json create mode 100644 miniprogram/@vant/weapp/lib/image/index.wxml create mode 100644 miniprogram/@vant/weapp/lib/image/index.wxs create mode 100644 miniprogram/@vant/weapp/lib/image/index.wxss create mode 100644 miniprogram/@vant/weapp/lib/index-anchor/index.js create mode 100644 miniprogram/@vant/weapp/lib/index-anchor/index.json create mode 100644 miniprogram/@vant/weapp/lib/index-anchor/index.wxml create mode 100644 miniprogram/@vant/weapp/lib/index-anchor/index.wxss create mode 100644 miniprogram/@vant/weapp/lib/index-bar/index.js create mode 100644 miniprogram/@vant/weapp/lib/index-bar/index.json create mode 100644 miniprogram/@vant/weapp/lib/index-bar/index.wxml create mode 100644 miniprogram/@vant/weapp/lib/index-bar/index.wxss create mode 100644 miniprogram/@vant/weapp/lib/info/index.js create mode 100644 miniprogram/@vant/weapp/lib/info/index.json create mode 100644 miniprogram/@vant/weapp/lib/info/index.wxml create mode 100644 miniprogram/@vant/weapp/lib/info/index.wxss create mode 100644 miniprogram/@vant/weapp/lib/loading/index.js create mode 100644 miniprogram/@vant/weapp/lib/loading/index.json create mode 100644 miniprogram/@vant/weapp/lib/loading/index.wxml create mode 100644 miniprogram/@vant/weapp/lib/loading/index.wxs create mode 100644 miniprogram/@vant/weapp/lib/loading/index.wxss create mode 100644 miniprogram/@vant/weapp/lib/mixins/basic.js create mode 100644 miniprogram/@vant/weapp/lib/mixins/button.js create mode 100644 miniprogram/@vant/weapp/lib/mixins/link.js create mode 100644 miniprogram/@vant/weapp/lib/mixins/page-scroll.js create mode 100644 miniprogram/@vant/weapp/lib/mixins/touch.js create mode 100644 miniprogram/@vant/weapp/lib/mixins/transition.js create mode 100644 miniprogram/@vant/weapp/lib/nav-bar/index.js create mode 100644 miniprogram/@vant/weapp/lib/nav-bar/index.json create mode 100644 miniprogram/@vant/weapp/lib/nav-bar/index.wxml create mode 100644 miniprogram/@vant/weapp/lib/nav-bar/index.wxs create mode 100644 miniprogram/@vant/weapp/lib/nav-bar/index.wxss create mode 100644 miniprogram/@vant/weapp/lib/notice-bar/index.js create mode 100644 miniprogram/@vant/weapp/lib/notice-bar/index.json create mode 100644 miniprogram/@vant/weapp/lib/notice-bar/index.wxml create mode 100644 miniprogram/@vant/weapp/lib/notice-bar/index.wxs create mode 100644 miniprogram/@vant/weapp/lib/notice-bar/index.wxss create mode 100644 miniprogram/@vant/weapp/lib/notify/index.js create mode 100644 miniprogram/@vant/weapp/lib/notify/index.json create mode 100644 miniprogram/@vant/weapp/lib/notify/index.wxml create mode 100644 miniprogram/@vant/weapp/lib/notify/index.wxs create mode 100644 miniprogram/@vant/weapp/lib/notify/index.wxss create mode 100644 miniprogram/@vant/weapp/lib/notify/notify.js create mode 100644 miniprogram/@vant/weapp/lib/overlay/index.js create mode 100644 miniprogram/@vant/weapp/lib/overlay/index.json create mode 100644 miniprogram/@vant/weapp/lib/overlay/index.wxml create mode 100644 miniprogram/@vant/weapp/lib/overlay/index.wxss create mode 100644 miniprogram/@vant/weapp/lib/panel/index.js create mode 100644 miniprogram/@vant/weapp/lib/panel/index.json create mode 100644 miniprogram/@vant/weapp/lib/panel/index.wxml create mode 100644 miniprogram/@vant/weapp/lib/panel/index.wxss create mode 100644 miniprogram/@vant/weapp/lib/picker-column/index.js create mode 100644 miniprogram/@vant/weapp/lib/picker-column/index.json create mode 100644 miniprogram/@vant/weapp/lib/picker-column/index.wxml create mode 100644 miniprogram/@vant/weapp/lib/picker-column/index.wxs create mode 100644 miniprogram/@vant/weapp/lib/picker-column/index.wxss create mode 100644 miniprogram/@vant/weapp/lib/picker/index.js create mode 100644 miniprogram/@vant/weapp/lib/picker/index.json create mode 100644 miniprogram/@vant/weapp/lib/picker/index.wxml create mode 100644 miniprogram/@vant/weapp/lib/picker/index.wxs create mode 100644 miniprogram/@vant/weapp/lib/picker/index.wxss create mode 100644 miniprogram/@vant/weapp/lib/picker/shared.js create mode 100644 miniprogram/@vant/weapp/lib/picker/toolbar.wxml create mode 100644 miniprogram/@vant/weapp/lib/popup/index.js create mode 100644 miniprogram/@vant/weapp/lib/popup/index.json create mode 100644 miniprogram/@vant/weapp/lib/popup/index.wxml create mode 100644 miniprogram/@vant/weapp/lib/popup/index.wxs create mode 100644 miniprogram/@vant/weapp/lib/popup/index.wxss create mode 100644 miniprogram/@vant/weapp/lib/progress/index.js create mode 100644 miniprogram/@vant/weapp/lib/progress/index.json create mode 100644 miniprogram/@vant/weapp/lib/progress/index.wxml create mode 100644 miniprogram/@vant/weapp/lib/progress/index.wxs create mode 100644 miniprogram/@vant/weapp/lib/progress/index.wxss create mode 100644 miniprogram/@vant/weapp/lib/radio-group/index.js create mode 100644 miniprogram/@vant/weapp/lib/radio-group/index.json create mode 100644 miniprogram/@vant/weapp/lib/radio-group/index.wxml create mode 100644 miniprogram/@vant/weapp/lib/radio-group/index.wxss create mode 100644 miniprogram/@vant/weapp/lib/radio/index.js create mode 100644 miniprogram/@vant/weapp/lib/radio/index.json create mode 100644 miniprogram/@vant/weapp/lib/radio/index.wxml create mode 100644 miniprogram/@vant/weapp/lib/radio/index.wxs create mode 100644 miniprogram/@vant/weapp/lib/radio/index.wxss create mode 100644 miniprogram/@vant/weapp/lib/rate/index.js create mode 100644 miniprogram/@vant/weapp/lib/rate/index.json create mode 100644 miniprogram/@vant/weapp/lib/rate/index.wxml create mode 100644 miniprogram/@vant/weapp/lib/rate/index.wxss create mode 100644 miniprogram/@vant/weapp/lib/row/index.js create mode 100644 miniprogram/@vant/weapp/lib/row/index.json create mode 100644 miniprogram/@vant/weapp/lib/row/index.wxml create mode 100644 miniprogram/@vant/weapp/lib/row/index.wxs create mode 100644 miniprogram/@vant/weapp/lib/row/index.wxss create mode 100644 miniprogram/@vant/weapp/lib/search/index.js create mode 100644 miniprogram/@vant/weapp/lib/search/index.json create mode 100644 miniprogram/@vant/weapp/lib/search/index.wxml create mode 100644 miniprogram/@vant/weapp/lib/search/index.wxss create mode 100644 miniprogram/@vant/weapp/lib/share-sheet/index.js create mode 100644 miniprogram/@vant/weapp/lib/share-sheet/index.json create mode 100644 miniprogram/@vant/weapp/lib/share-sheet/index.wxml create mode 100644 miniprogram/@vant/weapp/lib/share-sheet/index.wxs create mode 100644 miniprogram/@vant/weapp/lib/share-sheet/index.wxss create mode 100644 miniprogram/@vant/weapp/lib/share-sheet/options.js create mode 100644 miniprogram/@vant/weapp/lib/share-sheet/options.json create mode 100644 miniprogram/@vant/weapp/lib/share-sheet/options.wxml create mode 100644 miniprogram/@vant/weapp/lib/share-sheet/options.wxs create mode 100644 miniprogram/@vant/weapp/lib/share-sheet/options.wxss create mode 100644 miniprogram/@vant/weapp/lib/sidebar-item/index.js create mode 100644 miniprogram/@vant/weapp/lib/sidebar-item/index.json create mode 100644 miniprogram/@vant/weapp/lib/sidebar-item/index.wxml create mode 100644 miniprogram/@vant/weapp/lib/sidebar-item/index.wxss create mode 100644 miniprogram/@vant/weapp/lib/sidebar/index.js create mode 100644 miniprogram/@vant/weapp/lib/sidebar/index.json create mode 100644 miniprogram/@vant/weapp/lib/sidebar/index.wxml create mode 100644 miniprogram/@vant/weapp/lib/sidebar/index.wxss create mode 100644 miniprogram/@vant/weapp/lib/skeleton/index.js create mode 100644 miniprogram/@vant/weapp/lib/skeleton/index.json create mode 100644 miniprogram/@vant/weapp/lib/skeleton/index.wxml create mode 100644 miniprogram/@vant/weapp/lib/skeleton/index.wxss create mode 100644 miniprogram/@vant/weapp/lib/slider/index.js create mode 100644 miniprogram/@vant/weapp/lib/slider/index.json create mode 100644 miniprogram/@vant/weapp/lib/slider/index.wxml create mode 100644 miniprogram/@vant/weapp/lib/slider/index.wxs create mode 100644 miniprogram/@vant/weapp/lib/slider/index.wxss create mode 100644 miniprogram/@vant/weapp/lib/stepper/index.js create mode 100644 miniprogram/@vant/weapp/lib/stepper/index.json create mode 100644 miniprogram/@vant/weapp/lib/stepper/index.wxml create mode 100644 miniprogram/@vant/weapp/lib/stepper/index.wxs create mode 100644 miniprogram/@vant/weapp/lib/stepper/index.wxss create mode 100644 miniprogram/@vant/weapp/lib/steps/index.js create mode 100644 miniprogram/@vant/weapp/lib/steps/index.json create mode 100644 miniprogram/@vant/weapp/lib/steps/index.wxml create mode 100644 miniprogram/@vant/weapp/lib/steps/index.wxss create mode 100644 miniprogram/@vant/weapp/lib/sticky/index.js create mode 100644 miniprogram/@vant/weapp/lib/sticky/index.json create mode 100644 miniprogram/@vant/weapp/lib/sticky/index.wxml create mode 100644 miniprogram/@vant/weapp/lib/sticky/index.wxs create mode 100644 miniprogram/@vant/weapp/lib/sticky/index.wxss create mode 100644 miniprogram/@vant/weapp/lib/submit-bar/index.js create mode 100644 miniprogram/@vant/weapp/lib/submit-bar/index.json create mode 100644 miniprogram/@vant/weapp/lib/submit-bar/index.wxml create mode 100644 miniprogram/@vant/weapp/lib/submit-bar/index.wxss create mode 100644 miniprogram/@vant/weapp/lib/swipe-cell/index.js create mode 100644 miniprogram/@vant/weapp/lib/swipe-cell/index.json create mode 100644 miniprogram/@vant/weapp/lib/swipe-cell/index.wxml create mode 100644 miniprogram/@vant/weapp/lib/swipe-cell/index.wxss create mode 100644 miniprogram/@vant/weapp/lib/switch/index.js create mode 100644 miniprogram/@vant/weapp/lib/switch/index.json create mode 100644 miniprogram/@vant/weapp/lib/switch/index.wxml create mode 100644 miniprogram/@vant/weapp/lib/switch/index.wxs create mode 100644 miniprogram/@vant/weapp/lib/switch/index.wxss create mode 100644 miniprogram/@vant/weapp/lib/tab/index.js create mode 100644 miniprogram/@vant/weapp/lib/tab/index.json create mode 100644 miniprogram/@vant/weapp/lib/tab/index.wxml create mode 100644 miniprogram/@vant/weapp/lib/tab/index.wxss create mode 100644 miniprogram/@vant/weapp/lib/tabbar-item/index.js create mode 100644 miniprogram/@vant/weapp/lib/tabbar-item/index.json create mode 100644 miniprogram/@vant/weapp/lib/tabbar-item/index.wxml create mode 100644 miniprogram/@vant/weapp/lib/tabbar-item/index.wxss create mode 100644 miniprogram/@vant/weapp/lib/tabbar/index.js create mode 100644 miniprogram/@vant/weapp/lib/tabbar/index.json create mode 100644 miniprogram/@vant/weapp/lib/tabbar/index.wxml create mode 100644 miniprogram/@vant/weapp/lib/tabbar/index.wxss create mode 100644 miniprogram/@vant/weapp/lib/tabs/index.js create mode 100644 miniprogram/@vant/weapp/lib/tabs/index.json create mode 100644 miniprogram/@vant/weapp/lib/tabs/index.wxml create mode 100644 miniprogram/@vant/weapp/lib/tabs/index.wxs create mode 100644 miniprogram/@vant/weapp/lib/tabs/index.wxss create mode 100644 miniprogram/@vant/weapp/lib/tag/index.js create mode 100644 miniprogram/@vant/weapp/lib/tag/index.json create mode 100644 miniprogram/@vant/weapp/lib/tag/index.wxml create mode 100644 miniprogram/@vant/weapp/lib/tag/index.wxs create mode 100644 miniprogram/@vant/weapp/lib/tag/index.wxss create mode 100644 miniprogram/@vant/weapp/lib/toast/index.js create mode 100644 miniprogram/@vant/weapp/lib/toast/index.json create mode 100644 miniprogram/@vant/weapp/lib/toast/index.wxml create mode 100644 miniprogram/@vant/weapp/lib/toast/index.wxss create mode 100644 miniprogram/@vant/weapp/lib/toast/toast.js create mode 100644 miniprogram/@vant/weapp/lib/transition/index.js create mode 100644 miniprogram/@vant/weapp/lib/transition/index.json create mode 100644 miniprogram/@vant/weapp/lib/transition/index.wxml create mode 100644 miniprogram/@vant/weapp/lib/transition/index.wxs create mode 100644 miniprogram/@vant/weapp/lib/transition/index.wxss create mode 100644 miniprogram/@vant/weapp/lib/tree-select/index.js create mode 100644 miniprogram/@vant/weapp/lib/tree-select/index.json create mode 100644 miniprogram/@vant/weapp/lib/tree-select/index.wxml create mode 100644 miniprogram/@vant/weapp/lib/tree-select/index.wxs create mode 100644 miniprogram/@vant/weapp/lib/tree-select/index.wxss create mode 100644 miniprogram/@vant/weapp/lib/uploader/index.js create mode 100644 miniprogram/@vant/weapp/lib/uploader/index.json create mode 100644 miniprogram/@vant/weapp/lib/uploader/index.wxml create mode 100644 miniprogram/@vant/weapp/lib/uploader/index.wxs create mode 100644 miniprogram/@vant/weapp/lib/uploader/index.wxss create mode 100644 miniprogram/@vant/weapp/lib/uploader/shared.js create mode 100644 miniprogram/@vant/weapp/lib/uploader/utils.js create mode 100644 miniprogram/@vant/weapp/lib/wxs/add-unit.wxs create mode 100644 miniprogram/@vant/weapp/lib/wxs/array.wxs create mode 100644 miniprogram/@vant/weapp/lib/wxs/bem.wxs create mode 100644 miniprogram/@vant/weapp/lib/wxs/memoize.wxs create mode 100644 miniprogram/@vant/weapp/lib/wxs/object.wxs create mode 100644 miniprogram/@vant/weapp/lib/wxs/style.wxs create mode 100644 miniprogram/@vant/weapp/lib/wxs/utils.wxs create mode 100644 miniprogram/@vant/weapp/package.json create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/action-sheet/index.js create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/action-sheet/index.json create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/action-sheet/index.wxml create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/action-sheet/index.wxss create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/area/index.js create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/area/index.json create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/area/index.wxml create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/area/index.wxs create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/area/index.wxss create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/button/index.js create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/button/index.json create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/button/index.wxml create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/button/index.wxs create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/button/index.wxss create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/calendar/calendar.wxml create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/calendar/components/header/index.js create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/calendar/components/header/index.json create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/calendar/components/header/index.wxml create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/calendar/components/header/index.wxss create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/calendar/components/month/index.js create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/calendar/components/month/index.json create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/calendar/components/month/index.wxml create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/calendar/components/month/index.wxs create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/calendar/components/month/index.wxss create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/calendar/index.js create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/calendar/index.json create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/calendar/index.wxml create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/calendar/index.wxs create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/calendar/index.wxss create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/calendar/utils.js create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/calendar/utils.wxs create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/card/index.js create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/card/index.json create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/card/index.wxml create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/card/index.wxss create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/cell-group/index.js create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/cell-group/index.json create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/cell-group/index.wxml create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/cell-group/index.wxss create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/cell/index.js create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/cell/index.json create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/cell/index.wxml create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/cell/index.wxs create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/cell/index.wxss create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/checkbox-group/index.js create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/checkbox-group/index.json create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/checkbox-group/index.wxml create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/checkbox-group/index.wxss create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/checkbox/index.js create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/checkbox/index.json create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/checkbox/index.wxml create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/checkbox/index.wxs create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/checkbox/index.wxss create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/circle/canvas.js create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/circle/index.js create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/circle/index.json create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/circle/index.wxml create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/circle/index.wxss create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/col/index.js create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/col/index.json create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/col/index.wxml create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/col/index.wxs create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/col/index.wxss create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/collapse-item/animate.js create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/collapse-item/index.js create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/collapse-item/index.json create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/collapse-item/index.wxml create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/collapse-item/index.wxss create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/collapse/index.js create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/collapse/index.json create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/collapse/index.wxml create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/collapse/index.wxss create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/common/color.js create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/common/component.js create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/common/index.wxss create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/common/relation.js create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/common/style/clearfix.wxss create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/common/style/ellipsis.wxss create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/common/style/hairline.wxss create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/common/style/mixins/clearfix.wxss create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/common/style/mixins/ellipsis.wxss create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/common/style/mixins/hairline.wxss create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/common/style/var.wxss create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/common/utils.js create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/common/validator.js create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/common/version.js create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/config-provider/index.js create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/config-provider/index.json create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/config-provider/index.wxml create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/config-provider/index.wxs create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/count-down/index.js create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/count-down/index.json create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/count-down/index.wxml create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/count-down/index.wxss create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/count-down/utils.js create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/datetime-picker/index.js create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/datetime-picker/index.json create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/datetime-picker/index.wxml create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/datetime-picker/index.wxss create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/definitions/index.js create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/dialog/dialog.js create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/dialog/index.js create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/dialog/index.json create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/dialog/index.wxml create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/dialog/index.wxss create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/divider/index.js create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/divider/index.json create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/divider/index.wxml create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/divider/index.wxs create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/divider/index.wxss create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/dropdown-item/index.js create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/dropdown-item/index.json create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/dropdown-item/index.wxml create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/dropdown-item/index.wxss create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/dropdown-item/shared.js create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/dropdown-menu/index.js create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/dropdown-menu/index.json create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/dropdown-menu/index.wxml create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/dropdown-menu/index.wxs create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/dropdown-menu/index.wxss create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/empty/index.js create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/empty/index.json create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/empty/index.wxml create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/empty/index.wxs create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/empty/index.wxss create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/field/index.js create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/field/index.json create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/field/index.wxml create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/field/index.wxs create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/field/index.wxss create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/field/input.wxml create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/field/props.js create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/field/textarea.wxml create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/goods-action-button/index.js create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/goods-action-button/index.json create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/goods-action-button/index.wxml create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/goods-action-button/index.wxss create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/goods-action-icon/index.js create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/goods-action-icon/index.json create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/goods-action-icon/index.wxml create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/goods-action-icon/index.wxss create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/goods-action/index.js create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/goods-action/index.json create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/goods-action/index.wxml create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/goods-action/index.wxss create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/grid-item/index.js create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/grid-item/index.json create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/grid-item/index.wxml create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/grid-item/index.wxs create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/grid-item/index.wxss create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/grid/index.js create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/grid/index.json create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/grid/index.wxml create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/grid/index.wxs create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/grid/index.wxss create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/icon/index.js create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/icon/index.json create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/icon/index.wxml create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/icon/index.wxs create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/icon/index.wxss create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/image/index.js create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/image/index.json create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/image/index.wxml create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/image/index.wxs create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/image/index.wxss create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/index-anchor/index.js create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/index-anchor/index.json create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/index-anchor/index.wxml create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/index-anchor/index.wxss create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/index-bar/index.js create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/index-bar/index.json create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/index-bar/index.wxml create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/index-bar/index.wxss create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/info/index.js create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/info/index.json create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/info/index.wxml create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/info/index.wxss create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/loading/index.js create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/loading/index.json create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/loading/index.wxml create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/loading/index.wxs create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/loading/index.wxss create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/mixins/basic.js create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/mixins/button.js create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/mixins/link.js create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/mixins/page-scroll.js create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/mixins/touch.js create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/mixins/transition.js create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/nav-bar/index.js create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/nav-bar/index.json create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/nav-bar/index.wxml create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/nav-bar/index.wxs create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/nav-bar/index.wxss create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/notice-bar/index.js create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/notice-bar/index.json create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/notice-bar/index.wxml create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/notice-bar/index.wxs create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/notice-bar/index.wxss create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/notify/index.js create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/notify/index.json create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/notify/index.wxml create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/notify/index.wxs create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/notify/index.wxss create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/notify/notify.js create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/overlay/index.js create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/overlay/index.json create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/overlay/index.wxml create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/overlay/index.wxss create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/panel/index.js create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/panel/index.json create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/panel/index.wxml create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/panel/index.wxss create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/picker-column/index.js create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/picker-column/index.json create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/picker-column/index.wxml create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/picker-column/index.wxs create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/picker-column/index.wxss create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/picker/index.js create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/picker/index.json create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/picker/index.wxml create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/picker/index.wxs create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/picker/index.wxss create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/picker/shared.js create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/picker/toolbar.wxml create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/popup/index.js create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/popup/index.json create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/popup/index.wxml create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/popup/index.wxs create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/popup/index.wxss create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/progress/index.js create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/progress/index.json create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/progress/index.wxml create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/progress/index.wxs create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/progress/index.wxss create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/radio-group/index.js create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/radio-group/index.json create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/radio-group/index.wxml create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/radio-group/index.wxss create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/radio/index.js create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/radio/index.json create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/radio/index.wxml create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/radio/index.wxs create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/radio/index.wxss create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/rate/index.js create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/rate/index.json create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/rate/index.wxml create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/rate/index.wxss create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/row/index.js create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/row/index.json create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/row/index.wxml create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/row/index.wxs create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/row/index.wxss create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/search/index.js create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/search/index.json create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/search/index.wxml create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/search/index.wxss create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/share-sheet/index.js create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/share-sheet/index.json create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/share-sheet/index.wxml create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/share-sheet/index.wxs create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/share-sheet/index.wxss create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/share-sheet/options.js create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/share-sheet/options.json create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/share-sheet/options.wxml create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/share-sheet/options.wxs create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/share-sheet/options.wxss create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/sidebar-item/index.js create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/sidebar-item/index.json create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/sidebar-item/index.wxml create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/sidebar-item/index.wxss create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/sidebar/index.js create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/sidebar/index.json create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/sidebar/index.wxml create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/sidebar/index.wxss create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/skeleton/index.js create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/skeleton/index.json create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/skeleton/index.wxml create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/skeleton/index.wxss create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/slider/index.js create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/slider/index.json create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/slider/index.wxml create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/slider/index.wxs create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/slider/index.wxss create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/stepper/index.js create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/stepper/index.json create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/stepper/index.wxml create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/stepper/index.wxs create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/stepper/index.wxss create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/steps/index.js create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/steps/index.json create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/steps/index.wxml create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/steps/index.wxss create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/sticky/index.js create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/sticky/index.json create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/sticky/index.wxml create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/sticky/index.wxs create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/sticky/index.wxss create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/submit-bar/index.js create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/submit-bar/index.json create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/submit-bar/index.wxml create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/submit-bar/index.wxss create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/swipe-cell/index.js create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/swipe-cell/index.json create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/swipe-cell/index.wxml create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/swipe-cell/index.wxss create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/switch/index.js create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/switch/index.json create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/switch/index.wxml create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/switch/index.wxs create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/switch/index.wxss create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/tab/index.js create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/tab/index.json create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/tab/index.wxml create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/tab/index.wxss create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/tabbar-item/index.js create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/tabbar-item/index.json create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/tabbar-item/index.wxml create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/tabbar-item/index.wxss create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/tabbar/index.js create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/tabbar/index.json create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/tabbar/index.wxml create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/tabbar/index.wxss create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/tabs/index.js create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/tabs/index.json create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/tabs/index.wxml create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/tabs/index.wxs create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/tabs/index.wxss create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/tag/index.js create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/tag/index.json create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/tag/index.wxml create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/tag/index.wxs create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/tag/index.wxss create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/toast/index.js create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/toast/index.json create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/toast/index.wxml create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/toast/index.wxss create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/toast/toast.js create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/transition/index.js create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/transition/index.json create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/transition/index.wxml create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/transition/index.wxs create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/transition/index.wxss create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/tree-select/index.js create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/tree-select/index.json create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/tree-select/index.wxml create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/tree-select/index.wxs create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/tree-select/index.wxss create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/uploader/index.js create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/uploader/index.json create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/uploader/index.wxml create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/uploader/index.wxs create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/uploader/index.wxss create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/uploader/shared.js create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/uploader/utils.js create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/wxs/add-unit.wxs create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/wxs/array.wxs create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/wxs/bem.wxs create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/wxs/memoize.wxs create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/wxs/object.wxs create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/wxs/style.wxs create mode 100644 miniprogram/miniprogram_npm/@vant/weapp/wxs/utils.wxs create mode 100644 package-lock.json create mode 100644 package.json create mode 100644 pages/activity/activity.js create mode 100644 pages/activity/activity.json create mode 100644 pages/activity/activity.wxml create mode 100644 pages/activity/activity.wxss create mode 100644 pages/appointmentDetails/appointmentDetails.js create mode 100644 pages/appointmentDetails/appointmentDetails.json create mode 100644 pages/appointmentDetails/appointmentDetails.wxml create mode 100644 pages/appointmentDetails/appointmentDetails.wxss create mode 100644 pages/cardBag/cardBag.js create mode 100644 pages/cardBag/cardBag.wxml create mode 100644 pages/image/Bargain.png create mode 100644 pages/image/Collage.png create mode 100644 pages/image/Collection.png create mode 100644 pages/image/Hairdressing.png create mode 100644 pages/image/Micro.png create mode 100644 pages/image/Shaping.png create mode 100644 pages/image/Skin.png create mode 100644 pages/image/Star.png create mode 100644 pages/image/White.png create mode 100644 pages/image/address.png create mode 100644 pages/image/antifading.png create mode 100644 pages/image/beauty.png create mode 100644 pages/image/bifu.png create mode 100644 pages/image/caitiao.png create mode 100644 pages/image/cardbag.png create mode 100644 pages/image/cardbag_a.png create mode 100644 pages/image/clock.png create mode 100644 pages/image/colleme.png create mode 100644 pages/image/cosmetology.png create mode 100644 pages/image/erweima.png create mode 100644 pages/image/erweimama.png create mode 100644 pages/image/expired.png create mode 100644 pages/image/goru.png create mode 100644 pages/image/home_bj.png create mode 100644 pages/image/hospital.png create mode 100644 pages/image/image_left.png create mode 100644 pages/image/image_right.png create mode 100644 pages/image/income.png create mode 100644 pages/image/income_a.png create mode 100644 pages/image/jigou.png create mode 100644 pages/image/left.png create mode 100644 pages/image/manicure.png create mode 100644 pages/image/max.png create mode 100644 pages/image/max_a.png create mode 100644 pages/image/medical.png create mode 100644 pages/image/money.png create mode 100644 pages/image/my.png create mode 100644 pages/image/my_a.png create mode 100644 pages/image/needle.png create mode 100644 pages/image/notice.png create mode 100644 pages/image/null.png create mode 100644 pages/image/one.png create mode 100644 pages/image/order.png create mode 100644 pages/image/order_a.png create mode 100644 pages/image/phone.png create mode 100644 pages/image/pintuan.png create mode 100644 pages/image/qingyan.png create mode 100644 pages/image/right.png create mode 100644 pages/image/right1.png create mode 100644 pages/image/save.png create mode 100644 pages/image/service.png create mode 100644 pages/image/service_bg.png create mode 100644 pages/image/shoucang.png create mode 100644 pages/image/site.png create mode 100644 pages/image/success.png create mode 100644 pages/image/tuiguang_bg.jpg create mode 100644 pages/image/tuiguang_bj.png create mode 100644 pages/image/tuiguang_i.png create mode 100644 pages/image/userimg.png create mode 100644 pages/image/wallet.png create mode 100644 pages/image/yixing.png create mode 100644 pages/index/index.js create mode 100644 pages/index/index.json create mode 100644 pages/index/index.wxml create mode 100644 pages/index/index.wxss create mode 100644 pages/institutions/institutions.js create mode 100644 pages/institutions/institutions.json create mode 100644 pages/institutions/institutions.wxml create mode 100644 pages/institutions/institutions.wxss create mode 100644 pages/login/login.js create mode 100644 pages/login/login.json create mode 100644 pages/login/login.wxml create mode 100644 pages/login/login.wxss create mode 100644 pages/mechanism/mechanism.js create mode 100644 pages/mechanism/mechanism.json create mode 100644 pages/mechanism/mechanism.wxml create mode 100644 pages/mechanism/mechanism.wxss create mode 100644 pages/my/my.js create mode 100644 pages/my/my.json create mode 100644 pages/my/my.wxml create mode 100644 pages/my/my.wxss create mode 100644 pages/myshoucang/myorderdetail.js create mode 100644 pages/myshoucang/myorderdetail.json create mode 100644 pages/myshoucang/myorderdetail.wxml create mode 100644 pages/myshoucang/myorderdetail.wxss create mode 100644 pages/myshoucang/myshoucang_index.js create mode 100644 pages/myshoucang/myshoucang_index.json create mode 100644 pages/myshoucang/myshoucang_index.wxml create mode 100644 pages/myshoucang/myshoucang_index.wxss create mode 100644 pages/order/order.js create mode 100644 pages/order/order.json create mode 100644 pages/order/order.wxml create mode 100644 pages/order/order.wxss create mode 100644 pages/order/re_orderdetail.js create mode 100644 pages/order/re_orderdetail.json create mode 100644 pages/order/re_orderdetail.wxml create mode 100644 pages/order/re_orderdetail.wxss create mode 100644 pages/orderdetail/orderdetail.js create mode 100644 pages/orderdetail/orderdetail.json create mode 100644 pages/orderdetail/orderdetail.wxml create mode 100644 pages/orderdetail/orderdetail.wxss create mode 100644 pages/paysuccess/paysuccess.js create mode 100644 pages/paysuccess/paysuccess.json create mode 100644 pages/paysuccess/paysuccess.wxml create mode 100644 pages/paysuccess/paysuccess.wxss create mode 100644 pages/reforderdetail/reforderdetail.js create mode 100644 pages/reforderdetail/reforderdetail.json create mode 100644 pages/reforderdetail/reforderdetail.wxml create mode 100644 pages/reforderdetail/reforderdetail.wxss create mode 100644 pages/refund/refund.js create mode 100644 pages/refund/refund.json create mode 100644 pages/refund/refund.wxml create mode 100644 pages/refund/refund.wxss create mode 100644 pages/switchcity/switchcity.js create mode 100644 pages/tuiguang/extensionInfor.js create mode 100644 pages/tuiguang/extensionInfor.json create mode 100644 pages/tuiguang/extensionInfor.wxml create mode 100644 pages/tuiguang/extensionInfor.wxss create mode 100644 pages/tuiguang/tuiguang.js create mode 100644 pages/tuiguang/tuiguang.json create mode 100644 pages/tuiguang/tuiguang.wxml create mode 100644 pages/tuiguang/tuiguang.wxss create mode 100644 pages/wodeqianbao/qianbao.js create mode 100644 pages/wodeqianbao/qianbao.json create mode 100644 pages/wodeqianbao/qianbao.wxml create mode 100644 pages/wodeqianbao/qianbao.wxss create mode 100644 project.config.json create mode 100644 project.private.config.json create mode 100644 shopping/image/Alipay.png create mode 100644 shopping/image/WeChat.png create mode 100644 shopping/image/back_home.png create mode 100644 shopping/image/userimg.png create mode 100644 shopping/pages/goddess/goddess.js create mode 100644 shopping/pages/goddess/goddess.json create mode 100644 shopping/pages/goddess/goddess.wxml create mode 100644 shopping/pages/goddess/goddess.wxss create mode 100644 shopping/pages/payment/payment.js create mode 100644 shopping/pages/payment/payment.json create mode 100644 shopping/pages/payment/payment.wxml create mode 100644 shopping/pages/payment/payment.wxss create mode 100644 shopping/pages/paysuccess/paysuccess.js create mode 100644 shopping/pages/paysuccess/paysuccess.json create mode 100644 shopping/pages/paysuccess/paysuccess.wxml create mode 100644 shopping/pages/paysuccess/paysuccess.wxss create mode 100644 shopping/pages/withdrawal/withdrawal.js create mode 100644 shopping/pages/withdrawal/withdrawal.json create mode 100644 shopping/pages/withdrawal/withdrawal.wxml create mode 100644 shopping/pages/withdrawal/withdrawal.wxss create mode 100644 sitemap.json create mode 100644 subPackages/pages/withdrawal/withdrawal.js create mode 100644 subPackages/pages/withdrawal/withdrawal.json create mode 100644 subPackages/pages/withdrawal/withdrawal.wxml create mode 100644 subPackages/pages/withdrawal/withdrawal.wxss create mode 100644 temp.json create mode 100644 utils/dateTimePicker.js create mode 100644 utils/shareLogo.js create mode 100644 utils/util.js diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..26d3352 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,3 @@ +# Default ignored files +/shelf/ +/workspace.xml diff --git a/.idea/coupon.iml b/.idea/coupon.iml new file mode 100644 index 0000000..d6ebd48 --- /dev/null +++ b/.idea/coupon.iml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..e208459 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..6334bd1 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..35eb1dd --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/app.js b/app.js new file mode 100644 index 0000000..fbe54e1 --- /dev/null +++ b/app.js @@ -0,0 +1,94 @@ +// app.js +App({ + onLaunch() { + const uid=wx.getStorageSync('uid') +     const token=wx.getStorageSync('token') +     if(uid){ +       this.globalData.uid = uid  +     } +     if(token){ +       this.globalData.token = token +     } + }, + globalData: { + userInfo: null, + encryptedData:'', + iv:'', + code:'', + + url:'http://chengjie468.gnway.cc', + + phone:'', + uid:'', + sessionKey:'', + version_number:'1.0.0', + // domain:"http://192.168.1.215" + domain:"https://www.zoowoo.net", + domaintwo:"http://106.52.204.179/api"//线上库 + }, + console:function( msg ){ + console.log( msg); +}, +tip:function( params ){ + var that = this; + var title = params.hasOwnProperty('title')?params['title']:'提示您'; + var content = params.hasOwnProperty('content')?params['content']:''; + wx.showModal({ + title: title, + content: content, + success: function(res) { + if ( res.confirm ) {//点击确定 + if( params.hasOwnProperty('cb_confirm') && typeof( params.cb_confirm ) == "function" ){ + params.cb_confirm(); + } + }else{//点击否 + if( params.hasOwnProperty('cb_cancel') && typeof( params.cb_cancel ) == "function" ){ + params.cb_cancel(); + } + } + } + }) +}, +getRequestHeader:function(){ + return { + 'content-type': 'application/x-www-form-urlencoded', + 'Authorization': 'Bearer '+this.getCache( "token" ) + } +}, +buildUrl:function( path,params ){ + var url = this.globalData.domain + path; + var _paramUrl = ""; + if( params ){ + _paramUrl = Object.keys( params ).map( function( k ){ + return [ encodeURIComponent( k ),encodeURIComponent( params[ k ] ) ].join("="); + }).join("&"); + _paramUrl = "?" + _paramUrl; + } + return url + _paramUrl; +}, +buildUrltwo:function( path,params ){ + var url = this.globalData.domaintwo + path; + var _paramUrl = ""; + if( params ){ + _paramUrl = Object.keys( params ).map( function( k ){ + return [ encodeURIComponent( k ),encodeURIComponent( params[ k ] ) ].join("="); + }).join("&"); + _paramUrl = "?" + _paramUrl; + } + return url + _paramUrl; +}, +getCache:function( key ){ + var value = undefined; + try { + value = wx.getStorageSync( key ); + } catch (e) { + } + return value; +}, +setCache:function(key,value){ + wx.setStorage({ + key:key, + data:value + }); +} +}) diff --git a/app.json b/app.json new file mode 100644 index 0000000..0ca78bf --- /dev/null +++ b/app.json @@ -0,0 +1,74 @@ +{ + "pages": [ + "pages/index/index", + "pages/tuiguang/extensionInfor", + + "pages/tuiguang/tuiguang", + + "pages/institutions/institutions", + "pages/cardBag/cardBag", + "pages/appointmentDetails/appointmentDetails", + "pages/my/my", + "pages/login/login", + "pages/order/order", + "pages/order/re_orderdetail", + "pages/orderdetail/orderdetail", + "pages/reforderdetail/reforderdetail", + "pages/mechanism/mechanism", + "pages/activity/activity", + "pages/myshoucang/myshoucang_index", + "pages/myshoucang/myorderdetail", + "pages/wodeqianbao/qianbao", + "pages/refund/refund" + ], + "window": { + "backgroundTextStyle": "light", + "navigationBarBackgroundColor": "#fff", + "navigationBarTitleText": "Weixin", + "navigationBarTextStyle": "black", + "navigationStyle": "custom" + }, + "subPackages": [ + { + "root": "shopping", + "name": "shopping", + "pages": [ + "pages/goddess/goddess", + "pages/paysuccess/paysuccess", + "pages/withdrawal/withdrawal", + "pages/payment/payment" + ], + "independent": false + } + ], + "style": "v2", + "sitemapLocation": "sitemap.json", + "tabBar": { + "color": "#C1C1C1", + "selectedColor": "#606060", + "backgroundColor": "#fff", + "list": [ + { + "pagePath": "pages/index/index", + "text": "首页", + "iconPath": "pages/image/income.png", + "selectedIconPath": "pages/image/income_a.png" + }, + { + "pagePath": "pages/order/order", + "text": "订单", + "iconPath": "pages/image/order.png", + "selectedIconPath": "pages/image/order_a.png" + }, + + { + "pagePath": "pages/my/my", + "text": "我的", + "iconPath": "pages/image/my.png", + "selectedIconPath": "pages/image/my_a.png" + } + ] + + } + +} \ No newline at end of file diff --git a/app.wxss b/app.wxss new file mode 100644 index 0000000..06c6fc9 --- /dev/null +++ b/app.wxss @@ -0,0 +1,10 @@ +/**app.wxss**/ +.container { + height: 100%; + display: flex; + flex-direction: column; + align-items: center; + justify-content: space-between; + padding: 200rpx 0; + box-sizing: border-box; +} diff --git a/component/picker/GetDate.js b/component/picker/GetDate.js new file mode 100644 index 0000000..31c0582 --- /dev/null +++ b/component/picker/GetDate.js @@ -0,0 +1,113 @@ +const GetDate = { + withData: (param) => { + return param < 10 ? '0' + param : '' + param; + }, + getTimes(str){ + return new Date(str.replace(/-/g,'/')).getTime(); + }, + format(arr){ + let curarr = []; + let curarr0 = []; + let str = ''; + arr.forEach((o,index) => { + if(index > 2){ + curarr.push(o); + }else{ + curarr0.push(o) + } + }) + if(arr.length < 4){ + str = arr.join('-') + }else{ + str = curarr0.join('-') + ' ' + curarr.join(':') + } + return str; + }, + getLoopArray: (start, end) => { + var start = start || 0; + var end = end || 1; + var array = []; + for (var i = start; i <= end; i++) { + array.push(GetDate.withData(i)); + } + return array; + }, + getMonthDay: (year, month) => { + var flag = year % 400 == 0 || (year % 4 == 0 && year % 100 != 0), array = null; + + switch (month) { + case '01': + case '03': + case '05': + case '07': + case '08': + case '10': + case '12': + array = GetDate.getLoopArray(1, 31) + break; + case '04': + case '06': + case '09': + case '11': + array = GetDate.getLoopArray(1, 30) + break; + case '02': + array = flag ? GetDate.getLoopArray(1, 29) : GetDate.getLoopArray(1, 28) + break; + default: + array = '月份格式不正确,请重新输入!' + } + return array; + }, + getDateTimes: (opts) => { + var years = GetDate.getLoopArray(opts.start, opts.end); + var months = GetDate.getLoopArray(1, 12); + var days = GetDate.getLoopArray(1, 31); + var hours = GetDate.getLoopArray(0, 23); + var minutes = GetDate.getLoopArray(0, 59); + var seconds = GetDate.getLoopArray(0, 59); + var times = null; + + switch (opts.fields) { + case 'year': + times = [years] + break; + case 'month': + times = [years, months] + break; + case 'day': + times = [years, months, days] + break; + case 'hour': + times = [years, months, days, hours] + break; + case 'minute': + times = [years, months, days, hours, minutes] + break; + case 'second': + times = [years, months, days, hours, minutes, seconds] + break; + default: + times = [years, months, days, hours, minutes, seconds] + } + return times; + }, + getIndex(arr,target){ + let len = arr.length; + for(let i = 0; i < len; i++){ + if(arr[i] == target){ + return i; + } + } + }, + getTimeIndex(arrs, targets){ + let len = arrs.length; + let arr = []; + for(let i = 0; i < len; i++){ + arr.push(GetDate.getIndex(arrs[i], targets[i])) + } + return arr; + } +} + +module.exports = GetDate; \ No newline at end of file diff --git a/component/picker/picker.js b/component/picker/picker.js new file mode 100644 index 0000000..b81baf2 --- /dev/null +++ b/component/picker/picker.js @@ -0,0 +1,172 @@ +const GetDate = require('./GetDate.js'); + +const error = (msg) => { + console.error(msg); +}; + +Component({ + externalClasses: ['rui-class'], + + options: { + multipleSlots: true + }, + lifetimes: { + attached() { + switch (this.data.fields){ + case 'year': + if (this.data.value.length !== 4) {error('时间粒度和时间格式不一致');this.setData({ disabled: true });return false;} + if (this.data.start.length !== 4) { error('时间粒度和开始时间格式不一致'); this.setData({ disabled: true }); return false;} + if (this.data.end.length !== 4) { error('时间粒度和结束时间格式不一致'); this.setData({ disabled: true }); return false;} + break; + case 'month': + if (this.data.value.length !== 7) { error('时间粒度和时间格式不一致'); this.setData({ disabled: true }); return false;} + if (this.data.start.length !== 7) { error('时间粒度和开始时间格式不一致'); this.setData({ disabled: true }); return false;} + if (this.data.end.length !== 7) { error('时间粒度和结束时间格式不一致'); this.setData({ disabled: true }); return false;} + break; + case 'day': + if (this.data.value.length !== 10) { error('时间粒度和时间格式不一致'); this.setData({ disabled: true }); return false;} + if (this.data.start.length !== 10) { error('时间粒度和开始时间格式不一致'); this.setData({ disabled: true }); return false;} + if (this.data.end.length !== 10) { error('时间粒度和结束时间格式不一致'); this.setData({ disabled: true }); return false;} + break; + case 'hour': + if (this.data.value.length !== 13) { error('时间粒度和时间格式不一致'); this.setData({ disabled: true }); return false;} + if (this.data.start.length !== 13) { error('时间粒度和开始时间格式不一致'); this.setData({ disabled: true }); return false;} + if (this.data.end.length !== 13) { error('时间粒度和结束时间格式不一致'); this.setData({ disabled: true }); return false;} + break; + case 'minute': + if (this.data.value.length !== 16) { error('时间粒度和时间格式不一致'); this.setData({ disabled: true }); return false;} + if (this.data.start.length !== 16) { error('时间粒度和开始时间格式不一致'); this.setData({ disabled: true }); return false;} + if (this.data.end.length !== 16) { error('时间粒度和结束时间格式不一致'); this.setData({ disabled: true }); return false;} + break; + case 'second': + if (this.data.value.length !== 19) { error('时间粒度和时间格式不一致'); this.setData({ disabled: true }); return false;} + if (this.data.start.length !== 19) { error('时间粒度和开始时间格式不一致'); this.setData({ disabled: true }); return false;} + if (this.data.end.length !== 19) { error('时间粒度和结束时间格式不一致'); this.setData({ disabled: true }); return false;} + break; + default: + error('时间粒度不存在') + break; + } + let values = this.data.value.split(' '); + let targets = this.data.fields === 'year' || this.data.fields === 'month' || this.data.fields === 'day' ? [...(values[0].split('-'))] : [...(values[0].split('-')), ...(values[1].split(':'))]; + + if (GetDate.getTimes(this.data.value) < GetDate.getTimes(this.data.start)){ + error('默认时间不能小于开始时间') + this.setData({ disabled: true }) + return false; + } + if (GetDate.getTimes(this.data.value) > GetDate.getTimes(this.data.end)) { + error('默认时间不能大于开始时间') + this.setData({ disabled: true }) + return false; + } + let times = GetDate.getDateTimes({ + start: this.data.start.substring(0, 4), + end: this.data.end.substring(0, 4), + curyear: this.data.value.substring(0, 4), + curmonth: this.data.value.substring(5, 7), + fields: this.data.fields, + }) + let timesIndex = GetDate.getTimeIndex(times, targets); + let timesString = []; + timesIndex.forEach(o => timesString.push(o)); + + this.setData({ + times: times, + timesIndex: timesIndex, + timesString: timesString + }) + } + }, + properties: { + start: { + type: String, + value: '1900-00-00 00:00:00' + }, + end: { + type: String, + value: '2500-12-30 23:59:59' + }, + value: { + type: String, + value: '2019-03-15 10:45:00' + }, + fields: { + type: String, + value: 'second' + }, + disabled: { + type: Boolean, + value: false + } + }, + + data: { + times:[['2019','2020'],['01','02']], + timesIndex: [1,1], + timesString: null + }, + + methods: { + changeDate(e){ + let values = e.detail.value; + let times = this.data.times; + let curarr = []; + for (let i = 0, len = values.length; i < len; i++) { + curarr.push(times[i][values[i]]) + } + let str = GetDate.format(curarr); + this.setData({ value: str}); + this.triggerEvent('changedatepicker', { value: str }, {}); + }, + columnchangeDate(e){ + if ((this.data.fields === 'year' || this.data.fields === 'month')){ + let timesIndex = this.data.timesIndex; + timesIndex[e.detail.column] = e.detail.value; + this.setData({ timesIndex: timesIndex }); + return false; + } + // 先对timesIndex做出改变 + if ((e.detail.column === 0 || e.detail.column === 1 || e.detail.column === 2) && (this.data.fields !== 'year' || this.data.fields !== 'month')) { + let times = this.data.times; + let timesIndex = this.data.timesIndex; + timesIndex[e.detail.column] = e.detail.value; + let days = GetDate.getMonthDay(times[0][timesIndex[0]], times[1][timesIndex[1]]); + if (timesIndex[2] >= days.length) { + timesIndex[2] = days.length - 1; + } else { + timesIndex[e.detail.column] = e.detail.value; + } + this.setData({ timesIndex: timesIndex }); + } else { + let timesIndex = this.data.timesIndex; + timesIndex[e.detail.column] = e.detail.value; + this.setData({ timesIndex: timesIndex }); + } + // 判断当前选择是否小于开始时间或者大于结束时间 + let values = this.data.timesIndex; + let times = this.data.times; + let curarr = []; + for (let i = 0, len = values.length; i < len; i++) { + curarr.push(times[i][values[i]]) + } + let str = GetDate.format(curarr); + + if (GetDate.getTimes(str) < GetDate.getTimes(this.data.start)) { + let timesString = this.data.timesString; + let timesIndex = []; + timesString.forEach(o => timesIndex.push(o)); + this.setData({ timesIndex: timesIndex}) + } + if (GetDate.getTimes(str) > GetDate.getTimes(this.data.end)) { + let timesString = this.data.timesString; + let timesIndex = []; + timesString.forEach(o => timesIndex.push(o)); + this.setData({ timesIndex: timesIndex }) + } + }, + cancelDate(e){ + this.triggerEvent('canceldatepicker', { value: e }, {}); + } + } +}) diff --git a/component/picker/picker.json b/component/picker/picker.json new file mode 100644 index 0000000..78013bd --- /dev/null +++ b/component/picker/picker.json @@ -0,0 +1,5 @@ +{ + "component": true, + "usingComponents": { + } +} \ No newline at end of file diff --git a/component/picker/picker.wxml b/component/picker/picker.wxml new file mode 100644 index 0000000..88a488c --- /dev/null +++ b/component/picker/picker.wxml @@ -0,0 +1,5 @@ + + + {{value}} + + diff --git a/component/picker/picker.wxss b/component/picker/picker.wxss new file mode 100644 index 0000000..82e38d9 --- /dev/null +++ b/component/picker/picker.wxss @@ -0,0 +1,14 @@ +/* component/picker/picker.wxss */ +.rui-picker{ + height: 10vw; + font-size: 4vw; + color: #000; + display: -webkit-flex; + display: flex; + align-items: center; + padding: 0 10px; + box-sizing: border-box; + border: 1px solid #aaa; + flex-grow: 1; + border-radius: 8px; +} \ No newline at end of file diff --git a/component/picker/readme.md b/component/picker/readme.md new file mode 100644 index 0000000..36279b1 --- /dev/null +++ b/component/picker/readme.md @@ -0,0 +1,98 @@ +### 使用 + +> 到 [GitHub](https://github.com/Rattenking/WXTUI-DEMO) 下载 WX-RUI 的代码,将 component 目录拷贝到自己的项目中。然后按照如下的方式使用组件,以 dtpicker 为例,其它组件在对应的文档页查看: + +#### 1. 添加需要的组件。在页面的 json 中配置(路径根据自己项目位置配置): + +``` +"usingComponents": { + "rui-dtpicker": "../../component/picker/picker" +} +``` + +#### 2. 在 wxml 中使用组件: + +2.1 时间粒度为second的实例 + +``` + +``` +2.2 时间粒度为year的实例 + +``` + +``` +### 效果图 + + + + + +### 参数说明 +**rui-dtpicker 属性说明:** + +|属性名 |类型 |默认值 |说明 | +|--- |---- |--- |--- | +|start |String |'1900-00-00 00:00:00' |限制选择器选择的最小时间 | +|end |String |'2500-12-30 23:59:59' |限制选择器选择的最大时间 | +|value |String |'2019-03-15 10:45:00' |当前时间选择器显示的时间 | +|fields |String |'second' |时间选择器的粒度 | +|disabled |Boolean|false |是否为禁用状态 | + +**fields 值说明:** + +|值 |类型 |说明 | +|--- |---- |--- | +|year |String |选择器粒度为年 | +|month |String |选择器粒度为月份 | +|day |String |选择器粒度为天 | +|hour |String |选择器粒度为小时 | +|minute |String |选择器粒度为分钟 | +|second |String |选择器粒度为秒 | + +**事件说明:** + +|事件名称 |说明 | +|---|---| +|change |时间选择器点击【确定】按钮时时触发的事件,参数为picker的当前的 value| +|cancel |时间选择器点击【取消】按钮时时触发的事件| + +### WXRUI体验二维码 +![WXRUI体验码](https://img-blog.csdnimg.cn/20190220140113256.jpg) +##### 如果文章对你有帮助的话,请打开微信扫一下二维码,点击一下广告,支持一下作者!谢谢! + +### 其他 + +[我的博客,欢迎交流!](http://rattenking.gitee.io/stone/index.html) + +[我的CSDN博客,欢迎交流!](https://blog.csdn.net/m0_38082783) + +[微信小程序专栏](https://blog.csdn.net/column/details/18335.html) + +[前端笔记专栏](https://blog.csdn.net/column/details/18321.html) + +[微信小程序实现部分高德地图功能的DEMO下载](http://download.csdn.net/download/m0_38082783/10244082) + +[微信小程序实现MUI的部分效果的DEMO下载](http://download.csdn.net/download/m0_38082783/10196944) + +[微信小程序实现MUI的GIT项目地址](https://github.com/Rattenking/WXTUI-DEMO) + +[微信小程序实例列表](http://blog.csdn.net/m0_38082783/article/details/78853722) + +[前端笔记列表](http://blog.csdn.net/m0_38082783/article/details/79208205) + +[游戏列表](http://blog.csdn.net/m0_38082783/article/details/79035621) \ No newline at end of file diff --git a/miniprogram/@vant/weapp/LICENSE b/miniprogram/@vant/weapp/LICENSE new file mode 100644 index 0000000..8777860 --- /dev/null +++ b/miniprogram/@vant/weapp/LICENSE @@ -0,0 +1,7 @@ +Copyright 2016-present Youzan + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/miniprogram/@vant/weapp/README.md b/miniprogram/@vant/weapp/README.md new file mode 100644 index 0000000..cfdcc8e --- /dev/null +++ b/miniprogram/@vant/weapp/README.md @@ -0,0 +1,125 @@ +

+ logo +

+

轻量、可靠的小程序 UI 组件库

+ +

+ npm version + + downloads + downloads +

+ +

+ 🔥 文档网站(国内) +   + 🌈 文档网站(GitHub) +   + 🚀 Vue 版 +

+ +--- + +### 介绍 + +Vant 是**有赞前端团队**开源的移动端组件库,于 2017 年开源,已持续维护 4 年时间。Vant 对内承载了有赞所有核心业务,对外服务十多万开发者,是业界主流的移动端组件库之一。 + +目前 Vant 官方提供了 [Vue 2 版本](https://vant-contrib.gitee.io/vant)、[Vue 3 版本](https://vant-contrib.gitee.io/vant/v3)和[微信小程序版本](http://vant-contrib.gitee.io/vant-weapp),并由社区团队维护 [React 版本](https://github.com/mxdi9i7/vant-react)和[支付宝小程序版本](https://github.com/ant-move/Vant-Aliapp)。 + +## 预览 + +扫描下方小程序二维码,体验组件库示例: + + + +## 使用之前 + +使用 Vant Weapp 前,请确保你已经学习过微信官方的 [小程序简易教程](https://developers.weixin.qq.com/miniprogram/dev/framework/) 和 [自定义组件介绍](https://developers.weixin.qq.com/miniprogram/dev/framework/custom-component/)。 + +## 安装 + +### 方式一. 通过 npm 安装 (推荐) + +小程序已经支持使用 npm 安装第三方包,详见 [npm 支持](https://developers.weixin.qq.com/miniprogram/dev/devtools/npm.html?search-key=npm) + +```bash +# 通过 npm 安装 +npm i @vant/weapp -S --production + +# 通过 yarn 安装 +yarn add @vant/weapp --production + +# 安装 0.x 版本 +npm i vant-weapp -S --production +``` + +### 方式二. 下载代码 + +直接通过 git 下载 Vant Weapp 源代码,并将 `dist` 目录拷贝到自己的项目中。 + +```bash +git clone https://github.com/youzan/vant-weapp.git +``` + +## 使用组件 + +以按钮组件为例,只需要在 json 文件中引入按钮对应的自定义组件即可 + +```json +{ + "usingComponents": { + "van-button": "/path/to/vant-weapp/dist/button/index" + } +} +``` + +接着就可以在 wxml 中直接使用组件 + +```html +按钮 +``` + +## 在开发者工具中预览 + +```bash +# 安装项目依赖 +npm install + +# 执行组件编译 +npm run dev +``` + +打开[微信开发者工具](https://developers.weixin.qq.com/miniprogram/dev/devtools/download.html),把`vant-weapp/example`目录添加进去就可以预览示例了。 + +PS:关于 `van-area` Area 省市区选择组件,地区数据初始化可以直接在云开发环境中导入`vant-weapp/example/database_area.JSON` 文件使用。 + +## 基础库版本 + +Vant Weapp 最低支持到小程序基础库 2.6.5 版本。 + +## 链接 + +- [更新日志](https://github.com/youzan/vant-weapp/blob/dev/docs/markdown/changelog.md) +- [意见反馈](https://github.com/youzan/vant-weapp/issues) +- [加入我们](https://job.youzan.com) +- [Vant Vue 版](https://github.com/youzan/vant) + +## 核心团队 + +以下是 Vant 和 Vant Weapp 的核心贡献者们: + +| [![chenjiahan](https://avatars.githubusercontent.com/u/7237365?s=80&v=4)](https://github.com/chenjiahan/) | [![cookfront](https://avatars.githubusercontent.com/u/4829465?s=80&v=4)](https://github.com/cookfront/) | [![w91](https://avatars.githubusercontent.com/u/2599455?s=80&v=4)](https://github.com/w91/) | [![pangxie1991](https://avatars.githubusercontent.com/u/5961240?s=80&v=4)](https://github.com/pangxie1991/) | [![rex-zsd](https://avatars.githubusercontent.com/u/8767877?s=80&v=4)](https://github.com/rex-zsd/) | [![nemo-shen](https://avatars.githubusercontent.com/u/13480805?s=80&v=4)](https://github.com/nemo-shen/) | [![Lindysen](https://avatars.githubusercontent.com/u/33708359?s=80&v=4)](https://github.com/Lindysen/) | [![nemo-shen](https://avatars.githubusercontent.com/u/16181940?s=80&v=4)](https://github.com/JakeLaoyu/) | +| :-: | :-: | :-: | :-: | :-: | :-: | :-: | :-: | +| [chenjiahan](https://github.com/chenjiahan/) | [cookfront](https://github.com/cookfront/) | [wangnaiyi](https://github.com/w91/) | [pangxie](https://github.com/pangxie1991/) | [rex-zsd](https://github.com/rex-zsd/) | [nemo-shen](https://github.com/nemo-shen/) | [Lindysen](https://github.com/Lindysen/) | [JakeLaoyu](https://github.com/JakeLaoyu/) | + +## 贡献者们 + +感谢以下小伙伴们为 Vant Weapp 发展做出的贡献: + + + contributors + + +## 开源协议 + +本项目基于 [MIT](https://zh.wikipedia.org/wiki/MIT%E8%A8%B1%E5%8F%AF%E8%AD%89)协议,请自由地享受和参与开源。 diff --git a/miniprogram/@vant/weapp/changelog.generated.md b/miniprogram/@vant/weapp/changelog.generated.md new file mode 100644 index 0000000..fe20a40 --- /dev/null +++ b/miniprogram/@vant/weapp/changelog.generated.md @@ -0,0 +1,29 @@ +### [v1.9.2](https://github.com/youzan/vant-weapp/compare/v1.9.1...v1.9.2) + +`2021-10-28` + +**Bug Fixes** + +- Calendar: select min effective range [#4569](https://github.com/youzan/vant-weapp/issues/4569) +- Collapse: animate invalid on multi clicks [#4567](https://github.com/youzan/vant-weapp/issues/4567) +- Tab: fix style error with card of type [#4582](https://github.com/youzan/vant-weapp/issues/4582) +- Tab: swipe multi index with double refers [#4539](https://github.com/youzan/vant-weapp/issues/4539) + +**build** + +- compile 1.9.2 [9c94a7](https://github.com/youzan/vant-weapp/commit/9c94a71c32139d4d12ff7e821c63ed67cb4110a3) + +**Document** + +- changelog: 1.9.1 [04ddd8](https://github.com/youzan/vant-weapp/commit/04ddd811b270440be5cbf5a26004988ce5d75175) + +**Feature** + +- DropdownMenu: add --dropdown-menu-box-shadow css var [#4565](https://github.com/youzan/vant-weapp/issues/4565) +- DropdownMenu: add custom-class [#4583](https://github.com/youzan/vant-weapp/issues/4583) +- Field: add always-embed prop [#4571](https://github.com/youzan/vant-weapp/issues/4571) +- Toast: support html of type [#4581](https://github.com/youzan/vant-weapp/issues/4581) + +**release** + +- 1.9.2 [7e8d18](https://github.com/youzan/vant-weapp/commit/7e8d18d939154f8fc3ccb3c3f7d9669b1c022ca1) diff --git a/miniprogram/@vant/weapp/dist/action-sheet/index.js b/miniprogram/@vant/weapp/dist/action-sheet/index.js new file mode 100644 index 0000000..58e866d --- /dev/null +++ b/miniprogram/@vant/weapp/dist/action-sheet/index.js @@ -0,0 +1,70 @@ +import { VantComponent } from '../common/component'; +import { button } from '../mixins/button'; +VantComponent({ + mixins: [button], + props: { + show: Boolean, + title: String, + cancelText: String, + description: String, + round: { + type: Boolean, + value: true, + }, + zIndex: { + type: Number, + value: 100, + }, + actions: { + type: Array, + value: [], + }, + overlay: { + type: Boolean, + value: true, + }, + closeOnClickOverlay: { + type: Boolean, + value: true, + }, + closeOnClickAction: { + type: Boolean, + value: true, + }, + safeAreaInsetBottom: { + type: Boolean, + value: true, + }, + }, + methods: { + onSelect(event) { + const { index } = event.currentTarget.dataset; + const { actions, closeOnClickAction, canIUseGetUserProfile } = this.data; + const item = actions[index]; + if (item) { + this.$emit('select', item); + if (closeOnClickAction) { + this.onClose(); + } + if (item.openType === 'getUserInfo' && canIUseGetUserProfile) { + wx.getUserProfile({ + desc: item.getUserProfileDesc || ' ', + complete: (userProfile) => { + this.$emit('getuserinfo', userProfile); + }, + }); + } + } + }, + onCancel() { + this.$emit('cancel'); + }, + onClose() { + this.$emit('close'); + }, + onClickOverlay() { + this.$emit('click-overlay'); + this.onClose(); + }, + }, +}); diff --git a/miniprogram/@vant/weapp/dist/action-sheet/index.json b/miniprogram/@vant/weapp/dist/action-sheet/index.json new file mode 100644 index 0000000..19bf989 --- /dev/null +++ b/miniprogram/@vant/weapp/dist/action-sheet/index.json @@ -0,0 +1,8 @@ +{ + "component": true, + "usingComponents": { + "van-icon": "../icon/index", + "van-popup": "../popup/index", + "van-loading": "../loading/index" + } +} diff --git a/miniprogram/@vant/weapp/dist/action-sheet/index.wxml b/miniprogram/@vant/weapp/dist/action-sheet/index.wxml new file mode 100644 index 0000000..b04cc3a --- /dev/null +++ b/miniprogram/@vant/weapp/dist/action-sheet/index.wxml @@ -0,0 +1,69 @@ + + + + + {{ title }} + + + + {{ description }} + + + + + + + + + + {{ cancelText }} + + + diff --git a/miniprogram/@vant/weapp/dist/action-sheet/index.wxss b/miniprogram/@vant/weapp/dist/action-sheet/index.wxss new file mode 100644 index 0000000..eedd361 --- /dev/null +++ b/miniprogram/@vant/weapp/dist/action-sheet/index.wxss @@ -0,0 +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} \ No newline at end of file diff --git a/miniprogram/@vant/weapp/dist/area/index.js b/miniprogram/@vant/weapp/dist/area/index.js new file mode 100644 index 0000000..2a7c79b --- /dev/null +++ b/miniprogram/@vant/weapp/dist/area/index.js @@ -0,0 +1,217 @@ +import { VantComponent } from '../common/component'; +import { pickerProps } from '../picker/shared'; +import { requestAnimationFrame } from '../common/utils'; +const EMPTY_CODE = '000000'; +VantComponent({ + classes: ['active-class', 'toolbar-class', 'column-class'], + props: Object.assign(Object.assign({}, pickerProps), { value: { + type: String, + observer(value) { + this.code = value; + this.setValues(); + }, + }, areaList: { + type: Object, + value: {}, + observer: 'setValues', + }, columnsNum: { + type: null, + value: 3, + }, columnsPlaceholder: { + type: Array, + observer(val) { + this.setData({ + typeToColumnsPlaceholder: { + province: val[0] || '', + city: val[1] || '', + county: val[2] || '', + }, + }); + }, + } }), + data: { + columns: [{ values: [] }, { values: [] }, { values: [] }], + typeToColumnsPlaceholder: {}, + }, + mounted() { + requestAnimationFrame(() => { + this.setValues(); + }); + }, + methods: { + getPicker() { + if (this.picker == null) { + this.picker = this.selectComponent('.van-area__picker'); + } + return this.picker; + }, + onCancel(event) { + this.emit('cancel', event.detail); + }, + onConfirm(event) { + const { index } = event.detail; + let { value } = event.detail; + value = this.parseValues(value); + this.emit('confirm', { value, index }); + }, + emit(type, detail) { + detail.values = detail.value; + delete detail.value; + this.$emit(type, detail); + }, + parseValues(values) { + const { columnsPlaceholder } = this.data; + return values.map((value, index) => { + if (value && + (!value.code || value.name === columnsPlaceholder[index])) { + return Object.assign(Object.assign({}, value), { code: '', name: '' }); + } + return value; + }); + }, + onChange(event) { + var _a; + const { index, picker, value } = event.detail; + this.code = value[index].code; + (_a = this.setValues()) === null || _a === void 0 ? void 0 : _a.then(() => { + this.$emit('change', { + picker, + values: this.parseValues(picker.getValues()), + index, + }); + }); + }, + getConfig(type) { + const { areaList } = this.data; + return (areaList && areaList[`${type}_list`]) || {}; + }, + getList(type, code) { + if (type !== 'province' && !code) { + return []; + } + const { typeToColumnsPlaceholder } = this.data; + const list = this.getConfig(type); + let result = Object.keys(list).map((code) => ({ + code, + name: list[code], + })); + if (code != null) { + // oversea code + if (code[0] === '9' && type === 'city') { + code = '9'; + } + result = result.filter((item) => item.code.indexOf(code) === 0); + } + if (typeToColumnsPlaceholder[type] && result.length) { + // set columns placeholder + const codeFill = type === 'province' + ? '' + : type === 'city' + ? EMPTY_CODE.slice(2, 4) + : EMPTY_CODE.slice(4, 6); + result.unshift({ + code: `${code}${codeFill}`, + name: typeToColumnsPlaceholder[type], + }); + } + return result; + }, + getIndex(type, code) { + let compareNum = type === 'province' ? 2 : type === 'city' ? 4 : 6; + const list = this.getList(type, code.slice(0, compareNum - 2)); + // oversea code + if (code[0] === '9' && type === 'province') { + compareNum = 1; + } + code = code.slice(0, compareNum); + for (let i = 0; i < list.length; i++) { + if (list[i].code.slice(0, compareNum) === code) { + return i; + } + } + return 0; + }, + setValues() { + const picker = this.getPicker(); + if (!picker) { + return; + } + let code = this.code || this.getDefaultCode(); + const provinceList = this.getList('province'); + const cityList = this.getList('city', code.slice(0, 2)); + const stack = []; + const indexes = []; + const { columnsNum } = this.data; + if (columnsNum >= 1) { + stack.push(picker.setColumnValues(0, provinceList, false)); + indexes.push(this.getIndex('province', code)); + } + if (columnsNum >= 2) { + stack.push(picker.setColumnValues(1, cityList, false)); + indexes.push(this.getIndex('city', code)); + if (cityList.length && code.slice(2, 4) === '00') { + [{ code }] = cityList; + } + } + if (columnsNum === 3) { + stack.push(picker.setColumnValues(2, this.getList('county', code.slice(0, 4)), false)); + indexes.push(this.getIndex('county', code)); + } + return Promise.all(stack) + .catch(() => { }) + .then(() => picker.setIndexes(indexes)) + .catch(() => { }); + }, + getDefaultCode() { + const { columnsPlaceholder } = this.data; + if (columnsPlaceholder.length) { + return EMPTY_CODE; + } + const countyCodes = Object.keys(this.getConfig('county')); + if (countyCodes[0]) { + return countyCodes[0]; + } + const cityCodes = Object.keys(this.getConfig('city')); + if (cityCodes[0]) { + return cityCodes[0]; + } + return ''; + }, + getValues() { + const picker = this.getPicker(); + if (!picker) { + return []; + } + return this.parseValues(picker.getValues().filter((value) => !!value)); + }, + getDetail() { + const values = this.getValues(); + const area = { + code: '', + country: '', + province: '', + city: '', + county: '', + }; + if (!values.length) { + return area; + } + const names = values.map((item) => item.name); + area.code = values[values.length - 1].code; + if (area.code[0] === '9') { + area.country = names[1] || ''; + area.province = names[2] || ''; + } + else { + area.province = names[0] || ''; + area.city = names[1] || ''; + area.county = names[2] || ''; + } + return area; + }, + reset(code) { + this.code = code || ''; + return this.setValues(); + }, + }, +}); diff --git a/miniprogram/@vant/weapp/dist/area/index.json b/miniprogram/@vant/weapp/dist/area/index.json new file mode 100644 index 0000000..a778e91 --- /dev/null +++ b/miniprogram/@vant/weapp/dist/area/index.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "van-picker": "../picker/index" + } +} diff --git a/miniprogram/@vant/weapp/dist/area/index.wxml b/miniprogram/@vant/weapp/dist/area/index.wxml new file mode 100644 index 0000000..f7dc51f --- /dev/null +++ b/miniprogram/@vant/weapp/dist/area/index.wxml @@ -0,0 +1,20 @@ + + + diff --git a/miniprogram/@vant/weapp/dist/area/index.wxs b/miniprogram/@vant/weapp/dist/area/index.wxs new file mode 100644 index 0000000..07723c1 --- /dev/null +++ b/miniprogram/@vant/weapp/dist/area/index.wxs @@ -0,0 +1,8 @@ +/* eslint-disable */ +function displayColumns(columns, columnsNum) { + return columns.slice(0, +columnsNum); +} + +module.exports = { + displayColumns: displayColumns, +}; diff --git a/miniprogram/@vant/weapp/dist/area/index.wxss b/miniprogram/@vant/weapp/dist/area/index.wxss new file mode 100644 index 0000000..99694d6 --- /dev/null +++ b/miniprogram/@vant/weapp/dist/area/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss'; \ No newline at end of file diff --git a/miniprogram/@vant/weapp/dist/button/index.js b/miniprogram/@vant/weapp/dist/button/index.js new file mode 100644 index 0000000..0e3c134 --- /dev/null +++ b/miniprogram/@vant/weapp/dist/button/index.js @@ -0,0 +1,64 @@ +import { VantComponent } from '../common/component'; +import { button } from '../mixins/button'; +import { canIUseFormFieldButton } from '../common/version'; +const mixins = [button]; +if (canIUseFormFieldButton()) { + mixins.push('wx://form-field-button'); +} +VantComponent({ + mixins, + classes: ['hover-class', 'loading-class'], + data: { + baseStyle: '', + }, + props: { + formType: String, + icon: String, + classPrefix: { + type: String, + value: 'van-icon', + }, + plain: Boolean, + block: Boolean, + round: Boolean, + square: Boolean, + loading: Boolean, + hairline: Boolean, + disabled: Boolean, + loadingText: String, + customStyle: String, + loadingType: { + type: String, + value: 'circular', + }, + type: { + type: String, + value: 'default', + }, + dataset: null, + size: { + type: String, + value: 'normal', + }, + loadingSize: { + type: String, + value: '20px', + }, + color: String, + }, + methods: { + onClick(event) { + this.$emit('click', event); + const { canIUseGetUserProfile, openType, getUserProfileDesc, lang, } = this.data; + if (openType === 'getUserInfo' && canIUseGetUserProfile) { + wx.getUserProfile({ + desc: getUserProfileDesc || ' ', + lang: lang || 'en', + complete: (userProfile) => { + this.$emit('getuserinfo', userProfile); + }, + }); + } + }, + }, +}); diff --git a/miniprogram/@vant/weapp/dist/button/index.json b/miniprogram/@vant/weapp/dist/button/index.json new file mode 100644 index 0000000..e00a588 --- /dev/null +++ b/miniprogram/@vant/weapp/dist/button/index.json @@ -0,0 +1,7 @@ +{ + "component": true, + "usingComponents": { + "van-icon": "../icon/index", + "van-loading": "../loading/index" + } +} diff --git a/miniprogram/@vant/weapp/dist/button/index.wxml b/miniprogram/@vant/weapp/dist/button/index.wxml new file mode 100644 index 0000000..8034845 --- /dev/null +++ b/miniprogram/@vant/weapp/dist/button/index.wxml @@ -0,0 +1,53 @@ + + + + diff --git a/miniprogram/@vant/weapp/dist/button/index.wxs b/miniprogram/@vant/weapp/dist/button/index.wxs new file mode 100644 index 0000000..8b649fe --- /dev/null +++ b/miniprogram/@vant/weapp/dist/button/index.wxs @@ -0,0 +1,39 @@ +/* eslint-disable */ +var style = require('../wxs/style.wxs'); + +function rootStyle(data) { + if (!data.color) { + return data.customStyle; + } + + var properties = { + color: data.plain ? data.color : '#fff', + background: data.plain ? null : data.color, + }; + + // hide border when color is linear-gradient + if (data.color.indexOf('gradient') !== -1) { + properties.border = 0; + } else { + properties['border-color'] = data.color; + } + + return style([properties, data.customStyle]); +} + +function loadingColor(data) { + if (data.plain) { + return data.color ? data.color : '#c9c9c9'; + } + + if (data.type === 'default') { + return '#c9c9c9'; + } + + return '#fff'; +} + +module.exports = { + rootStyle: rootStyle, + loadingColor: loadingColor, +}; diff --git a/miniprogram/@vant/weapp/dist/button/index.wxss b/miniprogram/@vant/weapp/dist/button/index.wxss new file mode 100644 index 0000000..bd8bb5a --- /dev/null +++ b/miniprogram/@vant/weapp/dist/button/index.wxss @@ -0,0 +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} \ No newline at end of file diff --git a/miniprogram/@vant/weapp/dist/calendar/calendar.wxml b/miniprogram/@vant/weapp/dist/calendar/calendar.wxml new file mode 100644 index 0000000..808f739 --- /dev/null +++ b/miniprogram/@vant/weapp/dist/calendar/calendar.wxml @@ -0,0 +1,68 @@ + +
+ +
+ + + + + + + + + + + + {{ + computed.getButtonDisabled(type, currentDate) + ? confirmDisabledText + : confirmText + }} + + +
diff --git a/miniprogram/@vant/weapp/dist/calendar/components/header/index.js b/miniprogram/@vant/weapp/dist/calendar/components/header/index.js new file mode 100644 index 0000000..8fb3682 --- /dev/null +++ b/miniprogram/@vant/weapp/dist/calendar/components/header/index.js @@ -0,0 +1,37 @@ +import { VantComponent } from '../../../common/component'; +VantComponent({ + props: { + title: { + type: String, + value: '日期选择', + }, + subtitle: String, + showTitle: Boolean, + showSubtitle: Boolean, + firstDayOfWeek: { + type: Number, + observer: 'initWeekDay', + }, + }, + data: { + weekdays: [], + }, + created() { + this.initWeekDay(); + }, + methods: { + initWeekDay() { + const defaultWeeks = ['日', '一', '二', '三', '四', '五', '六']; + const firstDayOfWeek = this.data.firstDayOfWeek || 0; + this.setData({ + weekdays: [ + ...defaultWeeks.slice(firstDayOfWeek, 7), + ...defaultWeeks.slice(0, firstDayOfWeek), + ], + }); + }, + onClickSubtitle(event) { + this.$emit('click-subtitle', event); + }, + }, +}); diff --git a/miniprogram/@vant/weapp/dist/calendar/components/header/index.json b/miniprogram/@vant/weapp/dist/calendar/components/header/index.json new file mode 100644 index 0000000..467ce29 --- /dev/null +++ b/miniprogram/@vant/weapp/dist/calendar/components/header/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} diff --git a/miniprogram/@vant/weapp/dist/calendar/components/header/index.wxml b/miniprogram/@vant/weapp/dist/calendar/components/header/index.wxml new file mode 100644 index 0000000..7e56c83 --- /dev/null +++ b/miniprogram/@vant/weapp/dist/calendar/components/header/index.wxml @@ -0,0 +1,16 @@ + + + + {{ title }} + + + + {{ subtitle }} + + + + + {{ item }} + + + diff --git a/miniprogram/@vant/weapp/dist/calendar/components/header/index.wxss b/miniprogram/@vant/weapp/dist/calendar/components/header/index.wxss new file mode 100644 index 0000000..272537e --- /dev/null +++ b/miniprogram/@vant/weapp/dist/calendar/components/header/index.wxss @@ -0,0 +1 @@ +@import '../../../common/index.wxss';.van-calendar__header{box-shadow:var(--calendar-header-box-shadow,0 2px 10px hsla(220,1%,50%,.16));flex-shrink:0}.van-calendar__header-subtitle,.van-calendar__header-title{font-weight:var(--font-weight-bold,500);height:var(--calendar-header-title-height,44px);line-height:var(--calendar-header-title-height,44px);text-align:center}.van-calendar__header-title+.van-calendar__header-title,.van-calendar__header-title:empty{display:none}.van-calendar__header-title:empty+.van-calendar__header-title{display:block!important}.van-calendar__weekdays{display:flex}.van-calendar__weekday{flex:1;font-size:var(--calendar-weekdays-font-size,12px);line-height:var(--calendar-weekdays-height,30px);text-align:center} \ No newline at end of file diff --git a/miniprogram/@vant/weapp/dist/calendar/components/month/index.js b/miniprogram/@vant/weapp/dist/calendar/components/month/index.js new file mode 100644 index 0000000..d04c0fe --- /dev/null +++ b/miniprogram/@vant/weapp/dist/calendar/components/month/index.js @@ -0,0 +1,154 @@ +import { VantComponent } from '../../../common/component'; +import { getMonthEndDay, compareDay, getPrevDay, getNextDay, } from '../../utils'; +VantComponent({ + props: { + date: { + type: null, + observer: 'setDays', + }, + type: { + type: String, + observer: 'setDays', + }, + color: String, + minDate: { + type: null, + observer: 'setDays', + }, + maxDate: { + type: null, + observer: 'setDays', + }, + showMark: Boolean, + rowHeight: null, + formatter: { + type: null, + observer: 'setDays', + }, + currentDate: { + type: null, + observer: 'setDays', + }, + firstDayOfWeek: { + type: Number, + observer: 'setDays', + }, + allowSameDay: Boolean, + showSubtitle: Boolean, + showMonthTitle: Boolean, + }, + data: { + visible: true, + days: [], + }, + methods: { + onClick(event) { + const { index } = event.currentTarget.dataset; + const item = this.data.days[index]; + if (item.type !== 'disabled') { + this.$emit('click', item); + } + }, + setDays() { + const days = []; + const startDate = new Date(this.data.date); + const year = startDate.getFullYear(); + const month = startDate.getMonth(); + const totalDay = getMonthEndDay(startDate.getFullYear(), startDate.getMonth() + 1); + for (let day = 1; day <= totalDay; day++) { + const date = new Date(year, month, day); + const type = this.getDayType(date); + let config = { + date, + type, + text: day, + bottomInfo: this.getBottomInfo(type), + }; + if (this.data.formatter) { + config = this.data.formatter(config); + } + days.push(config); + } + this.setData({ days }); + }, + getMultipleDayType(day) { + const { currentDate } = this.data; + if (!Array.isArray(currentDate)) { + return ''; + } + const isSelected = (date) => currentDate.some((item) => compareDay(item, date) === 0); + if (isSelected(day)) { + const prevDay = getPrevDay(day); + const nextDay = getNextDay(day); + const prevSelected = isSelected(prevDay); + const nextSelected = isSelected(nextDay); + if (prevSelected && nextSelected) { + return 'multiple-middle'; + } + if (prevSelected) { + return 'end'; + } + return nextSelected ? 'start' : 'multiple-selected'; + } + return ''; + }, + getRangeDayType(day) { + const { currentDate, allowSameDay } = this.data; + if (!Array.isArray(currentDate)) { + return ''; + } + const [startDay, endDay] = currentDate; + if (!startDay) { + return ''; + } + const compareToStart = compareDay(day, startDay); + if (!endDay) { + return compareToStart === 0 ? 'start' : ''; + } + const compareToEnd = compareDay(day, endDay); + if (compareToStart === 0 && compareToEnd === 0 && allowSameDay) { + return 'start-end'; + } + if (compareToStart === 0) { + return 'start'; + } + if (compareToEnd === 0) { + return 'end'; + } + if (compareToStart > 0 && compareToEnd < 0) { + return 'middle'; + } + return ''; + }, + getDayType(day) { + const { type, minDate, maxDate, currentDate } = this.data; + if (compareDay(day, minDate) < 0 || compareDay(day, maxDate) > 0) { + return 'disabled'; + } + if (type === 'single') { + return compareDay(day, currentDate) === 0 ? 'selected' : ''; + } + if (type === 'multiple') { + return this.getMultipleDayType(day); + } + /* istanbul ignore else */ + if (type === 'range') { + return this.getRangeDayType(day); + } + return ''; + }, + getBottomInfo(type) { + if (this.data.type === 'range') { + if (type === 'start') { + return '开始'; + } + if (type === 'end') { + return '结束'; + } + if (type === 'start-end') { + return '开始/结束'; + } + } + }, + }, +}); diff --git a/miniprogram/@vant/weapp/dist/calendar/components/month/index.json b/miniprogram/@vant/weapp/dist/calendar/components/month/index.json new file mode 100644 index 0000000..467ce29 --- /dev/null +++ b/miniprogram/@vant/weapp/dist/calendar/components/month/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} diff --git a/miniprogram/@vant/weapp/dist/calendar/components/month/index.wxml b/miniprogram/@vant/weapp/dist/calendar/components/month/index.wxml new file mode 100644 index 0000000..4a2c47c --- /dev/null +++ b/miniprogram/@vant/weapp/dist/calendar/components/month/index.wxml @@ -0,0 +1,39 @@ + + + + + + {{ computed.formatMonthTitle(date) }} + + + + + {{ computed.getMark(date) }} + + + + + {{ item.topInfo }} + {{ item.text }} + + {{ item.bottomInfo }} + + + + + {{ item.topInfo }} + {{ item.text }} + + {{ item.bottomInfo }} + + + + + diff --git a/miniprogram/@vant/weapp/dist/calendar/components/month/index.wxs b/miniprogram/@vant/weapp/dist/calendar/components/month/index.wxs new file mode 100644 index 0000000..55e45a5 --- /dev/null +++ b/miniprogram/@vant/weapp/dist/calendar/components/month/index.wxs @@ -0,0 +1,71 @@ +/* eslint-disable */ +var utils = require('../../utils.wxs'); + +function getMark(date) { + return getDate(date).getMonth() + 1; +} + +var ROW_HEIGHT = 64; + +function getDayStyle(type, index, date, rowHeight, color, firstDayOfWeek) { + var style = []; + var current = getDate(date).getDay() || 7; + var offset = current < firstDayOfWeek ? (7 - firstDayOfWeek + current) : + current === 7 && firstDayOfWeek === 0 ? 0 : + (current - firstDayOfWeek); + + if (index === 0) { + style.push(['margin-left', (100 * offset) / 7 + '%']); + } + + if (rowHeight !== ROW_HEIGHT) { + style.push(['height', rowHeight + 'px']); + } + + if (color) { + if ( + type === 'start' || + type === 'end' || + type === 'start-end' || + type === 'multiple-selected' || + type === 'multiple-middle' + ) { + style.push(['background', color]); + } else if (type === 'middle') { + style.push(['color', color]); + } + } + + return style + .map(function(item) { + return item.join(':'); + }) + .join(';'); +} + +function formatMonthTitle(date) { + date = getDate(date); + return date.getFullYear() + '年' + (date.getMonth() + 1) + '月'; +} + +function getMonthStyle(visible, date, rowHeight) { + if (!visible) { + date = getDate(date); + + var totalDay = utils.getMonthEndDay( + date.getFullYear(), + date.getMonth() + 1 + ); + var offset = getDate(date).getDay(); + var padding = Math.ceil((totalDay + offset) / 7) * rowHeight; + + return 'padding-bottom:' + padding + 'px'; + } +} + +module.exports = { + getMark: getMark, + getDayStyle: getDayStyle, + formatMonthTitle: formatMonthTitle, + getMonthStyle: getMonthStyle +}; diff --git a/miniprogram/@vant/weapp/dist/calendar/components/month/index.wxss b/miniprogram/@vant/weapp/dist/calendar/components/month/index.wxss new file mode 100644 index 0000000..9aee73d --- /dev/null +++ b/miniprogram/@vant/weapp/dist/calendar/components/month/index.wxss @@ -0,0 +1 @@ +@import '../../../common/index.wxss';.van-calendar{background-color:var(--calendar-background-color,#fff);display:flex;flex-direction:column;height:100%}.van-calendar__month-title{font-size:var(--calendar-month-title-font-size,14px);font-weight:var(--font-weight-bold,500);height:var(--calendar-header-title-height,44px);line-height:var(--calendar-header-title-height,44px);text-align:center}.van-calendar__days{display:flex;flex-wrap:wrap;position:relative;-webkit-user-select:none;user-select:none}.van-calendar__month-mark{color:var(--calendar-month-mark-color,rgba(242,243,245,.8));font-size:var(--calendar-month-mark-font-size,160px);left:50%;pointer-events:none;position:absolute;top:50%;transform:translate(-50%,-50%);z-index:0}.van-calendar__day,.van-calendar__selected-day{align-items:center;display:flex;justify-content:center;text-align:center}.van-calendar__day{font-size:var(--calendar-day-font-size,16px);height:var(--calendar-day-height,64px);position:relative;width:14.285%}.van-calendar__day--end,.van-calendar__day--multiple-middle,.van-calendar__day--multiple-selected,.van-calendar__day--start,.van-calendar__day--start-end{background-color:var(--calendar-range-edge-background-color,#ee0a24);color:var(--calendar-range-edge-color,#fff)}.van-calendar__day--start{border-radius:4px 0 0 4px}.van-calendar__day--end{border-radius:0 4px 4px 0}.van-calendar__day--multiple-selected,.van-calendar__day--start-end{border-radius:4px}.van-calendar__day--middle{color:var(--calendar-range-middle-color,#ee0a24)}.van-calendar__day--middle:after{background-color:currentColor;bottom:0;content:"";left:0;opacity:var(--calendar-range-middle-background-opacity,.1);position:absolute;right:0;top:0}.van-calendar__day--disabled{color:var(--calendar-day-disabled-color,#c8c9cc);cursor:default}.van-calendar__bottom-info,.van-calendar__top-info{font-size:var(--calendar-info-font-size,10px);left:0;line-height:var(--calendar-info-line-height,14px);position:absolute;right:0}@media (max-width:350px){.van-calendar__bottom-info,.van-calendar__top-info{font-size:9px}}.van-calendar__top-info{top:6px}.van-calendar__bottom-info{bottom:6px}.van-calendar__selected-day{background-color:var(--calendar-selected-day-background-color,#ee0a24);border-radius:4px;color:var(--calendar-selected-day-color,#fff);height:var(--calendar-selected-day-size,54px);width:var(--calendar-selected-day-size,54px)} \ No newline at end of file diff --git a/miniprogram/@vant/weapp/dist/calendar/index.js b/miniprogram/@vant/weapp/dist/calendar/index.js new file mode 100644 index 0000000..3b7b454 --- /dev/null +++ b/miniprogram/@vant/weapp/dist/calendar/index.js @@ -0,0 +1,337 @@ +import { VantComponent } from '../common/component'; +import { ROW_HEIGHT, getPrevDay, getNextDay, getToday, compareDay, copyDates, calcDateNum, formatMonthTitle, compareMonth, getMonths, getDayByOffset, } from './utils'; +import Toast from '../toast/toast'; +import { requestAnimationFrame } from '../common/utils'; +const initialMinDate = getToday().getTime(); +const initialMaxDate = (() => { + const now = getToday(); + return new Date(now.getFullYear(), now.getMonth() + 6, now.getDate()).getTime(); +})(); +const getTime = (date) => date instanceof Date ? date.getTime() : date; +VantComponent({ + props: { + title: { + type: String, + value: '日期选择', + }, + color: String, + show: { + type: Boolean, + observer(val) { + if (val) { + this.initRect(); + this.scrollIntoView(); + } + }, + }, + formatter: null, + confirmText: { + type: String, + value: '确定', + }, + confirmDisabledText: { + type: String, + value: '确定', + }, + rangePrompt: String, + showRangePrompt: { + type: Boolean, + value: true, + }, + defaultDate: { + type: null, + observer(val) { + this.setData({ currentDate: val }); + this.scrollIntoView(); + }, + }, + allowSameDay: Boolean, + type: { + type: String, + value: 'single', + observer: 'reset', + }, + minDate: { + type: Number, + value: initialMinDate, + }, + maxDate: { + type: Number, + value: initialMaxDate, + }, + position: { + type: String, + value: 'bottom', + }, + rowHeight: { + type: null, + value: ROW_HEIGHT, + }, + round: { + type: Boolean, + value: true, + }, + poppable: { + type: Boolean, + value: true, + }, + showMark: { + type: Boolean, + value: true, + }, + showTitle: { + type: Boolean, + value: true, + }, + showConfirm: { + type: Boolean, + value: true, + }, + showSubtitle: { + type: Boolean, + value: true, + }, + safeAreaInsetBottom: { + type: Boolean, + value: true, + }, + closeOnClickOverlay: { + type: Boolean, + value: true, + }, + maxRange: { + type: null, + value: null, + }, + firstDayOfWeek: { + type: Number, + value: 0, + }, + readonly: Boolean, + }, + data: { + subtitle: '', + currentDate: null, + scrollIntoView: '', + }, + created() { + this.setData({ + currentDate: this.getInitialDate(this.data.defaultDate), + }); + }, + mounted() { + if (this.data.show || !this.data.poppable) { + this.initRect(); + this.scrollIntoView(); + } + }, + methods: { + reset() { + this.setData({ currentDate: this.getInitialDate() }); + this.scrollIntoView(); + }, + initRect() { + if (this.contentObserver != null) { + this.contentObserver.disconnect(); + } + const contentObserver = this.createIntersectionObserver({ + thresholds: [0, 0.1, 0.9, 1], + observeAll: true, + }); + this.contentObserver = contentObserver; + contentObserver.relativeTo('.van-calendar__body'); + contentObserver.observe('.month', (res) => { + if (res.boundingClientRect.top <= res.relativeRect.top) { + // @ts-ignore + this.setData({ subtitle: formatMonthTitle(res.dataset.date) }); + } + }); + }, + limitDateRange(date, minDate = null, maxDate = null) { + minDate = minDate || this.data.minDate; + maxDate = maxDate || this.data.maxDate; + if (compareDay(date, minDate) === -1) { + return minDate; + } + if (compareDay(date, maxDate) === 1) { + return maxDate; + } + return date; + }, + getInitialDate(defaultDate = null) { + const { type, minDate, maxDate } = this.data; + const now = getToday().getTime(); + if (type === 'range') { + if (!Array.isArray(defaultDate)) { + defaultDate = []; + } + const [startDay, endDay] = defaultDate || []; + const start = this.limitDateRange(startDay || now, minDate, getPrevDay(new Date(maxDate)).getTime()); + const end = this.limitDateRange(endDay || now, getNextDay(new Date(minDate)).getTime()); + return [start, end]; + } + if (type === 'multiple') { + if (Array.isArray(defaultDate)) { + return defaultDate.map((date) => this.limitDateRange(date)); + } + return [this.limitDateRange(now)]; + } + if (!defaultDate || Array.isArray(defaultDate)) { + defaultDate = now; + } + return this.limitDateRange(defaultDate); + }, + scrollIntoView() { + requestAnimationFrame(() => { + const { currentDate, type, show, poppable, minDate, maxDate } = this.data; + // @ts-ignore + const targetDate = type === 'single' ? currentDate : currentDate[0]; + const displayed = show || !poppable; + if (!targetDate || !displayed) { + return; + } + const months = getMonths(minDate, maxDate); + months.some((month, index) => { + if (compareMonth(month, targetDate) === 0) { + this.setData({ scrollIntoView: `month${index}` }); + return true; + } + return false; + }); + }); + }, + onOpen() { + this.$emit('open'); + }, + onOpened() { + this.$emit('opened'); + }, + onClose() { + this.$emit('close'); + }, + onClosed() { + this.$emit('closed'); + }, + onClickDay(event) { + if (this.data.readonly) { + return; + } + let { date } = event.detail; + const { type, currentDate, allowSameDay } = this.data; + if (type === 'range') { + // @ts-ignore + const [startDay, endDay] = currentDate; + if (startDay && !endDay) { + const compareToStart = compareDay(date, startDay); + if (compareToStart === 1) { + const { days } = this.selectComponent('.month').data; + days.some((day, index) => { + const isDisabled = day.type === 'disabled' && + getTime(startDay) < getTime(day.date) && + getTime(day.date) < getTime(date); + if (isDisabled) { + ({ date } = days[index - 1]); + } + return isDisabled; + }); + this.select([startDay, date], true); + } + else if (compareToStart === -1) { + this.select([date, null]); + } + else if (allowSameDay) { + this.select([date, date]); + } + } + else { + this.select([date, null]); + } + } + else if (type === 'multiple') { + let selectedIndex; + // @ts-ignore + const selected = currentDate.some((dateItem, index) => { + const equal = compareDay(dateItem, date) === 0; + if (equal) { + selectedIndex = index; + } + return equal; + }); + if (selected) { + // @ts-ignore + const cancelDate = currentDate.splice(selectedIndex, 1); + this.setData({ currentDate }); + this.unselect(cancelDate); + } + else { + // @ts-ignore + this.select([...currentDate, date]); + } + } + else { + this.select(date, true); + } + }, + unselect(dateArray) { + const date = dateArray[0]; + if (date) { + this.$emit('unselect', copyDates(date)); + } + }, + select(date, complete) { + if (complete && this.data.type === 'range') { + const valid = this.checkRange(date); + if (!valid) { + // auto selected to max range if showConfirm + if (this.data.showConfirm) { + this.emit([ + date[0], + getDayByOffset(date[0], this.data.maxRange - 1), + ]); + } + else { + this.emit(date); + } + return; + } + } + this.emit(date); + if (complete && !this.data.showConfirm) { + this.onConfirm(); + } + }, + emit(date) { + this.setData({ + currentDate: Array.isArray(date) ? date.map(getTime) : getTime(date), + }); + this.$emit('select', copyDates(date)); + }, + checkRange(date) { + const { maxRange, rangePrompt, showRangePrompt } = this.data; + if (maxRange && calcDateNum(date) > maxRange) { + if (showRangePrompt) { + Toast({ + context: this, + message: rangePrompt || `选择天数不能超过 ${maxRange} 天`, + }); + } + this.$emit('over-range'); + return false; + } + return true; + }, + onConfirm() { + if (this.data.type === 'range' && + !this.checkRange(this.data.currentDate)) { + return; + } + wx.nextTick(() => { + // @ts-ignore + this.$emit('confirm', copyDates(this.data.currentDate)); + }); + }, + onClickSubtitle(event) { + this.$emit('click-subtitle', event); + }, + }, +}); diff --git a/miniprogram/@vant/weapp/dist/calendar/index.json b/miniprogram/@vant/weapp/dist/calendar/index.json new file mode 100644 index 0000000..397d5ae --- /dev/null +++ b/miniprogram/@vant/weapp/dist/calendar/index.json @@ -0,0 +1,10 @@ +{ + "component": true, + "usingComponents": { + "header": "./components/header/index", + "month": "./components/month/index", + "van-button": "../button/index", + "van-popup": "../popup/index", + "van-toast": "../toast/index" + } +} diff --git a/miniprogram/@vant/weapp/dist/calendar/index.wxml b/miniprogram/@vant/weapp/dist/calendar/index.wxml new file mode 100644 index 0000000..bc8bcfd --- /dev/null +++ b/miniprogram/@vant/weapp/dist/calendar/index.wxml @@ -0,0 +1,25 @@ + + + + + + + + + + + + diff --git a/miniprogram/@vant/weapp/dist/calendar/index.wxs b/miniprogram/@vant/weapp/dist/calendar/index.wxs new file mode 100644 index 0000000..0c570fc --- /dev/null +++ b/miniprogram/@vant/weapp/dist/calendar/index.wxs @@ -0,0 +1,38 @@ +/* eslint-disable */ +var utils = require('./utils.wxs'); + +function getMonths(minDate, maxDate) { + var months = []; + var cursor = getDate(minDate); + + cursor.setDate(1); + cursor.setMinutes(cursor.getMinutes() - cursor.getTimezoneOffset()); + + do { + months.push(cursor.getTime()); + cursor.setMonth(cursor.getMonth() + 1); + } while (utils.compareMonth(cursor, getDate(maxDate)) !== 1); + + return months; +} + +function getButtonDisabled(type, currentDate) { + if (currentDate == null) { + return true; + } + + if (type === 'range') { + return !currentDate[0] || !currentDate[1]; + } + + if (type === 'multiple') { + return !currentDate.length; + } + + return !currentDate; +} + +module.exports = { + getMonths: getMonths, + getButtonDisabled: getButtonDisabled +}; diff --git a/miniprogram/@vant/weapp/dist/calendar/index.wxss b/miniprogram/@vant/weapp/dist/calendar/index.wxss new file mode 100644 index 0000000..05df518 --- /dev/null +++ b/miniprogram/@vant/weapp/dist/calendar/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-calendar{background-color:var(--calendar-background-color,#fff);display:flex;flex-direction:column;height:var(--calendar-height,100%)}.van-calendar__close-icon{top:11px}.van-calendar__popup--bottom,.van-calendar__popup--top{height:var(--calendar-popup-height,80%)}.van-calendar__popup--left,.van-calendar__popup--right{height:100%}.van-calendar__body{-webkit-overflow-scrolling:touch;flex:1;overflow:auto}.van-calendar__footer{flex-shrink:0;padding:0 var(--padding-md,16px)}.van-calendar__footer--safe-area-inset-bottom{padding-bottom:env(safe-area-inset-bottom)}.van-calendar__footer+.van-calendar__footer,.van-calendar__footer:empty{display:none}.van-calendar__footer:empty+.van-calendar__footer{display:block!important}.van-calendar__confirm{height:var(--calendar-confirm-button-height,36px)!important;line-height:var(--calendar-confirm-button-line-height,34px)!important;margin:var(--calendar-confirm-button-margin,7px 0)!important} \ No newline at end of file diff --git a/miniprogram/@vant/weapp/dist/calendar/utils.js b/miniprogram/@vant/weapp/dist/calendar/utils.js new file mode 100644 index 0000000..83d6971 --- /dev/null +++ b/miniprogram/@vant/weapp/dist/calendar/utils.js @@ -0,0 +1,83 @@ +export const ROW_HEIGHT = 64; +export function formatMonthTitle(date) { + if (!(date instanceof Date)) { + date = new Date(date); + } + return `${date.getFullYear()}年${date.getMonth() + 1}月`; +} +export function compareMonth(date1, date2) { + if (!(date1 instanceof Date)) { + date1 = new Date(date1); + } + if (!(date2 instanceof Date)) { + date2 = new Date(date2); + } + const year1 = date1.getFullYear(); + const year2 = date2.getFullYear(); + const month1 = date1.getMonth(); + const month2 = date2.getMonth(); + if (year1 === year2) { + return month1 === month2 ? 0 : month1 > month2 ? 1 : -1; + } + return year1 > year2 ? 1 : -1; +} +export function compareDay(day1, day2) { + if (!(day1 instanceof Date)) { + day1 = new Date(day1); + } + if (!(day2 instanceof Date)) { + day2 = new Date(day2); + } + const compareMonthResult = compareMonth(day1, day2); + if (compareMonthResult === 0) { + const date1 = day1.getDate(); + const date2 = day2.getDate(); + return date1 === date2 ? 0 : date1 > date2 ? 1 : -1; + } + return compareMonthResult; +} +export function getDayByOffset(date, offset) { + date = new Date(date); + date.setDate(date.getDate() + offset); + return date; +} +export function getPrevDay(date) { + return getDayByOffset(date, -1); +} +export function getNextDay(date) { + return getDayByOffset(date, 1); +} +export function getToday() { + const today = new Date(); + today.setHours(0, 0, 0, 0); + return today; +} +export function calcDateNum(date) { + const day1 = new Date(date[0]).getTime(); + const day2 = new Date(date[1]).getTime(); + return (day2 - day1) / (1000 * 60 * 60 * 24) + 1; +} +export function copyDates(dates) { + if (Array.isArray(dates)) { + return dates.map((date) => { + if (date === null) { + return date; + } + return new Date(date); + }); + } + return new Date(dates); +} +export function getMonthEndDay(year, month) { + return 32 - new Date(year, month - 1, 32).getDate(); +} +export function getMonths(minDate, maxDate) { + const months = []; + const cursor = new Date(minDate); + cursor.setDate(1); + do { + months.push(cursor.getTime()); + cursor.setMonth(cursor.getMonth() + 1); + } while (compareMonth(cursor, maxDate) !== 1); + return months; +} diff --git a/miniprogram/@vant/weapp/dist/calendar/utils.wxs b/miniprogram/@vant/weapp/dist/calendar/utils.wxs new file mode 100644 index 0000000..e57f6b3 --- /dev/null +++ b/miniprogram/@vant/weapp/dist/calendar/utils.wxs @@ -0,0 +1,25 @@ +/* eslint-disable */ +function getMonthEndDay(year, month) { + return 32 - getDate(year, month - 1, 32).getDate(); +} + +function compareMonth(date1, date2) { + date1 = getDate(date1); + date2 = getDate(date2); + + var year1 = date1.getFullYear(); + var year2 = date2.getFullYear(); + var month1 = date1.getMonth(); + var month2 = date2.getMonth(); + + if (year1 === year2) { + return month1 === month2 ? 0 : month1 > month2 ? 1 : -1; + } + + return year1 > year2 ? 1 : -1; +} + +module.exports = { + getMonthEndDay: getMonthEndDay, + compareMonth: compareMonth +}; diff --git a/miniprogram/@vant/weapp/dist/card/index.js b/miniprogram/@vant/weapp/dist/card/index.js new file mode 100644 index 0000000..5bbd212 --- /dev/null +++ b/miniprogram/@vant/weapp/dist/card/index.js @@ -0,0 +1,49 @@ +import { link } from '../mixins/link'; +import { VantComponent } from '../common/component'; +VantComponent({ + classes: [ + 'num-class', + 'desc-class', + 'thumb-class', + 'title-class', + 'price-class', + 'origin-price-class', + ], + mixins: [link], + props: { + tag: String, + num: String, + desc: String, + thumb: String, + title: String, + price: { + type: String, + observer: 'updatePrice', + }, + centered: Boolean, + lazyLoad: Boolean, + thumbLink: String, + originPrice: String, + thumbMode: { + type: String, + value: 'aspectFit', + }, + currency: { + type: String, + value: '¥', + }, + }, + methods: { + updatePrice() { + const { price } = this.data; + const priceArr = price.toString().split('.'); + this.setData({ + integerStr: priceArr[0], + decimalStr: priceArr[1] ? `.${priceArr[1]}` : '', + }); + }, + onClickThumb() { + this.jumpLink('thumbLink'); + }, + }, +}); diff --git a/miniprogram/@vant/weapp/dist/card/index.json b/miniprogram/@vant/weapp/dist/card/index.json new file mode 100644 index 0000000..e917407 --- /dev/null +++ b/miniprogram/@vant/weapp/dist/card/index.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "van-tag": "../tag/index" + } +} diff --git a/miniprogram/@vant/weapp/dist/card/index.wxml b/miniprogram/@vant/weapp/dist/card/index.wxml new file mode 100644 index 0000000..62173e4 --- /dev/null +++ b/miniprogram/@vant/weapp/dist/card/index.wxml @@ -0,0 +1,56 @@ + + + + + + + + + {{ tag }} + + + + + + + {{ title }} + + + {{ desc }} + + + + + + + + + {{ currency }} + {{ integerStr }} + {{ decimalStr }} + + + {{ currency }} {{ originPrice }} + + x {{ num }} + + + + + + + + + + diff --git a/miniprogram/@vant/weapp/dist/card/index.wxss b/miniprogram/@vant/weapp/dist/card/index.wxss new file mode 100644 index 0000000..0f4d7c5 --- /dev/null +++ b/miniprogram/@vant/weapp/dist/card/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-card{background-color:var(--card-background-color,#fafafa);box-sizing:border-box;color:var(--card-text-color,#323233);font-size:var(--card-font-size,12px);padding:var(--card-padding,8px 16px);position:relative}.van-card__header{display:flex}.van-card__header--center{align-items:center;justify-content:center}.van-card__thumb{flex:none;height:var(--card-thumb-size,88px);margin-right:var(--padding-xs,8px);position:relative;width:var(--card-thumb-size,88px)}.van-card__thumb:empty{display:none}.van-card__img{border-radius:8px;height:100%;width:100%}.van-card__content{display:flex;flex:1;flex-direction:column;justify-content:space-between;min-height:var(--card-thumb-size,88px);min-width:0;position:relative}.van-card__content--center{justify-content:center}.van-card__desc,.van-card__title{word-wrap:break-word}.van-card__title{font-weight:700;line-height:var(--card-title-line-height,16px)}.van-card__desc{color:var(--card-desc-color,#646566);line-height:var(--card-desc-line-height,20px)}.van-card__bottom{line-height:20px}.van-card__price{color:var(--card-price-color,#ee0a24);display:inline-block;font-size:var(--card-price-font-size,12px);font-weight:700}.van-card__price-integer{font-size:var(--card-price-integer-font-size,16px)}.van-card__price-decimal,.van-card__price-integer{font-family:var(--card-price-font-family,Avenir-Heavy,PingFang SC,Helvetica Neue,Arial,sans-serif)}.van-card__origin-price{color:var(--card-origin-price-color,#646566);display:inline-block;font-size:var(--card-origin-price-font-size,10px);margin-left:5px;text-decoration:line-through}.van-card__num{float:right}.van-card__tag{left:0;position:absolute!important;top:2px}.van-card__footer{flex:none;text-align:right;width:100%} \ No newline at end of file diff --git a/miniprogram/@vant/weapp/dist/cell-group/index.js b/miniprogram/@vant/weapp/dist/cell-group/index.js new file mode 100644 index 0000000..170760f --- /dev/null +++ b/miniprogram/@vant/weapp/dist/cell-group/index.js @@ -0,0 +1,11 @@ +import { VantComponent } from '../common/component'; +VantComponent({ + props: { + title: String, + border: { + type: Boolean, + value: true, + }, + inset: Boolean, + }, +}); diff --git a/miniprogram/@vant/weapp/dist/cell-group/index.json b/miniprogram/@vant/weapp/dist/cell-group/index.json new file mode 100644 index 0000000..467ce29 --- /dev/null +++ b/miniprogram/@vant/weapp/dist/cell-group/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} diff --git a/miniprogram/@vant/weapp/dist/cell-group/index.wxml b/miniprogram/@vant/weapp/dist/cell-group/index.wxml new file mode 100644 index 0000000..311e064 --- /dev/null +++ b/miniprogram/@vant/weapp/dist/cell-group/index.wxml @@ -0,0 +1,11 @@ + + + + {{ title }} + + + + diff --git a/miniprogram/@vant/weapp/dist/cell-group/index.wxss b/miniprogram/@vant/weapp/dist/cell-group/index.wxss new file mode 100644 index 0000000..08b252f --- /dev/null +++ b/miniprogram/@vant/weapp/dist/cell-group/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-cell-group--inset{border-radius:var(--cell-group-inset-border-radius,8px);margin:var(--cell-group-inset-padding,0 16px);overflow:hidden}.van-cell-group__title{color:var(--cell-group-title-color,#969799);font-size:var(--cell-group-title-font-size,14px);line-height:var(--cell-group-title-line-height,16px);padding:var(--cell-group-title-padding,16px 16px 8px)}.van-cell-group__title--inset{padding:var(--cell-group-inset-title-padding,16px 16px 8px 32px)} \ No newline at end of file diff --git a/miniprogram/@vant/weapp/dist/cell/index.js b/miniprogram/@vant/weapp/dist/cell/index.js new file mode 100644 index 0000000..35548b9 --- /dev/null +++ b/miniprogram/@vant/weapp/dist/cell/index.js @@ -0,0 +1,38 @@ +import { link } from '../mixins/link'; +import { VantComponent } from '../common/component'; +VantComponent({ + classes: [ + 'title-class', + 'label-class', + 'value-class', + 'right-icon-class', + 'hover-class', + ], + mixins: [link], + props: { + title: null, + value: null, + icon: String, + size: String, + label: String, + center: Boolean, + isLink: Boolean, + required: Boolean, + clickable: Boolean, + titleWidth: String, + customStyle: String, + arrowDirection: String, + useLabelSlot: Boolean, + border: { + type: Boolean, + value: true, + }, + titleStyle: String, + }, + methods: { + onClick(event) { + this.$emit('click', event.detail); + this.jumpLink(); + }, + }, +}); diff --git a/miniprogram/@vant/weapp/dist/cell/index.json b/miniprogram/@vant/weapp/dist/cell/index.json new file mode 100644 index 0000000..0a336c0 --- /dev/null +++ b/miniprogram/@vant/weapp/dist/cell/index.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "van-icon": "../icon/index" + } +} diff --git a/miniprogram/@vant/weapp/dist/cell/index.wxml b/miniprogram/@vant/weapp/dist/cell/index.wxml new file mode 100644 index 0000000..8387c3c --- /dev/null +++ b/miniprogram/@vant/weapp/dist/cell/index.wxml @@ -0,0 +1,47 @@ + + + + + + + + + + {{ title }} + + + + + {{ label }} + + + + + {{ value }} + + + + + + + + diff --git a/miniprogram/@vant/weapp/dist/cell/index.wxs b/miniprogram/@vant/weapp/dist/cell/index.wxs new file mode 100644 index 0000000..e3500c4 --- /dev/null +++ b/miniprogram/@vant/weapp/dist/cell/index.wxs @@ -0,0 +1,17 @@ +/* eslint-disable */ +var style = require('../wxs/style.wxs'); +var addUnit = require('../wxs/add-unit.wxs'); + +function titleStyle(data) { + return style([ + { + 'max-width': addUnit(data.titleWidth), + 'min-width': addUnit(data.titleWidth), + }, + data.titleStyle, + ]); +} + +module.exports = { + titleStyle: titleStyle, +}; diff --git a/miniprogram/@vant/weapp/dist/cell/index.wxss b/miniprogram/@vant/weapp/dist/cell/index.wxss new file mode 100644 index 0000000..1802f8e --- /dev/null +++ b/miniprogram/@vant/weapp/dist/cell/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-cell{background-color:var(--cell-background-color,#fff);box-sizing:border-box;color:var(--cell-text-color,#323233);display:flex;font-size:var(--cell-font-size,14px);line-height:var(--cell-line-height,24px);padding:var(--cell-vertical-padding,10px) var(--cell-horizontal-padding,16px);position:relative;width:100%}.van-cell:after{border-bottom:1px solid #ebedf0;bottom:0;box-sizing:border-box;content:" ";left:16px;pointer-events:none;position:absolute;right:16px;transform:scaleY(.5);transform-origin:center}.van-cell--borderless:after{display:none}.van-cell-group{background-color:var(--cell-background-color,#fff)}.van-cell__label{color:var(--cell-label-color,#969799);font-size:var(--cell-label-font-size,12px);line-height:var(--cell-label-line-height,18px);margin-top:var(--cell-label-margin-top,3px)}.van-cell__value{color:var(--cell-value-color,#969799);overflow:hidden;text-align:right;vertical-align:middle}.van-cell__title,.van-cell__value{flex:1}.van-cell__title:empty,.van-cell__value:empty{display:none}.van-cell__left-icon-wrap,.van-cell__right-icon-wrap{align-items:center;display:flex;font-size:var(--cell-icon-size,16px);height:var(--cell-line-height,24px)}.van-cell__left-icon-wrap{margin-right:var(--padding-base,4px)}.van-cell__right-icon-wrap{color:var(--cell-right-icon-color,#969799);margin-left:var(--padding-base,4px)}.van-cell__left-icon{vertical-align:middle}.van-cell__left-icon,.van-cell__right-icon{line-height:var(--cell-line-height,24px)}.van-cell--clickable.van-cell--hover{background-color:var(--cell-active-color,#f2f3f5)}.van-cell--required{overflow:visible}.van-cell--required:before{color:var(--cell-required-color,#ee0a24);content:"*";font-size:var(--cell-font-size,14px);left:var(--padding-xs,8px);position:absolute}.van-cell--center{align-items:center}.van-cell--large{padding-bottom:var(--cell-large-vertical-padding,12px);padding-top:var(--cell-large-vertical-padding,12px)}.van-cell--large .van-cell__title{font-size:var(--cell-large-title-font-size,16px)}.van-cell--large .van-cell__value{font-size:var(--cell-large-value-font-size,16px)}.van-cell--large .van-cell__label{font-size:var(--cell-large-label-font-size,14px)} \ No newline at end of file diff --git a/miniprogram/@vant/weapp/dist/checkbox-group/index.js b/miniprogram/@vant/weapp/dist/checkbox-group/index.js new file mode 100644 index 0000000..c47d97d --- /dev/null +++ b/miniprogram/@vant/weapp/dist/checkbox-group/index.js @@ -0,0 +1,36 @@ +import { useChildren } from '../common/relation'; +import { VantComponent } from '../common/component'; +VantComponent({ + field: true, + relation: useChildren('checkbox', function (target) { + this.updateChild(target); + }), + props: { + max: Number, + value: { + type: Array, + observer: 'updateChildren', + }, + disabled: { + type: Boolean, + observer: 'updateChildren', + }, + direction: { + type: String, + value: 'vertical', + }, + }, + methods: { + updateChildren() { + this.children.forEach((child) => this.updateChild(child)); + }, + updateChild(child) { + const { value, disabled, direction } = this.data; + child.setData({ + value: value.indexOf(child.data.name) !== -1, + parentDisabled: disabled, + direction, + }); + }, + }, +}); diff --git a/miniprogram/@vant/weapp/dist/checkbox-group/index.json b/miniprogram/@vant/weapp/dist/checkbox-group/index.json new file mode 100644 index 0000000..467ce29 --- /dev/null +++ b/miniprogram/@vant/weapp/dist/checkbox-group/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} diff --git a/miniprogram/@vant/weapp/dist/checkbox-group/index.wxml b/miniprogram/@vant/weapp/dist/checkbox-group/index.wxml new file mode 100644 index 0000000..638bf9d --- /dev/null +++ b/miniprogram/@vant/weapp/dist/checkbox-group/index.wxml @@ -0,0 +1,5 @@ + + + + + diff --git a/miniprogram/@vant/weapp/dist/checkbox-group/index.wxss b/miniprogram/@vant/weapp/dist/checkbox-group/index.wxss new file mode 100644 index 0000000..c5666d7 --- /dev/null +++ b/miniprogram/@vant/weapp/dist/checkbox-group/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-checkbox-group--horizontal{display:flex;flex-wrap:wrap} \ No newline at end of file diff --git a/miniprogram/@vant/weapp/dist/checkbox/index.js b/miniprogram/@vant/weapp/dist/checkbox/index.js new file mode 100644 index 0000000..e3b78ab --- /dev/null +++ b/miniprogram/@vant/weapp/dist/checkbox/index.js @@ -0,0 +1,77 @@ +import { useParent } from '../common/relation'; +import { VantComponent } from '../common/component'; +function emit(target, value) { + target.$emit('input', value); + target.$emit('change', value); +} +VantComponent({ + field: true, + relation: useParent('checkbox-group'), + classes: ['icon-class', 'label-class'], + props: { + value: Boolean, + disabled: Boolean, + useIconSlot: Boolean, + checkedColor: String, + labelPosition: { + type: String, + value: 'right', + }, + labelDisabled: Boolean, + shape: { + type: String, + value: 'round', + }, + iconSize: { + type: null, + value: 20, + }, + }, + data: { + parentDisabled: false, + direction: 'vertical', + }, + methods: { + emitChange(value) { + if (this.parent) { + this.setParentValue(this.parent, value); + } + else { + emit(this, value); + } + }, + toggle() { + const { parentDisabled, disabled, value } = this.data; + if (!disabled && !parentDisabled) { + this.emitChange(!value); + } + }, + onClickLabel() { + const { labelDisabled, parentDisabled, disabled, value } = this.data; + if (!disabled && !labelDisabled && !parentDisabled) { + this.emitChange(!value); + } + }, + setParentValue(parent, value) { + const parentValue = parent.data.value.slice(); + const { name } = this.data; + const { max } = parent.data; + if (value) { + if (max && parentValue.length >= max) { + return; + } + if (parentValue.indexOf(name) === -1) { + parentValue.push(name); + emit(parent, parentValue); + } + } + else { + const index = parentValue.indexOf(name); + if (index !== -1) { + parentValue.splice(index, 1); + emit(parent, parentValue); + } + } + }, + }, +}); diff --git a/miniprogram/@vant/weapp/dist/checkbox/index.json b/miniprogram/@vant/weapp/dist/checkbox/index.json new file mode 100644 index 0000000..0a336c0 --- /dev/null +++ b/miniprogram/@vant/weapp/dist/checkbox/index.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "van-icon": "../icon/index" + } +} diff --git a/miniprogram/@vant/weapp/dist/checkbox/index.wxml b/miniprogram/@vant/weapp/dist/checkbox/index.wxml new file mode 100644 index 0000000..39a7bb0 --- /dev/null +++ b/miniprogram/@vant/weapp/dist/checkbox/index.wxml @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + diff --git a/miniprogram/@vant/weapp/dist/checkbox/index.wxs b/miniprogram/@vant/weapp/dist/checkbox/index.wxs new file mode 100644 index 0000000..eb9c772 --- /dev/null +++ b/miniprogram/@vant/weapp/dist/checkbox/index.wxs @@ -0,0 +1,20 @@ +/* eslint-disable */ +var style = require('../wxs/style.wxs'); +var addUnit = require('../wxs/add-unit.wxs'); + +function iconStyle(checkedColor, value, disabled, parentDisabled, iconSize) { + var styles = { + 'font-size': addUnit(iconSize), + }; + + if (checkedColor && value && !disabled && !parentDisabled) { + styles['border-color'] = checkedColor; + styles['background-color'] = checkedColor; + } + + return style(styles); +} + +module.exports = { + iconStyle: iconStyle, +}; diff --git a/miniprogram/@vant/weapp/dist/checkbox/index.wxss b/miniprogram/@vant/weapp/dist/checkbox/index.wxss new file mode 100644 index 0000000..da2272a --- /dev/null +++ b/miniprogram/@vant/weapp/dist/checkbox/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-checkbox{align-items:center;display:flex;overflow:hidden;-webkit-user-select:none;user-select:none}.van-checkbox--horizontal{margin-right:12px}.van-checkbox__icon-wrap,.van-checkbox__label{line-height:var(--checkbox-size,20px)}.van-checkbox__icon-wrap{flex:none}.van-checkbox__icon{align-items:center;border:1px solid var(--checkbox-border-color,#c8c9cc);box-sizing:border-box;color:transparent;display:flex;font-size:var(--checkbox-size,20px);height:1em;justify-content:center;text-align:center;transition-duration:var(--checkbox-transition-duration,.2s);transition-property:color,border-color,background-color;width:1em}.van-checkbox__icon--round{border-radius:100%}.van-checkbox__icon--checked{background-color:var(--checkbox-checked-icon-color,#1989fa);border-color:var(--checkbox-checked-icon-color,#1989fa);color:#fff}.van-checkbox__icon--disabled{background-color:var(--checkbox-disabled-background-color,#ebedf0);border-color:var(--checkbox-disabled-icon-color,#c8c9cc)}.van-checkbox__icon--disabled.van-checkbox__icon--checked{color:var(--checkbox-disabled-icon-color,#c8c9cc)}.van-checkbox__label{word-wrap:break-word;color:var(--checkbox-label-color,#323233);padding-left:var(--checkbox-label-margin,10px)}.van-checkbox__label--left{float:left;margin:0 var(--checkbox-label-margin,10px) 0 0}.van-checkbox__label--disabled{color:var(--checkbox-disabled-label-color,#c8c9cc)}.van-checkbox__label:empty{margin:0} \ No newline at end of file diff --git a/miniprogram/@vant/weapp/dist/circle/canvas.js b/miniprogram/@vant/weapp/dist/circle/canvas.js new file mode 100644 index 0000000..3ade4cd --- /dev/null +++ b/miniprogram/@vant/weapp/dist/circle/canvas.js @@ -0,0 +1,43 @@ +export function adaptor(ctx) { + // @ts-ignore + return Object.assign(ctx, { + setStrokeStyle(val) { + ctx.strokeStyle = val; + }, + setLineWidth(val) { + ctx.lineWidth = val; + }, + setLineCap(val) { + ctx.lineCap = val; + }, + setFillStyle(val) { + ctx.fillStyle = val; + }, + setFontSize(val) { + ctx.font = String(val); + }, + setGlobalAlpha(val) { + ctx.globalAlpha = val; + }, + setLineJoin(val) { + ctx.lineJoin = val; + }, + setTextAlign(val) { + ctx.textAlign = val; + }, + setMiterLimit(val) { + ctx.miterLimit = val; + }, + setShadow(offsetX, offsetY, blur, color) { + ctx.shadowOffsetX = offsetX; + ctx.shadowOffsetY = offsetY; + ctx.shadowBlur = blur; + ctx.shadowColor = color; + }, + setTextBaseline(val) { + ctx.textBaseline = val; + }, + createCircularGradient() { }, + draw() { }, + }); +} diff --git a/miniprogram/@vant/weapp/dist/circle/index.js b/miniprogram/@vant/weapp/dist/circle/index.js new file mode 100644 index 0000000..2a4baf5 --- /dev/null +++ b/miniprogram/@vant/weapp/dist/circle/index.js @@ -0,0 +1,193 @@ +import { BLUE, WHITE } from '../common/color'; +import { VantComponent } from '../common/component'; +import { getSystemInfoSync } from '../common/utils'; +import { isObj } from '../common/validator'; +import { canIUseCanvas2d } from '../common/version'; +import { adaptor } from './canvas'; +function format(rate) { + return Math.min(Math.max(rate, 0), 100); +} +const PERIMETER = 2 * Math.PI; +const BEGIN_ANGLE = -Math.PI / 2; +const STEP = 1; +VantComponent({ + props: { + text: String, + lineCap: { + type: String, + value: 'round', + }, + value: { + type: Number, + value: 0, + observer: 'reRender', + }, + speed: { + type: Number, + value: 50, + }, + size: { + type: Number, + value: 100, + observer() { + this.drawCircle(this.currentValue); + }, + }, + fill: String, + layerColor: { + type: String, + value: WHITE, + }, + color: { + type: null, + value: BLUE, + observer() { + this.setHoverColor().then(() => { + this.drawCircle(this.currentValue); + }); + }, + }, + type: { + type: String, + value: '', + }, + strokeWidth: { + type: Number, + value: 4, + }, + clockwise: { + type: Boolean, + value: true, + }, + }, + data: { + hoverColor: BLUE, + }, + methods: { + getContext() { + const { type, size } = this.data; + if (type === '' || !canIUseCanvas2d()) { + const ctx = wx.createCanvasContext('van-circle', this); + return Promise.resolve(ctx); + } + const dpr = getSystemInfoSync().pixelRatio; + return new Promise((resolve) => { + wx.createSelectorQuery() + .in(this) + .select('#van-circle') + .node() + .exec((res) => { + const canvas = res[0].node; + const ctx = canvas.getContext(type); + if (!this.inited) { + this.inited = true; + canvas.width = size * dpr; + canvas.height = size * dpr; + ctx.scale(dpr, dpr); + } + resolve(adaptor(ctx)); + }); + }); + }, + setHoverColor() { + const { color, size } = this.data; + if (isObj(color)) { + return this.getContext().then((context) => { + const LinearColor = context.createLinearGradient(size, 0, 0, 0); + Object.keys(color) + .sort((a, b) => parseFloat(a) - parseFloat(b)) + .map((key) => LinearColor.addColorStop(parseFloat(key) / 100, color[key])); + this.hoverColor = LinearColor; + }); + } + this.hoverColor = color; + return Promise.resolve(); + }, + presetCanvas(context, strokeStyle, beginAngle, endAngle, fill) { + const { strokeWidth, lineCap, clockwise, size } = this.data; + const position = size / 2; + const radius = position - strokeWidth / 2; + context.setStrokeStyle(strokeStyle); + context.setLineWidth(strokeWidth); + context.setLineCap(lineCap); + context.beginPath(); + context.arc(position, position, radius, beginAngle, endAngle, !clockwise); + context.stroke(); + if (fill) { + context.setFillStyle(fill); + context.fill(); + } + }, + renderLayerCircle(context) { + const { layerColor, fill } = this.data; + this.presetCanvas(context, layerColor, 0, PERIMETER, fill); + }, + renderHoverCircle(context, formatValue) { + const { clockwise } = this.data; + // 结束角度 + const progress = PERIMETER * (formatValue / 100); + const endAngle = clockwise + ? BEGIN_ANGLE + progress + : 3 * Math.PI - (BEGIN_ANGLE + progress); + this.presetCanvas(context, this.hoverColor, BEGIN_ANGLE, endAngle); + }, + drawCircle(currentValue) { + const { size } = this.data; + this.getContext().then((context) => { + context.clearRect(0, 0, size, size); + this.renderLayerCircle(context); + const formatValue = format(currentValue); + if (formatValue !== 0) { + this.renderHoverCircle(context, formatValue); + } + context.draw(); + }); + }, + reRender() { + // tofector 动画暂时没有想到好的解决方案 + const { value, speed } = this.data; + if (speed <= 0 || speed > 1000) { + this.drawCircle(value); + return; + } + this.clearMockInterval(); + this.currentValue = this.currentValue || 0; + const run = () => { + this.interval = setTimeout(() => { + if (this.currentValue !== value) { + if (Math.abs(this.currentValue - value) < STEP) { + this.currentValue = value; + } + else if (this.currentValue < value) { + this.currentValue += STEP; + } + else { + this.currentValue -= STEP; + } + this.drawCircle(this.currentValue); + run(); + } + else { + this.clearMockInterval(); + } + }, 1000 / speed); + }; + run(); + }, + clearMockInterval() { + if (this.interval) { + clearTimeout(this.interval); + this.interval = null; + } + }, + }, + mounted() { + this.currentValue = this.data.value; + this.setHoverColor().then(() => { + this.drawCircle(this.currentValue); + }); + }, + destroyed() { + this.clearMockInterval(); + }, +}); diff --git a/miniprogram/@vant/weapp/dist/circle/index.json b/miniprogram/@vant/weapp/dist/circle/index.json new file mode 100644 index 0000000..467ce29 --- /dev/null +++ b/miniprogram/@vant/weapp/dist/circle/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} diff --git a/miniprogram/@vant/weapp/dist/circle/index.wxml b/miniprogram/@vant/weapp/dist/circle/index.wxml new file mode 100644 index 0000000..52bc59f --- /dev/null +++ b/miniprogram/@vant/weapp/dist/circle/index.wxml @@ -0,0 +1,9 @@ + + + + + + + + {{ text }} + diff --git a/miniprogram/@vant/weapp/dist/circle/index.wxss b/miniprogram/@vant/weapp/dist/circle/index.wxss new file mode 100644 index 0000000..2200751 --- /dev/null +++ b/miniprogram/@vant/weapp/dist/circle/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-circle{display:inline-block;position:relative;text-align:center}.van-circle__text{color:var(--circle-text-color,#323233);left:0;position:absolute;top:50%;transform:translateY(-50%);width:100%} \ No newline at end of file diff --git a/miniprogram/@vant/weapp/dist/col/index.js b/miniprogram/@vant/weapp/dist/col/index.js new file mode 100644 index 0000000..02bb78d --- /dev/null +++ b/miniprogram/@vant/weapp/dist/col/index.js @@ -0,0 +1,9 @@ +import { useParent } from '../common/relation'; +import { VantComponent } from '../common/component'; +VantComponent({ + relation: useParent('row'), + props: { + span: Number, + offset: Number, + }, +}); diff --git a/miniprogram/@vant/weapp/dist/col/index.json b/miniprogram/@vant/weapp/dist/col/index.json new file mode 100644 index 0000000..467ce29 --- /dev/null +++ b/miniprogram/@vant/weapp/dist/col/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} diff --git a/miniprogram/@vant/weapp/dist/col/index.wxml b/miniprogram/@vant/weapp/dist/col/index.wxml new file mode 100644 index 0000000..975348b --- /dev/null +++ b/miniprogram/@vant/weapp/dist/col/index.wxml @@ -0,0 +1,9 @@ + + + + + + diff --git a/miniprogram/@vant/weapp/dist/col/index.wxs b/miniprogram/@vant/weapp/dist/col/index.wxs new file mode 100644 index 0000000..507c1cb --- /dev/null +++ b/miniprogram/@vant/weapp/dist/col/index.wxs @@ -0,0 +1,18 @@ +/* eslint-disable */ +var style = require('../wxs/style.wxs'); +var addUnit = require('../wxs/add-unit.wxs'); + +function rootStyle(data) { + if (!data.gutter) { + return ''; + } + + return style({ + 'padding-right': addUnit(data.gutter / 2), + 'padding-left': addUnit(data.gutter / 2), + }); +} + +module.exports = { + rootStyle: rootStyle, +}; diff --git a/miniprogram/@vant/weapp/dist/col/index.wxss b/miniprogram/@vant/weapp/dist/col/index.wxss new file mode 100644 index 0000000..2fa265e --- /dev/null +++ b/miniprogram/@vant/weapp/dist/col/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-col{box-sizing:border-box;float:left}.van-col--1{width:4.16666667%}.van-col--offset-1{margin-left:4.16666667%}.van-col--2{width:8.33333333%}.van-col--offset-2{margin-left:8.33333333%}.van-col--3{width:12.5%}.van-col--offset-3{margin-left:12.5%}.van-col--4{width:16.66666667%}.van-col--offset-4{margin-left:16.66666667%}.van-col--5{width:20.83333333%}.van-col--offset-5{margin-left:20.83333333%}.van-col--6{width:25%}.van-col--offset-6{margin-left:25%}.van-col--7{width:29.16666667%}.van-col--offset-7{margin-left:29.16666667%}.van-col--8{width:33.33333333%}.van-col--offset-8{margin-left:33.33333333%}.van-col--9{width:37.5%}.van-col--offset-9{margin-left:37.5%}.van-col--10{width:41.66666667%}.van-col--offset-10{margin-left:41.66666667%}.van-col--11{width:45.83333333%}.van-col--offset-11{margin-left:45.83333333%}.van-col--12{width:50%}.van-col--offset-12{margin-left:50%}.van-col--13{width:54.16666667%}.van-col--offset-13{margin-left:54.16666667%}.van-col--14{width:58.33333333%}.van-col--offset-14{margin-left:58.33333333%}.van-col--15{width:62.5%}.van-col--offset-15{margin-left:62.5%}.van-col--16{width:66.66666667%}.van-col--offset-16{margin-left:66.66666667%}.van-col--17{width:70.83333333%}.van-col--offset-17{margin-left:70.83333333%}.van-col--18{width:75%}.van-col--offset-18{margin-left:75%}.van-col--19{width:79.16666667%}.van-col--offset-19{margin-left:79.16666667%}.van-col--20{width:83.33333333%}.van-col--offset-20{margin-left:83.33333333%}.van-col--21{width:87.5%}.van-col--offset-21{margin-left:87.5%}.van-col--22{width:91.66666667%}.van-col--offset-22{margin-left:91.66666667%}.van-col--23{width:95.83333333%}.van-col--offset-23{margin-left:95.83333333%}.van-col--24{width:100%}.van-col--offset-24{margin-left:100%} \ No newline at end of file diff --git a/miniprogram/@vant/weapp/dist/collapse-item/animate.js b/miniprogram/@vant/weapp/dist/collapse-item/animate.js new file mode 100644 index 0000000..f966ac5 --- /dev/null +++ b/miniprogram/@vant/weapp/dist/collapse-item/animate.js @@ -0,0 +1,39 @@ +import { getRect } from '../common/utils'; +function useAnimation(context, expanded, mounted, height) { + const animation = wx.createAnimation({ + duration: 0, + timingFunction: 'ease-in-out', + }); + if (expanded) { + if (height === 0) { + animation.height('auto').top(1).step(); + } + else { + animation + .height(height) + .top(1) + .step({ + duration: mounted ? 300 : 1, + }) + .height('auto') + .step(); + } + context.setData({ + animation: animation.export(), + }); + return; + } + animation.height(height).top(0).step({ duration: 1 }).height(0).step({ + duration: 300, + }); + context.setData({ + animation: animation.export(), + }); +} +export function setContentAnimate(context, expanded, mounted) { + getRect(context, '.van-collapse-item__content') + .then((rect) => rect.height) + .then((height) => { + useAnimation(context, expanded, mounted, height); + }); +} diff --git a/miniprogram/@vant/weapp/dist/collapse-item/index.js b/miniprogram/@vant/weapp/dist/collapse-item/index.js new file mode 100644 index 0000000..991d7df --- /dev/null +++ b/miniprogram/@vant/weapp/dist/collapse-item/index.js @@ -0,0 +1,59 @@ +import { VantComponent } from '../common/component'; +import { useParent } from '../common/relation'; +import { setContentAnimate } from './animate'; +VantComponent({ + classes: ['title-class', 'content-class'], + relation: useParent('collapse'), + props: { + name: null, + title: null, + value: null, + icon: String, + label: String, + disabled: Boolean, + clickable: Boolean, + border: { + type: Boolean, + value: true, + }, + isLink: { + type: Boolean, + value: true, + }, + }, + data: { + expanded: false, + }, + mounted() { + this.updateExpanded(); + this.mounted = true; + }, + methods: { + updateExpanded() { + if (!this.parent) { + return; + } + const { value, accordion } = this.parent.data; + const { children = [] } = this.parent; + const { name } = this.data; + const index = children.indexOf(this); + const currentName = name == null ? index : name; + const expanded = accordion + ? value === currentName + : (value || []).some((name) => name === currentName); + if (expanded !== this.data.expanded) { + setContentAnimate(this, expanded, this.mounted); + } + this.setData({ index, expanded }); + }, + onClick() { + if (this.data.disabled) { + return; + } + const { name, expanded } = this.data; + const index = this.parent.children.indexOf(this); + const currentName = name == null ? index : name; + this.parent.switch(currentName, !expanded); + }, + }, +}); diff --git a/miniprogram/@vant/weapp/dist/collapse-item/index.json b/miniprogram/@vant/weapp/dist/collapse-item/index.json new file mode 100644 index 0000000..0e5425c --- /dev/null +++ b/miniprogram/@vant/weapp/dist/collapse-item/index.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "van-cell": "../cell/index" + } +} diff --git a/miniprogram/@vant/weapp/dist/collapse-item/index.wxml b/miniprogram/@vant/weapp/dist/collapse-item/index.wxml new file mode 100644 index 0000000..ae4cc83 --- /dev/null +++ b/miniprogram/@vant/weapp/dist/collapse-item/index.wxml @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + diff --git a/miniprogram/@vant/weapp/dist/collapse-item/index.wxss b/miniprogram/@vant/weapp/dist/collapse-item/index.wxss new file mode 100644 index 0000000..4a65b5a --- /dev/null +++ b/miniprogram/@vant/weapp/dist/collapse-item/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-collapse-item__title .van-cell__right-icon{transform:rotate(90deg);transition:transform var(--collapse-item-transition-duration,.3s)}.van-collapse-item__title--expanded .van-cell__right-icon{transform:rotate(-90deg)}.van-collapse-item__title--disabled .van-cell,.van-collapse-item__title--disabled .van-cell__right-icon{color:var(--collapse-item-title-disabled-color,#c8c9cc)!important}.van-collapse-item__title--disabled .van-cell--hover{background-color:#fff!important}.van-collapse-item__wrapper{overflow:hidden}.van-collapse-item__content{background-color:var(--collapse-item-content-background-color,#fff);color:var(--collapse-item-content-text-color,#969799);font-size:var(--collapse-item-content-font-size,13px);line-height:var(--collapse-item-content-line-height,1.5);padding:var(--collapse-item-content-padding,15px)} \ No newline at end of file diff --git a/miniprogram/@vant/weapp/dist/collapse/index.js b/miniprogram/@vant/weapp/dist/collapse/index.js new file mode 100644 index 0000000..3616087 --- /dev/null +++ b/miniprogram/@vant/weapp/dist/collapse/index.js @@ -0,0 +1,46 @@ +import { VantComponent } from '../common/component'; +import { useChildren } from '../common/relation'; +VantComponent({ + relation: useChildren('collapse-item'), + props: { + value: { + type: null, + observer: 'updateExpanded', + }, + accordion: { + type: Boolean, + observer: 'updateExpanded', + }, + border: { + type: Boolean, + value: true, + }, + }, + methods: { + updateExpanded() { + this.children.forEach((child) => { + child.updateExpanded(); + }); + }, + switch(name, expanded) { + const { accordion, value } = this.data; + const changeItem = name; + if (!accordion) { + name = expanded + ? (value || []).concat(name) + : (value || []).filter((activeName) => activeName !== name); + } + else { + name = expanded ? name : ''; + } + if (expanded) { + this.$emit('open', changeItem); + } + else { + this.$emit('close', changeItem); + } + this.$emit('change', name); + this.$emit('input', name); + }, + }, +}); diff --git a/miniprogram/@vant/weapp/dist/collapse/index.json b/miniprogram/@vant/weapp/dist/collapse/index.json new file mode 100644 index 0000000..467ce29 --- /dev/null +++ b/miniprogram/@vant/weapp/dist/collapse/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} diff --git a/miniprogram/@vant/weapp/dist/collapse/index.wxml b/miniprogram/@vant/weapp/dist/collapse/index.wxml new file mode 100644 index 0000000..fd4e171 --- /dev/null +++ b/miniprogram/@vant/weapp/dist/collapse/index.wxml @@ -0,0 +1,3 @@ + + + diff --git a/miniprogram/@vant/weapp/dist/collapse/index.wxss b/miniprogram/@vant/weapp/dist/collapse/index.wxss new file mode 100644 index 0000000..99694d6 --- /dev/null +++ b/miniprogram/@vant/weapp/dist/collapse/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss'; \ No newline at end of file diff --git a/miniprogram/@vant/weapp/dist/common/color.js b/miniprogram/@vant/weapp/dist/common/color.js new file mode 100644 index 0000000..6b285bd --- /dev/null +++ b/miniprogram/@vant/weapp/dist/common/color.js @@ -0,0 +1,7 @@ +export const RED = '#ee0a24'; +export const BLUE = '#1989fa'; +export const WHITE = '#fff'; +export const GREEN = '#07c160'; +export const ORANGE = '#ff976a'; +export const GRAY = '#323233'; +export const GRAY_DARK = '#969799'; diff --git a/miniprogram/@vant/weapp/dist/common/component.js b/miniprogram/@vant/weapp/dist/common/component.js new file mode 100644 index 0000000..8528dc0 --- /dev/null +++ b/miniprogram/@vant/weapp/dist/common/component.js @@ -0,0 +1,45 @@ +import { basic } from '../mixins/basic'; +function mapKeys(source, target, map) { + Object.keys(map).forEach((key) => { + if (source[key]) { + target[map[key]] = source[key]; + } + }); +} +function VantComponent(vantOptions) { + const options = {}; + mapKeys(vantOptions, options, { + data: 'data', + props: 'properties', + mixins: 'behaviors', + methods: 'methods', + beforeCreate: 'created', + created: 'attached', + mounted: 'ready', + destroyed: 'detached', + classes: 'externalClasses', + }); + // add default externalClasses + options.externalClasses = options.externalClasses || []; + options.externalClasses.push('custom-class'); + // add default behaviors + options.behaviors = options.behaviors || []; + options.behaviors.push(basic); + // add relations + const { relation } = vantOptions; + if (relation) { + options.relations = relation.relations; + options.behaviors.push(relation.mixin); + } + // map field to form-field behavior + if (vantOptions.field) { + options.behaviors.push('wx://form-field'); + } + // add default options + options.options = { + multipleSlots: true, + addGlobalClass: true, + }; + Component(options); +} +export { VantComponent }; diff --git a/miniprogram/@vant/weapp/dist/common/index.wxss b/miniprogram/@vant/weapp/dist/common/index.wxss new file mode 100644 index 0000000..a73bb7a --- /dev/null +++ b/miniprogram/@vant/weapp/dist/common/index.wxss @@ -0,0 +1 @@ +.van-ellipsis{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.van-multi-ellipsis--l2{-webkit-line-clamp:2}.van-multi-ellipsis--l2,.van-multi-ellipsis--l3{-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden;text-overflow:ellipsis}.van-multi-ellipsis--l3{-webkit-line-clamp:3}.van-clearfix:after{clear:both;content:"";display:table}.van-hairline,.van-hairline--bottom,.van-hairline--left,.van-hairline--right,.van-hairline--surround,.van-hairline--top,.van-hairline--top-bottom{position:relative}.van-hairline--bottom:after,.van-hairline--left:after,.van-hairline--right:after,.van-hairline--surround:after,.van-hairline--top-bottom:after,.van-hairline--top:after,.van-hairline:after{border:0 solid #ebedf0;bottom:-50%;box-sizing:border-box;content:" ";left:-50%;pointer-events:none;position:absolute;right:-50%;top:-50%;transform:scale(.5);transform-origin:center}.van-hairline--top:after{border-top-width:1px}.van-hairline--left:after{border-left-width:1px}.van-hairline--right:after{border-right-width:1px}.van-hairline--bottom:after{border-bottom-width:1px}.van-hairline--top-bottom:after{border-width:1px 0}.van-hairline--surround:after{border-width:1px} \ No newline at end of file diff --git a/miniprogram/@vant/weapp/dist/common/relation.js b/miniprogram/@vant/weapp/dist/common/relation.js new file mode 100644 index 0000000..04e2934 --- /dev/null +++ b/miniprogram/@vant/weapp/dist/common/relation.js @@ -0,0 +1,56 @@ +export function useParent(name, onEffect) { + const path = `../${name}/index`; + return { + relations: { + [path]: { + type: 'ancestor', + linked() { + onEffect && onEffect.call(this); + }, + linkChanged() { + onEffect && onEffect.call(this); + }, + unlinked() { + onEffect && onEffect.call(this); + }, + }, + }, + mixin: Behavior({ + created() { + Object.defineProperty(this, 'parent', { + get: () => this.getRelationNodes(path)[0], + }); + Object.defineProperty(this, 'index', { + // @ts-ignore + get: () => { var _a, _b; return (_b = (_a = this.parent) === null || _a === void 0 ? void 0 : _a.children) === null || _b === void 0 ? void 0 : _b.indexOf(this); }, + }); + }, + }), + }; +} +export function useChildren(name, onEffect) { + const path = `../${name}/index`; + return { + relations: { + [path]: { + type: 'descendant', + linked(target) { + onEffect && onEffect.call(this, target); + }, + linkChanged(target) { + onEffect && onEffect.call(this, target); + }, + unlinked(target) { + onEffect && onEffect.call(this, target); + }, + }, + }, + mixin: Behavior({ + created() { + Object.defineProperty(this, 'children', { + get: () => this.getRelationNodes(path) || [], + }); + }, + }), + }; +} diff --git a/miniprogram/@vant/weapp/dist/common/style/clearfix.wxss b/miniprogram/@vant/weapp/dist/common/style/clearfix.wxss new file mode 100644 index 0000000..442246f --- /dev/null +++ b/miniprogram/@vant/weapp/dist/common/style/clearfix.wxss @@ -0,0 +1 @@ +.van-clearfix:after{clear:both;content:"";display:table} \ No newline at end of file diff --git a/miniprogram/@vant/weapp/dist/common/style/ellipsis.wxss b/miniprogram/@vant/weapp/dist/common/style/ellipsis.wxss new file mode 100644 index 0000000..ee701df --- /dev/null +++ b/miniprogram/@vant/weapp/dist/common/style/ellipsis.wxss @@ -0,0 +1 @@ +.van-ellipsis{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.van-multi-ellipsis--l2{-webkit-line-clamp:2}.van-multi-ellipsis--l2,.van-multi-ellipsis--l3{-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden;text-overflow:ellipsis}.van-multi-ellipsis--l3{-webkit-line-clamp:3} \ No newline at end of file diff --git a/miniprogram/@vant/weapp/dist/common/style/hairline.wxss b/miniprogram/@vant/weapp/dist/common/style/hairline.wxss new file mode 100644 index 0000000..f7c6260 --- /dev/null +++ b/miniprogram/@vant/weapp/dist/common/style/hairline.wxss @@ -0,0 +1 @@ +.van-hairline,.van-hairline--bottom,.van-hairline--left,.van-hairline--right,.van-hairline--surround,.van-hairline--top,.van-hairline--top-bottom{position:relative}.van-hairline--bottom:after,.van-hairline--left:after,.van-hairline--right:after,.van-hairline--surround:after,.van-hairline--top-bottom:after,.van-hairline--top:after,.van-hairline:after{border:0 solid #ebedf0;bottom:-50%;box-sizing:border-box;content:" ";left:-50%;pointer-events:none;position:absolute;right:-50%;top:-50%;transform:scale(.5);transform-origin:center}.van-hairline--top:after{border-top-width:1px}.van-hairline--left:after{border-left-width:1px}.van-hairline--right:after{border-right-width:1px}.van-hairline--bottom:after{border-bottom-width:1px}.van-hairline--top-bottom:after{border-width:1px 0}.van-hairline--surround:after{border-width:1px} \ No newline at end of file diff --git a/miniprogram/@vant/weapp/dist/common/style/mixins/clearfix.wxss b/miniprogram/@vant/weapp/dist/common/style/mixins/clearfix.wxss new file mode 100644 index 0000000..e69de29 diff --git a/miniprogram/@vant/weapp/dist/common/style/mixins/ellipsis.wxss b/miniprogram/@vant/weapp/dist/common/style/mixins/ellipsis.wxss new file mode 100644 index 0000000..e69de29 diff --git a/miniprogram/@vant/weapp/dist/common/style/mixins/hairline.wxss b/miniprogram/@vant/weapp/dist/common/style/mixins/hairline.wxss new file mode 100644 index 0000000..e69de29 diff --git a/miniprogram/@vant/weapp/dist/common/style/var.wxss b/miniprogram/@vant/weapp/dist/common/style/var.wxss new file mode 100644 index 0000000..e69de29 diff --git a/miniprogram/@vant/weapp/dist/common/utils.js b/miniprogram/@vant/weapp/dist/common/utils.js new file mode 100644 index 0000000..d06acb1 --- /dev/null +++ b/miniprogram/@vant/weapp/dist/common/utils.js @@ -0,0 +1,92 @@ +import { isDef, isNumber, isPlainObject, isPromise } from './validator'; +import { canIUseGroupSetData, canIUseNextTick } from './version'; +export { isDef } from './validator'; +export function range(num, min, max) { + return Math.min(Math.max(num, min), max); +} +export function nextTick(cb) { + if (canIUseNextTick()) { + wx.nextTick(cb); + } + else { + setTimeout(() => { + cb(); + }, 1000 / 30); + } +} +let systemInfo; +export function getSystemInfoSync() { + if (systemInfo == null) { + systemInfo = wx.getSystemInfoSync(); + } + return systemInfo; +} +export function addUnit(value) { + if (!isDef(value)) { + return undefined; + } + value = String(value); + return isNumber(value) ? `${value}px` : value; +} +export function requestAnimationFrame(cb) { + const systemInfo = getSystemInfoSync(); + if (systemInfo.platform === 'devtools') { + return setTimeout(() => { + cb(); + }, 1000 / 30); + } + return wx + .createSelectorQuery() + .selectViewport() + .boundingClientRect() + .exec(() => { + cb(); + }); +} +export function pickExclude(obj, keys) { + if (!isPlainObject(obj)) { + return {}; + } + return Object.keys(obj).reduce((prev, key) => { + if (!keys.includes(key)) { + prev[key] = obj[key]; + } + return prev; + }, {}); +} +export function getRect(context, selector) { + return new Promise((resolve) => { + wx.createSelectorQuery() + .in(context) + .select(selector) + .boundingClientRect() + .exec((rect = []) => resolve(rect[0])); + }); +} +export function getAllRect(context, selector) { + return new Promise((resolve) => { + wx.createSelectorQuery() + .in(context) + .selectAll(selector) + .boundingClientRect() + .exec((rect = []) => resolve(rect[0])); + }); +} +export function groupSetData(context, cb) { + if (canIUseGroupSetData()) { + context.groupSetData(cb); + } + else { + cb(); + } +} +export function toPromise(promiseLike) { + if (isPromise(promiseLike)) { + return promiseLike; + } + return Promise.resolve(promiseLike); +} +export function getCurrentPage() { + const pages = getCurrentPages(); + return pages[pages.length - 1]; +} diff --git a/miniprogram/@vant/weapp/dist/common/validator.js b/miniprogram/@vant/weapp/dist/common/validator.js new file mode 100644 index 0000000..f11f844 --- /dev/null +++ b/miniprogram/@vant/weapp/dist/common/validator.js @@ -0,0 +1,31 @@ +// eslint-disable-next-line @typescript-eslint/ban-types +export function isFunction(val) { + return typeof val === 'function'; +} +export function isPlainObject(val) { + return val !== null && typeof val === 'object' && !Array.isArray(val); +} +export function isPromise(val) { + return isPlainObject(val) && isFunction(val.then) && isFunction(val.catch); +} +export function isDef(value) { + return value !== undefined && value !== null; +} +export function isObj(x) { + const type = typeof x; + return x !== null && (type === 'object' || type === 'function'); +} +export function isNumber(value) { + return /^\d+(\.\d+)?$/.test(value); +} +export function isBoolean(value) { + return typeof value === 'boolean'; +} +const IMAGE_REGEXP = /\.(jpeg|jpg|gif|png|svg|webp|jfif|bmp|dpg)/i; +const VIDEO_REGEXP = /\.(mp4|mpg|mpeg|dat|asf|avi|rm|rmvb|mov|wmv|flv|mkv)/i; +export function isImageUrl(url) { + return IMAGE_REGEXP.test(url); +} +export function isVideoUrl(url) { + return VIDEO_REGEXP.test(url); +} diff --git a/miniprogram/@vant/weapp/dist/common/version.js b/miniprogram/@vant/weapp/dist/common/version.js new file mode 100644 index 0000000..eb85185 --- /dev/null +++ b/miniprogram/@vant/weapp/dist/common/version.js @@ -0,0 +1,48 @@ +import { getSystemInfoSync } from './utils'; +function compareVersion(v1, v2) { + v1 = v1.split('.'); + v2 = v2.split('.'); + const len = Math.max(v1.length, v2.length); + while (v1.length < len) { + v1.push('0'); + } + while (v2.length < len) { + v2.push('0'); + } + for (let i = 0; i < len; i++) { + const num1 = parseInt(v1[i], 10); + const num2 = parseInt(v2[i], 10); + if (num1 > num2) { + return 1; + } + if (num1 < num2) { + return -1; + } + } + return 0; +} +function gte(version) { + const system = getSystemInfoSync(); + return compareVersion(system.SDKVersion, version) >= 0; +} +export function canIUseModel() { + return gte('2.9.3'); +} +export function canIUseFormFieldButton() { + return gte('2.10.3'); +} +export function canIUseAnimate() { + return gte('2.9.0'); +} +export function canIUseGroupSetData() { + return gte('2.4.0'); +} +export function canIUseNextTick() { + return wx.canIUse('nextTick'); +} +export function canIUseCanvas2d() { + return gte('2.9.0'); +} +export function canIUseGetUserProfile() { + return !!wx.getUserProfile; +} diff --git a/miniprogram/@vant/weapp/dist/config-provider/index.js b/miniprogram/@vant/weapp/dist/config-provider/index.js new file mode 100644 index 0000000..0cb23f4 --- /dev/null +++ b/miniprogram/@vant/weapp/dist/config-provider/index.js @@ -0,0 +1,9 @@ +import { VantComponent } from '../common/component'; +VantComponent({ + props: { + themeVars: { + type: Object, + value: {}, + }, + }, +}); diff --git a/miniprogram/@vant/weapp/dist/config-provider/index.json b/miniprogram/@vant/weapp/dist/config-provider/index.json new file mode 100644 index 0000000..467ce29 --- /dev/null +++ b/miniprogram/@vant/weapp/dist/config-provider/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} diff --git a/miniprogram/@vant/weapp/dist/config-provider/index.wxml b/miniprogram/@vant/weapp/dist/config-provider/index.wxml new file mode 100644 index 0000000..3cfb461 --- /dev/null +++ b/miniprogram/@vant/weapp/dist/config-provider/index.wxml @@ -0,0 +1,5 @@ + + + + + diff --git a/miniprogram/@vant/weapp/dist/config-provider/index.wxs b/miniprogram/@vant/weapp/dist/config-provider/index.wxs new file mode 100644 index 0000000..7ca0203 --- /dev/null +++ b/miniprogram/@vant/weapp/dist/config-provider/index.wxs @@ -0,0 +1,29 @@ +/* eslint-disable */ +var object = require('../wxs/object.wxs'); +var style = require('../wxs/style.wxs'); + +function kebabCase(word) { + var newWord = word + .replace(getRegExp("[A-Z]", 'g'), function (i) { + return '-' + i; + }) + .toLowerCase() + .replace(getRegExp("^-"), ''); + + return newWord; +} + +function mapThemeVarsToCSSVars(themeVars) { + var cssVars = {}; + object.keys(themeVars).forEach(function (key) { + var cssVarsKey = '--' + kebabCase(key); + cssVars[cssVarsKey] = themeVars[key]; + }); + + return style(cssVars); +} + +module.exports = { + kebabCase: kebabCase, + mapThemeVarsToCSSVars: mapThemeVarsToCSSVars, +}; diff --git a/miniprogram/@vant/weapp/dist/count-down/index.js b/miniprogram/@vant/weapp/dist/count-down/index.js new file mode 100644 index 0000000..da24145 --- /dev/null +++ b/miniprogram/@vant/weapp/dist/count-down/index.js @@ -0,0 +1,100 @@ +import { VantComponent } from '../common/component'; +import { isSameSecond, parseFormat, parseTimeData } from './utils'; +function simpleTick(fn) { + return setTimeout(fn, 30); +} +VantComponent({ + props: { + useSlot: Boolean, + millisecond: Boolean, + time: { + type: Number, + observer: 'reset', + }, + format: { + type: String, + value: 'HH:mm:ss', + }, + autoStart: { + type: Boolean, + value: true, + }, + }, + data: { + timeData: parseTimeData(0), + formattedTime: '0', + }, + destroyed() { + clearTimeout(this.tid); + this.tid = null; + }, + methods: { + // 开始 + start() { + if (this.counting) { + return; + } + this.counting = true; + this.endTime = Date.now() + this.remain; + this.tick(); + }, + // 暂停 + pause() { + this.counting = false; + clearTimeout(this.tid); + }, + // 重置 + reset() { + this.pause(); + this.remain = this.data.time; + this.setRemain(this.remain); + if (this.data.autoStart) { + this.start(); + } + }, + tick() { + if (this.data.millisecond) { + this.microTick(); + } + else { + this.macroTick(); + } + }, + microTick() { + this.tid = simpleTick(() => { + this.setRemain(this.getRemain()); + if (this.remain !== 0) { + this.microTick(); + } + }); + }, + macroTick() { + this.tid = simpleTick(() => { + const remain = this.getRemain(); + if (!isSameSecond(remain, this.remain) || remain === 0) { + this.setRemain(remain); + } + if (this.remain !== 0) { + this.macroTick(); + } + }); + }, + getRemain() { + return Math.max(this.endTime - Date.now(), 0); + }, + setRemain(remain) { + this.remain = remain; + const timeData = parseTimeData(remain); + if (this.data.useSlot) { + this.$emit('change', timeData); + } + this.setData({ + formattedTime: parseFormat(this.data.format, timeData), + }); + if (remain === 0) { + this.pause(); + this.$emit('finish'); + } + }, + }, +}); diff --git a/miniprogram/@vant/weapp/dist/count-down/index.json b/miniprogram/@vant/weapp/dist/count-down/index.json new file mode 100644 index 0000000..467ce29 --- /dev/null +++ b/miniprogram/@vant/weapp/dist/count-down/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} diff --git a/miniprogram/@vant/weapp/dist/count-down/index.wxml b/miniprogram/@vant/weapp/dist/count-down/index.wxml new file mode 100644 index 0000000..e206e16 --- /dev/null +++ b/miniprogram/@vant/weapp/dist/count-down/index.wxml @@ -0,0 +1,4 @@ + + + {{ formattedTime }} + diff --git a/miniprogram/@vant/weapp/dist/count-down/index.wxss b/miniprogram/@vant/weapp/dist/count-down/index.wxss new file mode 100644 index 0000000..8b957f7 --- /dev/null +++ b/miniprogram/@vant/weapp/dist/count-down/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-count-down{color:var(--count-down-text-color,#323233);font-size:var(--count-down-font-size,14px);line-height:var(--count-down-line-height,20px)} \ No newline at end of file diff --git a/miniprogram/@vant/weapp/dist/count-down/utils.js b/miniprogram/@vant/weapp/dist/count-down/utils.js new file mode 100644 index 0000000..cbdbd79 --- /dev/null +++ b/miniprogram/@vant/weapp/dist/count-down/utils.js @@ -0,0 +1,57 @@ +function padZero(num, targetLength = 2) { + let str = num + ''; + while (str.length < targetLength) { + str = '0' + str; + } + return str; +} +const SECOND = 1000; +const MINUTE = 60 * SECOND; +const HOUR = 60 * MINUTE; +const DAY = 24 * HOUR; +export function parseTimeData(time) { + const days = Math.floor(time / DAY); + const hours = Math.floor((time % DAY) / HOUR); + const minutes = Math.floor((time % HOUR) / MINUTE); + const seconds = Math.floor((time % MINUTE) / SECOND); + const milliseconds = Math.floor(time % SECOND); + return { + days, + hours, + minutes, + seconds, + milliseconds, + }; +} +export function parseFormat(format, timeData) { + const { days } = timeData; + let { hours, minutes, seconds, milliseconds } = timeData; + if (format.indexOf('DD') === -1) { + hours += days * 24; + } + else { + format = format.replace('DD', padZero(days)); + } + if (format.indexOf('HH') === -1) { + minutes += hours * 60; + } + else { + format = format.replace('HH', padZero(hours)); + } + if (format.indexOf('mm') === -1) { + seconds += minutes * 60; + } + else { + format = format.replace('mm', padZero(minutes)); + } + if (format.indexOf('ss') === -1) { + milliseconds += seconds * 1000; + } + else { + format = format.replace('ss', padZero(seconds)); + } + return format.replace('SSS', padZero(milliseconds, 3)); +} +export function isSameSecond(time1, time2) { + return Math.floor(time1 / 1000) === Math.floor(time2 / 1000); +} diff --git a/miniprogram/@vant/weapp/dist/datetime-picker/index.js b/miniprogram/@vant/weapp/dist/datetime-picker/index.js new file mode 100644 index 0000000..3334170 --- /dev/null +++ b/miniprogram/@vant/weapp/dist/datetime-picker/index.js @@ -0,0 +1,295 @@ +import { VantComponent } from '../common/component'; +import { isDef } from '../common/validator'; +import { pickerProps } from '../picker/shared'; +const currentYear = new Date().getFullYear(); +function isValidDate(date) { + return isDef(date) && !isNaN(new Date(date).getTime()); +} +function range(num, min, max) { + return Math.min(Math.max(num, min), max); +} +function padZero(val) { + return `00${val}`.slice(-2); +} +function times(n, iteratee) { + let index = -1; + const result = Array(n < 0 ? 0 : n); + while (++index < n) { + result[index] = iteratee(index); + } + return result; +} +function getTrueValue(formattedValue) { + if (formattedValue === undefined) { + formattedValue = '1'; + } + while (isNaN(parseInt(formattedValue, 10))) { + formattedValue = formattedValue.slice(1); + } + return parseInt(formattedValue, 10); +} +function getMonthEndDay(year, month) { + return 32 - new Date(year, month - 1, 32).getDate(); +} +const defaultFormatter = (type, value) => value; +VantComponent({ + classes: ['active-class', 'toolbar-class', 'column-class'], + props: Object.assign(Object.assign({}, pickerProps), { value: { + type: null, + observer: 'updateValue', + }, filter: null, type: { + type: String, + value: 'datetime', + observer: 'updateValue', + }, showToolbar: { + type: Boolean, + value: true, + }, formatter: { + type: null, + value: defaultFormatter, + }, minDate: { + type: Number, + value: new Date(currentYear - 10, 0, 1).getTime(), + observer: 'updateValue', + }, maxDate: { + type: Number, + value: new Date(currentYear + 10, 11, 31).getTime(), + observer: 'updateValue', + }, minHour: { + type: Number, + value: 0, + observer: 'updateValue', + }, maxHour: { + type: Number, + value: 23, + observer: 'updateValue', + }, minMinute: { + type: Number, + value: 0, + observer: 'updateValue', + }, maxMinute: { + type: Number, + value: 59, + observer: 'updateValue', + } }), + data: { + innerValue: Date.now(), + columns: [], + }, + methods: { + updateValue() { + const { data } = this; + const val = this.correctValue(data.value); + const isEqual = val === data.innerValue; + this.updateColumnValue(val).then(() => { + if (!isEqual) { + this.$emit('input', val); + } + }); + }, + getPicker() { + if (this.picker == null) { + this.picker = this.selectComponent('.van-datetime-picker'); + const { picker } = this; + const { setColumnValues } = picker; + picker.setColumnValues = (...args) => setColumnValues.apply(picker, [...args, false]); + } + return this.picker; + }, + updateColumns() { + const { formatter = defaultFormatter } = this.data; + const results = this.getOriginColumns().map((column) => ({ + values: column.values.map((value) => formatter(column.type, value)), + })); + return this.set({ columns: results }); + }, + getOriginColumns() { + const { filter } = this.data; + const results = this.getRanges().map(({ type, range }) => { + let values = times(range[1] - range[0] + 1, (index) => { + const value = range[0] + index; + return type === 'year' ? `${value}` : padZero(value); + }); + if (filter) { + values = filter(type, values); + } + return { type, values }; + }); + return results; + }, + getRanges() { + const { data } = this; + if (data.type === 'time') { + return [ + { + type: 'hour', + range: [data.minHour, data.maxHour], + }, + { + type: 'minute', + range: [data.minMinute, data.maxMinute], + }, + ]; + } + const { maxYear, maxDate, maxMonth, maxHour, maxMinute, } = this.getBoundary('max', data.innerValue); + const { minYear, minDate, minMonth, minHour, minMinute, } = this.getBoundary('min', data.innerValue); + const result = [ + { + type: 'year', + range: [minYear, maxYear], + }, + { + type: 'month', + range: [minMonth, maxMonth], + }, + { + type: 'day', + range: [minDate, maxDate], + }, + { + type: 'hour', + range: [minHour, maxHour], + }, + { + type: 'minute', + range: [minMinute, maxMinute], + }, + ]; + if (data.type === 'date') + result.splice(3, 2); + if (data.type === 'year-month') + result.splice(2, 3); + return result; + }, + correctValue(value) { + const { data } = this; + // validate value + const isDateType = data.type !== 'time'; + if (isDateType && !isValidDate(value)) { + value = data.minDate; + } + else if (!isDateType && !value) { + const { minHour } = data; + value = `${padZero(minHour)}:00`; + } + // time type + if (!isDateType) { + let [hour, minute] = value.split(':'); + hour = padZero(range(hour, data.minHour, data.maxHour)); + minute = padZero(range(minute, data.minMinute, data.maxMinute)); + return `${hour}:${minute}`; + } + // date type + value = Math.max(value, data.minDate); + value = Math.min(value, data.maxDate); + return value; + }, + getBoundary(type, innerValue) { + const value = new Date(innerValue); + const boundary = new Date(this.data[`${type}Date`]); + const year = boundary.getFullYear(); + let month = 1; + let date = 1; + let hour = 0; + let minute = 0; + if (type === 'max') { + month = 12; + date = getMonthEndDay(value.getFullYear(), value.getMonth() + 1); + hour = 23; + minute = 59; + } + if (value.getFullYear() === year) { + month = boundary.getMonth() + 1; + if (value.getMonth() + 1 === month) { + date = boundary.getDate(); + if (value.getDate() === date) { + hour = boundary.getHours(); + if (value.getHours() === hour) { + minute = boundary.getMinutes(); + } + } + } + } + return { + [`${type}Year`]: year, + [`${type}Month`]: month, + [`${type}Date`]: date, + [`${type}Hour`]: hour, + [`${type}Minute`]: minute, + }; + }, + onCancel() { + this.$emit('cancel'); + }, + onConfirm() { + this.$emit('confirm', this.data.innerValue); + }, + onChange() { + const { data } = this; + let value; + const picker = this.getPicker(); + const originColumns = this.getOriginColumns(); + if (data.type === 'time') { + const indexes = picker.getIndexes(); + value = `${+originColumns[0].values[indexes[0]]}:${+originColumns[1] + .values[indexes[1]]}`; + } + else { + const indexes = picker.getIndexes(); + const values = indexes.map((value, index) => originColumns[index].values[value]); + const year = getTrueValue(values[0]); + const month = getTrueValue(values[1]); + const maxDate = getMonthEndDay(year, month); + let date = getTrueValue(values[2]); + if (data.type === 'year-month') { + date = 1; + } + date = date > maxDate ? maxDate : date; + let hour = 0; + let minute = 0; + if (data.type === 'datetime') { + hour = getTrueValue(values[3]); + minute = getTrueValue(values[4]); + } + value = new Date(year, month - 1, date, hour, minute); + } + value = this.correctValue(value); + this.updateColumnValue(value).then(() => { + this.$emit('input', value); + this.$emit('change', picker); + }); + }, + updateColumnValue(value) { + let values = []; + const { type } = this.data; + const formatter = this.data.formatter || defaultFormatter; + const picker = this.getPicker(); + if (type === 'time') { + const pair = value.split(':'); + values = [formatter('hour', pair[0]), formatter('minute', pair[1])]; + } + else { + const date = new Date(value); + values = [ + formatter('year', `${date.getFullYear()}`), + formatter('month', padZero(date.getMonth() + 1)), + ]; + if (type === 'date') { + values.push(formatter('day', padZero(date.getDate()))); + } + if (type === 'datetime') { + values.push(formatter('day', padZero(date.getDate())), formatter('hour', padZero(date.getHours())), formatter('minute', padZero(date.getMinutes()))); + } + } + return this.set({ innerValue: value }) + .then(() => this.updateColumns()) + .then(() => picker.setValues(values)); + }, + }, + created() { + const innerValue = this.correctValue(this.data.value); + this.updateColumnValue(innerValue).then(() => { + this.$emit('input', innerValue); + }); + }, +}); diff --git a/miniprogram/@vant/weapp/dist/datetime-picker/index.json b/miniprogram/@vant/weapp/dist/datetime-picker/index.json new file mode 100644 index 0000000..a778e91 --- /dev/null +++ b/miniprogram/@vant/weapp/dist/datetime-picker/index.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "van-picker": "../picker/index" + } +} diff --git a/miniprogram/@vant/weapp/dist/datetime-picker/index.wxml b/miniprogram/@vant/weapp/dist/datetime-picker/index.wxml new file mode 100644 index 0000000..ade2202 --- /dev/null +++ b/miniprogram/@vant/weapp/dist/datetime-picker/index.wxml @@ -0,0 +1,16 @@ + diff --git a/miniprogram/@vant/weapp/dist/datetime-picker/index.wxss b/miniprogram/@vant/weapp/dist/datetime-picker/index.wxss new file mode 100644 index 0000000..99694d6 --- /dev/null +++ b/miniprogram/@vant/weapp/dist/datetime-picker/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss'; \ No newline at end of file diff --git a/miniprogram/@vant/weapp/dist/definitions/index.js b/miniprogram/@vant/weapp/dist/definitions/index.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/miniprogram/@vant/weapp/dist/definitions/index.js @@ -0,0 +1 @@ +export {}; diff --git a/miniprogram/@vant/weapp/dist/dialog/dialog.js b/miniprogram/@vant/weapp/dist/dialog/dialog.js new file mode 100644 index 0000000..0b72fec --- /dev/null +++ b/miniprogram/@vant/weapp/dist/dialog/dialog.js @@ -0,0 +1,75 @@ +let queue = []; +const defaultOptions = { + show: false, + title: '', + width: null, + theme: 'default', + message: '', + zIndex: 100, + overlay: true, + selector: '#van-dialog', + className: '', + asyncClose: false, + beforeClose: null, + transition: 'scale', + customStyle: '', + messageAlign: '', + overlayStyle: '', + confirmButtonText: '确认', + cancelButtonText: '取消', + showConfirmButton: true, + showCancelButton: false, + closeOnClickOverlay: false, + confirmButtonOpenType: '', +}; +let currentOptions = Object.assign({}, defaultOptions); +function getContext() { + const pages = getCurrentPages(); + return pages[pages.length - 1]; +} +const Dialog = (options) => { + options = Object.assign(Object.assign({}, currentOptions), options); + return new Promise((resolve, reject) => { + const context = options.context || getContext(); + const dialog = context.selectComponent(options.selector); + delete options.context; + delete options.selector; + if (dialog) { + dialog.setData(Object.assign({ callback: (action, instance) => { + action === 'confirm' ? resolve(instance) : reject(instance); + } }, options)); + wx.nextTick(() => { + dialog.setData({ show: true }); + }); + queue.push(dialog); + } + else { + console.warn('未找到 van-dialog 节点,请确认 selector 及 context 是否正确'); + } + }); +}; +Dialog.alert = (options) => Dialog(options); +Dialog.confirm = (options) => Dialog(Object.assign({ showCancelButton: true }, options)); +Dialog.close = () => { + queue.forEach((dialog) => { + dialog.close(); + }); + queue = []; +}; +Dialog.stopLoading = () => { + queue.forEach((dialog) => { + dialog.stopLoading(); + }); +}; +Dialog.currentOptions = currentOptions; +Dialog.defaultOptions = defaultOptions; +Dialog.setDefaultOptions = (options) => { + currentOptions = Object.assign(Object.assign({}, currentOptions), options); + Dialog.currentOptions = currentOptions; +}; +Dialog.resetDefaultOptions = () => { + currentOptions = Object.assign({}, defaultOptions); + Dialog.currentOptions = currentOptions; +}; +Dialog.resetDefaultOptions(); +export default Dialog; diff --git a/miniprogram/@vant/weapp/dist/dialog/index.js b/miniprogram/@vant/weapp/dist/dialog/index.js new file mode 100644 index 0000000..6f24cf4 --- /dev/null +++ b/miniprogram/@vant/weapp/dist/dialog/index.js @@ -0,0 +1,122 @@ +import { VantComponent } from '../common/component'; +import { button } from '../mixins/button'; +import { GRAY, RED } from '../common/color'; +import { toPromise } from '../common/utils'; +VantComponent({ + mixins: [button], + props: { + show: { + type: Boolean, + observer(show) { + !show && this.stopLoading(); + }, + }, + title: String, + message: String, + theme: { + type: String, + value: 'default', + }, + useSlot: Boolean, + className: String, + customStyle: String, + asyncClose: Boolean, + messageAlign: String, + beforeClose: null, + overlayStyle: String, + useTitleSlot: Boolean, + showCancelButton: Boolean, + closeOnClickOverlay: Boolean, + confirmButtonOpenType: String, + width: null, + zIndex: { + type: Number, + value: 2000, + }, + confirmButtonText: { + type: String, + value: '确认', + }, + cancelButtonText: { + type: String, + value: '取消', + }, + confirmButtonColor: { + type: String, + value: RED, + }, + cancelButtonColor: { + type: String, + value: GRAY, + }, + showConfirmButton: { + type: Boolean, + value: true, + }, + overlay: { + type: Boolean, + value: true, + }, + transition: { + type: String, + value: 'scale', + }, + }, + data: { + loading: { + confirm: false, + cancel: false, + }, + callback: (() => { }), + }, + methods: { + onConfirm() { + this.handleAction('confirm'); + }, + onCancel() { + this.handleAction('cancel'); + }, + onClickOverlay() { + this.close('overlay'); + }, + close(action) { + this.setData({ show: false }); + wx.nextTick(() => { + this.$emit('close', action); + const { callback } = this.data; + if (callback) { + callback(action, this); + } + }); + }, + stopLoading() { + this.setData({ + loading: { + confirm: false, + cancel: false, + }, + }); + }, + handleAction(action) { + this.$emit(action, { dialog: this }); + const { asyncClose, beforeClose } = this.data; + if (!asyncClose && !beforeClose) { + this.close(action); + return; + } + this.setData({ + [`loading.${action}`]: true, + }); + if (beforeClose) { + toPromise(beforeClose(action)).then((value) => { + if (value) { + this.close(action); + } + else { + this.stopLoading(); + } + }); + } + }, + }, +}); diff --git a/miniprogram/@vant/weapp/dist/dialog/index.json b/miniprogram/@vant/weapp/dist/dialog/index.json new file mode 100644 index 0000000..43417fc --- /dev/null +++ b/miniprogram/@vant/weapp/dist/dialog/index.json @@ -0,0 +1,9 @@ +{ + "component": true, + "usingComponents": { + "van-popup": "../popup/index", + "van-button": "../button/index", + "van-goods-action": "../goods-action/index", + "van-goods-action-button": "../goods-action-button/index" + } +} diff --git a/miniprogram/@vant/weapp/dist/dialog/index.wxml b/miniprogram/@vant/weapp/dist/dialog/index.wxml new file mode 100644 index 0000000..f49dee4 --- /dev/null +++ b/miniprogram/@vant/weapp/dist/dialog/index.wxml @@ -0,0 +1,113 @@ + + + + + + {{ title }} + + + + + {{ message }} + + + + + {{ cancelButtonText }} + + + {{ confirmButtonText }} + + + + + + {{ cancelButtonText }} + + + {{ confirmButtonText }} + + + diff --git a/miniprogram/@vant/weapp/dist/dialog/index.wxss b/miniprogram/@vant/weapp/dist/dialog/index.wxss new file mode 100644 index 0000000..571861a --- /dev/null +++ b/miniprogram/@vant/weapp/dist/dialog/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-dialog{background-color:var(--dialog-background-color,#fff);border-radius:var(--dialog-border-radius,16px);font-size:var(--dialog-font-size,16px);overflow:hidden;top:45%!important;width:var(--dialog-width,320px)}@media (max-width:321px){.van-dialog{width:var(--dialog-small-screen-width,90%)}}.van-dialog__header{font-weight:var(--dialog-header-font-weight,500);line-height:var(--dialog-header-line-height,24px);padding-top:var(--dialog-header-padding-top,24px);text-align:center}.van-dialog__header--isolated{padding:var(--dialog-header-isolated-padding,24px 0)}.van-dialog__message{-webkit-overflow-scrolling:touch;font-size:var(--dialog-message-font-size,14px);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,#646566);padding-top:var(--dialog-has-title-message-padding-top,8px)}.van-dialog__message--round-button{color:#323233;padding-bottom:16px}.van-dialog__message--left{text-align:left}.van-dialog__message--right{text-align:right}.van-dialog__footer{display:flex}.van-dialog__footer--round-button{padding:8px 24px 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)} \ No newline at end of file diff --git a/miniprogram/@vant/weapp/dist/divider/index.js b/miniprogram/@vant/weapp/dist/divider/index.js new file mode 100644 index 0000000..9596edd --- /dev/null +++ b/miniprogram/@vant/weapp/dist/divider/index.js @@ -0,0 +1,12 @@ +import { VantComponent } from '../common/component'; +VantComponent({ + props: { + dashed: Boolean, + hairline: Boolean, + contentPosition: String, + fontSize: String, + borderColor: String, + textColor: String, + customStyle: String, + }, +}); diff --git a/miniprogram/@vant/weapp/dist/divider/index.json b/miniprogram/@vant/weapp/dist/divider/index.json new file mode 100644 index 0000000..a89ef4d --- /dev/null +++ b/miniprogram/@vant/weapp/dist/divider/index.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} diff --git a/miniprogram/@vant/weapp/dist/divider/index.wxml b/miniprogram/@vant/weapp/dist/divider/index.wxml new file mode 100644 index 0000000..f6a5a45 --- /dev/null +++ b/miniprogram/@vant/weapp/dist/divider/index.wxml @@ -0,0 +1,9 @@ + + + + + + diff --git a/miniprogram/@vant/weapp/dist/divider/index.wxs b/miniprogram/@vant/weapp/dist/divider/index.wxs new file mode 100644 index 0000000..215b14f --- /dev/null +++ b/miniprogram/@vant/weapp/dist/divider/index.wxs @@ -0,0 +1,18 @@ +/* eslint-disable */ +var style = require('../wxs/style.wxs'); +var addUnit = require('../wxs/add-unit.wxs'); + +function rootStyle(data) { + return style([ + { + 'border-color': data.borderColor, + color: data.textColor, + 'font-size': addUnit(data.fontSize), + }, + data.customStyle, + ]); +} + +module.exports = { + rootStyle: rootStyle, +}; diff --git a/miniprogram/@vant/weapp/dist/divider/index.wxss b/miniprogram/@vant/weapp/dist/divider/index.wxss new file mode 100644 index 0000000..e91dc44 --- /dev/null +++ b/miniprogram/@vant/weapp/dist/divider/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-divider{align-items:center;border:0 solid var(--divider-border-color,#ebedf0);color:var(--divider-text-color,#969799);display:flex;font-size:var(--divider-font-size,14px);line-height:var(--divider-line-height,24px);margin:var(--divider-margin,16px 0)}.van-divider:after,.van-divider:before{border-color:inherit;border-style:inherit;border-width:1px 0 0;box-sizing:border-box;display:block;flex:1;height:1px}.van-divider:before{content:""}.van-divider--hairline:after,.van-divider--hairline:before{transform:scaleY(.5)}.van-divider--dashed{border-style:dashed}.van-divider--center:before,.van-divider--left:before,.van-divider--right:before{margin-right:var(--divider-content-padding,16px)}.van-divider--center:after,.van-divider--left:after,.van-divider--right:after{content:"";margin-left:var(--divider-content-padding,16px)}.van-divider--left:before{max-width:var(--divider-content-left-width,10%)}.van-divider--right:after{max-width:var(--divider-content-right-width,10%)} \ No newline at end of file diff --git a/miniprogram/@vant/weapp/dist/dropdown-item/index.js b/miniprogram/@vant/weapp/dist/dropdown-item/index.js new file mode 100644 index 0000000..0b0d00f --- /dev/null +++ b/miniprogram/@vant/weapp/dist/dropdown-item/index.js @@ -0,0 +1,102 @@ +import { useParent } from '../common/relation'; +import { VantComponent } from '../common/component'; +VantComponent({ + field: true, + relation: useParent('dropdown-menu', function () { + this.updateDataFromParent(); + }), + props: { + value: { + type: null, + observer: 'rerender', + }, + title: { + type: String, + observer: 'rerender', + }, + disabled: Boolean, + titleClass: { + type: String, + observer: 'rerender', + }, + options: { + type: Array, + value: [], + observer: 'rerender', + }, + popupStyle: String, + }, + data: { + transition: true, + showPopup: false, + showWrapper: false, + displayTitle: '', + }, + methods: { + rerender() { + wx.nextTick(() => { + var _a; + (_a = this.parent) === null || _a === void 0 ? void 0 : _a.updateItemListData(); + }); + }, + updateDataFromParent() { + if (this.parent) { + const { overlay, duration, activeColor, closeOnClickOverlay, direction, } = this.parent.data; + this.setData({ + overlay, + duration, + activeColor, + closeOnClickOverlay, + direction, + }); + } + }, + onOpen() { + this.$emit('open'); + }, + onOpened() { + this.$emit('opened'); + }, + onClose() { + this.$emit('close'); + }, + onClosed() { + this.$emit('closed'); + this.setData({ showWrapper: false }); + }, + onOptionTap(event) { + const { option } = event.currentTarget.dataset; + const { value } = option; + const shouldEmitChange = this.data.value !== value; + this.setData({ showPopup: false, value }); + this.$emit('close'); + this.rerender(); + if (shouldEmitChange) { + this.$emit('change', value); + } + }, + toggle(show, options = {}) { + var _a; + const { showPopup } = this.data; + if (typeof show !== 'boolean') { + show = !showPopup; + } + if (show === showPopup) { + return; + } + this.setData({ + transition: !options.immediate, + showPopup: show, + }); + if (show) { + (_a = this.parent) === null || _a === void 0 ? void 0 : _a.getChildWrapperStyle().then((wrapperStyle) => { + this.setData({ wrapperStyle, showWrapper: true }); + this.rerender(); + }); + } + else { + this.rerender(); + } + }, + }, +}); diff --git a/miniprogram/@vant/weapp/dist/dropdown-item/index.json b/miniprogram/@vant/weapp/dist/dropdown-item/index.json new file mode 100644 index 0000000..88d5409 --- /dev/null +++ b/miniprogram/@vant/weapp/dist/dropdown-item/index.json @@ -0,0 +1,8 @@ +{ + "component": true, + "usingComponents": { + "van-popup": "../popup/index", + "van-cell": "../cell/index", + "van-icon": "../icon/index" + } +} diff --git a/miniprogram/@vant/weapp/dist/dropdown-item/index.wxml b/miniprogram/@vant/weapp/dist/dropdown-item/index.wxml new file mode 100644 index 0000000..dd75292 --- /dev/null +++ b/miniprogram/@vant/weapp/dist/dropdown-item/index.wxml @@ -0,0 +1,48 @@ + + + + + + + {{ item.text }} + + + + + + + diff --git a/miniprogram/@vant/weapp/dist/dropdown-item/index.wxss b/miniprogram/@vant/weapp/dist/dropdown-item/index.wxss new file mode 100644 index 0000000..80505e9 --- /dev/null +++ b/miniprogram/@vant/weapp/dist/dropdown-item/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-dropdown-item{left:0;overflow:hidden;position:fixed;right:0}.van-dropdown-item__option{text-align:left}.van-dropdown-item__option--active .van-dropdown-item__icon,.van-dropdown-item__option--active .van-dropdown-item__title{color:var(--dropdown-menu-option-active-color,#ee0a24)}.van-dropdown-item--up{top:0}.van-dropdown-item--down{bottom:0}.van-dropdown-item__icon{display:block;line-height:inherit} \ No newline at end of file diff --git a/miniprogram/@vant/weapp/dist/dropdown-item/shared.js b/miniprogram/@vant/weapp/dist/dropdown-item/shared.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/miniprogram/@vant/weapp/dist/dropdown-item/shared.js @@ -0,0 +1 @@ +export {}; diff --git a/miniprogram/@vant/weapp/dist/dropdown-menu/index.js b/miniprogram/@vant/weapp/dist/dropdown-menu/index.js new file mode 100644 index 0000000..1ed1a87 --- /dev/null +++ b/miniprogram/@vant/weapp/dist/dropdown-menu/index.js @@ -0,0 +1,112 @@ +import { VantComponent } from '../common/component'; +import { useChildren } from '../common/relation'; +import { addUnit, getRect, getSystemInfoSync } from '../common/utils'; +let ARRAY = []; +VantComponent({ + field: true, + relation: useChildren('dropdown-item', function () { + this.updateItemListData(); + }), + props: { + activeColor: { + type: String, + observer: 'updateChildrenData', + }, + overlay: { + type: Boolean, + value: true, + observer: 'updateChildrenData', + }, + zIndex: { + type: Number, + value: 10, + }, + duration: { + type: Number, + value: 200, + observer: 'updateChildrenData', + }, + direction: { + type: String, + value: 'down', + observer: 'updateChildrenData', + }, + closeOnClickOverlay: { + type: Boolean, + value: true, + observer: 'updateChildrenData', + }, + closeOnClickOutside: { + type: Boolean, + value: true, + }, + }, + data: { + itemListData: [], + }, + beforeCreate() { + const { windowHeight } = getSystemInfoSync(); + this.windowHeight = windowHeight; + ARRAY.push(this); + }, + destroyed() { + ARRAY = ARRAY.filter((item) => item !== this); + }, + methods: { + updateItemListData() { + this.setData({ + itemListData: this.children.map((child) => child.data), + }); + }, + updateChildrenData() { + this.children.forEach((child) => { + child.updateDataFromParent(); + }); + }, + toggleItem(active) { + this.children.forEach((item, index) => { + const { showPopup } = item.data; + if (index === active) { + item.toggle(); + } + else if (showPopup) { + item.toggle(false, { immediate: true }); + } + }); + }, + close() { + this.children.forEach((child) => { + child.toggle(false, { immediate: true }); + }); + }, + getChildWrapperStyle() { + const { zIndex, direction } = this.data; + return getRect(this, '.van-dropdown-menu').then((rect) => { + const { top = 0, bottom = 0 } = rect; + const offset = direction === 'down' ? bottom : this.windowHeight - top; + let wrapperStyle = `z-index: ${zIndex};`; + if (direction === 'down') { + wrapperStyle += `top: ${addUnit(offset)};`; + } + else { + wrapperStyle += `bottom: ${addUnit(offset)};`; + } + return wrapperStyle; + }); + }, + onTitleTap(event) { + const { index } = event.currentTarget.dataset; + const child = this.children[index]; + if (!child.data.disabled) { + ARRAY.forEach((menuItem) => { + if (menuItem && + menuItem.data.closeOnClickOutside && + menuItem !== this) { + menuItem.close(); + } + }); + this.toggleItem(index); + } + }, + }, +}); diff --git a/miniprogram/@vant/weapp/dist/dropdown-menu/index.json b/miniprogram/@vant/weapp/dist/dropdown-menu/index.json new file mode 100644 index 0000000..467ce29 --- /dev/null +++ b/miniprogram/@vant/weapp/dist/dropdown-menu/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} diff --git a/miniprogram/@vant/weapp/dist/dropdown-menu/index.wxml b/miniprogram/@vant/weapp/dist/dropdown-menu/index.wxml new file mode 100644 index 0000000..cfd661d --- /dev/null +++ b/miniprogram/@vant/weapp/dist/dropdown-menu/index.wxml @@ -0,0 +1,23 @@ + + + + + + + + {{ computed.displayTitle(item) }} + + + + + + diff --git a/miniprogram/@vant/weapp/dist/dropdown-menu/index.wxs b/miniprogram/@vant/weapp/dist/dropdown-menu/index.wxs new file mode 100644 index 0000000..6538854 --- /dev/null +++ b/miniprogram/@vant/weapp/dist/dropdown-menu/index.wxs @@ -0,0 +1,16 @@ +/* eslint-disable */ +function displayTitle(item) { + if (item.title) { + return item.title; + } + + var match = item.options.filter(function(option) { + return option.value === item.value; + }); + var displayTitle = match.length ? match[0].text : ''; + return displayTitle; +} + +module.exports = { + displayTitle: displayTitle +}; diff --git a/miniprogram/@vant/weapp/dist/dropdown-menu/index.wxss b/miniprogram/@vant/weapp/dist/dropdown-menu/index.wxss new file mode 100644 index 0000000..daa5748 --- /dev/null +++ b/miniprogram/@vant/weapp/dist/dropdown-menu/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-dropdown-menu{background-color:var(--dropdown-menu-background-color,#fff);box-shadow:var(--dropdown-menu-box-shadow,0 2px 12px hsla(210,1%,40%,.12));display:flex;height:var(--dropdown-menu-height,50px);-webkit-user-select:none;user-select:none}.van-dropdown-menu__item{align-items:center;display:flex;flex:1;justify-content:center;min-width:0}.van-dropdown-menu__item:active{opacity:.7}.van-dropdown-menu__item--disabled:active{opacity:1}.van-dropdown-menu__item--disabled .van-dropdown-menu__title{color:var(--dropdown-menu-title-disabled-text-color,#969799)}.van-dropdown-menu__title{box-sizing:border-box;color:var(--dropdown-menu-title-text-color,#323233);font-size:var(--dropdown-menu-title-font-size,15px);line-height:var(--dropdown-menu-title-line-height,18px);max-width:100%;padding:var(--dropdown-menu-title-padding,0 8px);position:relative}.van-dropdown-menu__title:after{border-color:transparent transparent currentcolor currentcolor;border-style:solid;border-width:3px;content:"";margin-top:-5px;opacity:.8;position:absolute;right:-4px;top:50%;transform:rotate(-45deg)}.van-dropdown-menu__title--active{color:var(--dropdown-menu-title-active-text-color,#ee0a24)}.van-dropdown-menu__title--down:after{margin-top:-1px;transform:rotate(135deg)} \ No newline at end of file diff --git a/miniprogram/@vant/weapp/dist/empty/index.js b/miniprogram/@vant/weapp/dist/empty/index.js new file mode 100644 index 0000000..842e1bb --- /dev/null +++ b/miniprogram/@vant/weapp/dist/empty/index.js @@ -0,0 +1,10 @@ +import { VantComponent } from '../common/component'; +VantComponent({ + props: { + description: String, + image: { + type: String, + value: 'default', + }, + }, +}); diff --git a/miniprogram/@vant/weapp/dist/empty/index.json b/miniprogram/@vant/weapp/dist/empty/index.json new file mode 100644 index 0000000..a89ef4d --- /dev/null +++ b/miniprogram/@vant/weapp/dist/empty/index.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} diff --git a/miniprogram/@vant/weapp/dist/empty/index.wxml b/miniprogram/@vant/weapp/dist/empty/index.wxml new file mode 100644 index 0000000..9c7b719 --- /dev/null +++ b/miniprogram/@vant/weapp/dist/empty/index.wxml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + {{ description }} + + + + + + diff --git a/miniprogram/@vant/weapp/dist/empty/index.wxs b/miniprogram/@vant/weapp/dist/empty/index.wxs new file mode 100644 index 0000000..cf92ece --- /dev/null +++ b/miniprogram/@vant/weapp/dist/empty/index.wxs @@ -0,0 +1,15 @@ +/* eslint-disable */ +var PRESETS = ['error', 'search', 'default', 'network']; + +function imageUrl(image) { + if (PRESETS.indexOf(image) !== -1) { + return 'https://img.yzcdn.cn/vant/empty-image-' + image + '.png'; + } + + return image; +} + +module.exports = { + imageUrl: imageUrl, +}; + diff --git a/miniprogram/@vant/weapp/dist/empty/index.wxss b/miniprogram/@vant/weapp/dist/empty/index.wxss new file mode 100644 index 0000000..0fb74fe --- /dev/null +++ b/miniprogram/@vant/weapp/dist/empty/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-empty{align-items:center;box-sizing:border-box;display:flex;flex-direction:column;justify-content:center;padding:32px 0}.van-empty__image{height:160px;width:160px}.van-empty__image:empty{display:none}.van-empty__image__img{height:100%;width:100%}.van-empty__image:not(:empty)+.van-empty__image{display:none}.van-empty__description{color:#969799;font-size:14px;line-height:20px;margin-top:16px;padding:0 60px}.van-empty__description:empty,.van-empty__description:not(:empty)+.van-empty__description{display:none}.van-empty__bottom{margin-top:24px} \ No newline at end of file diff --git a/miniprogram/@vant/weapp/dist/field/index.js b/miniprogram/@vant/weapp/dist/field/index.js new file mode 100644 index 0000000..35627a2 --- /dev/null +++ b/miniprogram/@vant/weapp/dist/field/index.js @@ -0,0 +1,107 @@ +import { nextTick } from '../common/utils'; +import { VantComponent } from '../common/component'; +import { commonProps, inputProps, textareaProps } from './props'; +VantComponent({ + field: true, + classes: ['input-class', 'right-icon-class', 'label-class'], + 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: { + type: Boolean, + observer: 'setShowClear', + }, clearable: { + type: Boolean, + observer: 'setShowClear', + }, clearTrigger: { + type: String, + value: 'focus', + }, border: { + type: Boolean, + value: true, + }, titleWidth: { + type: String, + value: '6.2em', + }, clearIcon: { + type: String, + value: 'clear', + } }), + data: { + focused: false, + innerValue: '', + showClear: false, + }, + created() { + this.value = this.data.value; + this.setData({ innerValue: this.value }); + }, + methods: { + onInput(event) { + const { value = '' } = event.detail || {}; + this.value = value; + this.setShowClear(); + this.emitChange(); + }, + onFocus(event) { + this.focused = true; + this.setShowClear(); + this.$emit('focus', event.detail); + }, + onBlur(event) { + this.focused = false; + this.setShowClear(); + this.$emit('blur', event.detail); + }, + onClickIcon() { + this.$emit('click-icon'); + }, + onClickInput(event) { + this.$emit('click-input', event.detail); + }, + onClear() { + this.setData({ innerValue: '' }); + this.value = ''; + this.setShowClear(); + nextTick(() => { + this.emitChange(); + this.$emit('clear', ''); + }); + }, + onConfirm(event) { + const { value = '' } = event.detail || {}; + this.value = value; + this.setShowClear(); + this.$emit('confirm', value); + }, + setValue(value) { + this.value = value; + this.setShowClear(); + if (value === '') { + this.setData({ innerValue: '' }); + } + this.emitChange(); + }, + onLineChange(event) { + this.$emit('linechange', event.detail); + }, + onKeyboardHeightChange(event) { + this.$emit('keyboardheightchange', event.detail); + }, + emitChange() { + this.setData({ value: this.value }); + nextTick(() => { + this.$emit('input', this.value); + this.$emit('change', this.value); + }); + }, + setShowClear() { + const { clearable, readonly, clearTrigger } = this.data; + const { focused, value } = this; + let showClear = false; + if (clearable && !readonly) { + const hasValue = !!value; + const trigger = clearTrigger === 'always' || (clearTrigger === 'focus' && focused); + showClear = hasValue && trigger; + } + this.setData({ showClear }); + }, + noop() { }, + }, +}); diff --git a/miniprogram/@vant/weapp/dist/field/index.json b/miniprogram/@vant/weapp/dist/field/index.json new file mode 100644 index 0000000..5906c50 --- /dev/null +++ b/miniprogram/@vant/weapp/dist/field/index.json @@ -0,0 +1,7 @@ +{ + "component": true, + "usingComponents": { + "van-cell": "../cell/index", + "van-icon": "../icon/index" + } +} diff --git a/miniprogram/@vant/weapp/dist/field/index.wxml b/miniprogram/@vant/weapp/dist/field/index.wxml new file mode 100644 index 0000000..ec2e0ea --- /dev/null +++ b/miniprogram/@vant/weapp/dist/field/index.wxml @@ -0,0 +1,56 @@ + + + + + + + {{ label }} + + + + + + + + + + + + + + + + + + + + + {{ value.length >= maxlength ? maxlength : value.length }}/{{ maxlength }} + + + {{ errorMessage }} + + diff --git a/miniprogram/@vant/weapp/dist/field/index.wxs b/miniprogram/@vant/weapp/dist/field/index.wxs new file mode 100644 index 0000000..78575b9 --- /dev/null +++ b/miniprogram/@vant/weapp/dist/field/index.wxs @@ -0,0 +1,18 @@ +/* eslint-disable */ +var style = require('../wxs/style.wxs'); +var addUnit = require('../wxs/add-unit.wxs'); + +function inputStyle(autosize) { + if (autosize && autosize.constructor === 'Object') { + return style({ + 'min-height': addUnit(autosize.minHeight), + 'max-height': addUnit(autosize.maxHeight), + }); + } + + return ''; +} + +module.exports = { + inputStyle: inputStyle, +}; diff --git a/miniprogram/@vant/weapp/dist/field/index.wxss b/miniprogram/@vant/weapp/dist/field/index.wxss new file mode 100644 index 0000000..7571fe6 --- /dev/null +++ b/miniprogram/@vant/weapp/dist/field/index.wxss @@ -0,0 +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);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)} \ No newline at end of file diff --git a/miniprogram/@vant/weapp/dist/field/input.wxml b/miniprogram/@vant/weapp/dist/field/input.wxml new file mode 100644 index 0000000..efe9a08 --- /dev/null +++ b/miniprogram/@vant/weapp/dist/field/input.wxml @@ -0,0 +1,28 @@ + diff --git a/miniprogram/@vant/weapp/dist/field/props.js b/miniprogram/@vant/weapp/dist/field/props.js new file mode 100644 index 0000000..ae405b3 --- /dev/null +++ b/miniprogram/@vant/weapp/dist/field/props.js @@ -0,0 +1,64 @@ +export const commonProps = { + value: { + type: String, + observer(value) { + if (value !== this.value) { + this.setData({ innerValue: value }); + this.value = value; + } + }, + }, + placeholder: String, + placeholderStyle: String, + placeholderClass: String, + disabled: Boolean, + maxlength: { + type: Number, + value: -1, + }, + cursorSpacing: { + type: Number, + value: 50, + }, + autoFocus: Boolean, + focus: Boolean, + cursor: { + type: Number, + value: -1, + }, + selectionStart: { + type: Number, + value: -1, + }, + selectionEnd: { + type: Number, + value: -1, + }, + adjustPosition: { + type: Boolean, + value: true, + }, + holdKeyboard: Boolean, +}; +export const inputProps = { + type: { + type: String, + value: 'text', + }, + password: Boolean, + confirmType: String, + confirmHold: Boolean, + alwaysEmbed: Boolean, +}; +export const textareaProps = { + autoHeight: Boolean, + fixed: Boolean, + showConfirmBar: { + type: Boolean, + value: true, + }, + disableDefaultPadding: { + type: Boolean, + value: true, + }, +}; diff --git a/miniprogram/@vant/weapp/dist/field/textarea.wxml b/miniprogram/@vant/weapp/dist/field/textarea.wxml new file mode 100644 index 0000000..5015a51 --- /dev/null +++ b/miniprogram/@vant/weapp/dist/field/textarea.wxml @@ -0,0 +1,29 @@ +