Vant 安装
第一种方式
根据开发文档安装https://youzan.github.io/vant-weapp/#/quickstart
第二种方式
输入npm init -y
输入npm i @vant/weapp@1.3.3 -S --production
2、构建npm
3、删除 "style": "v2",
在app.json中添加常用的组件
"usingComponents": {
"van-button": "@vant/weapp/button/index",
"van-cell": "@vant/weapp/cell/index",
"van-cell-group": "@vant/weapp/cell-group/index",
"van-divider": "@vant/weapp/divider/index",
"van-field": "@vant/weapp/field/index",
"van-grid": "@vant/weapp/grid/index",
"van-grid-item": "@vant/weapp/grid-item/index",
"van-icon": "@vant/weapp/icon/index",
"van-picker": "@vant/weapp/picker/index",
"van-tag": "@vant/weapp/tag/index",
"van-image": "@vant/weapp/image/index",
"van-row": "@vant/weapp/row/index",
"van-col": "@vant/weapp/col/index",
"van-notice-bar": "@vant/weapp/notice-bar/index",
"van-checkbox": "@vant/weapp/checkbox/index",
"van-checkbox-group": "@vant/weapp/checkbox-group/index",
"van-tabbar": "@vant/weapp/tabbar/index",
"van-tabbar-item": "@vant/weapp/tabbar-item/index",
"van-nav-bar": "@vant/weapp/nav-bar/index",
"van-dialog": "@vant/weapp/dialog/index",
"van-toast": "@vant/weapp/toast/index",
"van-loading": "@vant/weapp/loading/index",
"van-overlay": "@vant/weapp/overlay/index",
"van-tab": "@vant/weapp/tab/index",
"van-tabs": "@vant/weapp/tabs/index",
"van-card": "@vant/weapp/card/index",
"van-uploader": "@vant/weapp/uploader/index",
"van-panel": "@vant/weapp/panel/index",
"van-popup": "@vant/weapp/popup/index",
"van-collapse": "@vant/weapp/collapse/index",
"van-collapse-item": "@vant/weapp/collapse-item/index",
"van-radio": "@vant/weapp/radio/index",
"van-radio-group": "@vant/weapp/radio-group/index",
"van-stepper": "@vant/weapp/stepper/index",
"van-steps": "@vant/weapp/steps/index",
"van-sidebar": "@vant/weapp/sidebar/index",
"van-sidebar-item": "@vant/weapp/sidebar-item/index",
"van-search": "@vant/weapp/search/index",
"k-notice-bar": "/components/k/k-notice-bar/index"
},