mpvue使用vant-weapp

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"
  }

 

 

mpvue使用vant-weapp

上一篇:思路清奇:通过 JavaScript 获取移动设备的型号


下一篇:elasticsearch之mappings