mpvue 使用npm

  1. 在mpvue 按文档使用
    1.1 安装
    1.2
    
      "usingComponents": {
        "van-button": "@vant/weapp/button/index",
        "van-toast": "@vant/weapp/toast/index",
        "van-row": "@vant/weapp/row/index",
        "van-col": "@vant/weapp/col/index",
        "van-image": "@vant/weapp/image/index"
      }
    

2 在微信小程序构建npm
安装npm
npm init 全部默认
安装 npm

你可能感兴趣的:(解决方案)