微信小程序使用Vant Weapp中的Toast
首先在app.json
或index.json
中引入组件
"usingComponents": { "van-toast": "@vant/weapp/toast/index" }
然后再.wxml文件中写入:
最后在js文件中,注意一定要注意路径,我就在这路径这里搞了半天
首先在app.json
或index.json
中引入组件
"usingComponents": { "van-toast": "@vant/weapp/toast/index" }
然后再.wxml文件中写入:
最后在js文件中,注意一定要注意路径,我就在这路径这里搞了半天