程序员的资源宝库

网站首页 > gitee 正文

mpvue使用vant-weapp vue安装vant

sanyeah 2024-03-29 15:20:39 gitee 8 ℃ 0 评论

1.npm install vant-weapp
 
2.在webpack.base.conf.js加参数
new CopyWebpackPlugin([
      {
        from: resolve('node_modules/vant-weapp/dist'),
        to: resolve('dist/wx/vant-weapp/dist'),
        ignore: ['.*']
      }
    ])

3.在页面json引入控件

"usingComponents": {
    "van-button": "../../vant-weapp/dist/button/index",
    "van-cell-group": "../../vant-weapp/dist/cell-group/index",
    "van-cell": "../../vant-weapp/dist/cell/index",
    "van-icon": "../../vant-weapp/dist/icon/index",
    "van-swipe-cell": "../../vant-weapp/dist/swipe-cell/index"
  }

 

 

Tags:

本文暂时没有评论,来添加一个吧(●'◡'●)

欢迎 发表评论:

最近发表
标签列表