小程序是最新版的,安装van流程

 

1:打开小程序的文件 npm init  然后下载 

# 通过 npm 安装 npm i vant-weapp -S --production

# 通过 yarn 安装 yarn add vant-weapp --production

 

然后在小程序中工具中`构建npm` 

在文件.json 中引入

{
  "usingComponents": {
    "van-button": "vant-weapp/button"
    }
}

  页面引入

<van-button type="default">默认按钮</van-button>
测试成功!!!
注意顺序一定不能错!!!

相关文章:

  • 2021-06-21
  • 2021-12-05
  • 2022-01-14
  • 2022-12-23
  • 2021-12-07
猜你喜欢
  • 2021-05-07
  • 2021-12-15
  • 2022-12-23
  • 2021-10-31
  • 2021-12-25
  • 2021-06-14
  • 2021-12-17
相关资源
相似解决方案