1: 参考mpvue官方 五分钟快速上手教程 新建一个mpvue项目
2: 下载 vant-weapp
git clone https://github.com/youzan/vant-weapp.git
3: 复制dist文件夹里的所有内容,到你的项目 /static/vant/ 文件夹下
4: 在需要用到的页面目录下新建main.json 内容按需导入,照着标签名字改就行
{
"usingComponents": {
"van-button": "/static/vant/button/index",
}
}
5: 页面里使用标签看效果就可以啦
<van-button type="danger">危险按钮</van-button>
最新回复