首先在app.jsonindex.json中引入组件

"usingComponents": { "van-toast": "@vant/weapp/toast/index" }

微信小程序使用Vant Weapp中的Toast

然后再.wxml文件中写入:

微信小程序使用Vant Weapp中的Toast

最后在js文件中,注意一定要注意路径,我就在这路径这里搞了半天

微信小程序使用Vant Weapp中的Toast 

 微信小程序使用Vant Weapp中的Toast

相关文章:

  • 2021-06-14
  • 2021-04-02
  • 2021-09-02
  • 2021-04-13
  • 2022-12-23
  • 2021-07-10
  • 2022-12-23
  • 2021-11-17
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-06
  • 2021-04-01
  • 2021-08-18
  • 2021-06-01
相关资源
相似解决方案