1.通过 npm 安装 npm init -y
2.打开cmd 输入@vant/weapp -S --production
3.修改 app.json
将 app.json 中的"style": "v2"去除
4.在工具中 找到并 构建 npm 包
\
运用的话需要在json文件中配置:
"usingComponents": {
"MySwiper":"/components/MySwiper/MySwiper",}
就可以在wxml文件中引用:
<van-transition name="fade-up" show="{{ true }}" custom-class="block">内容
\