1 同样使用wepy-cli快速生成的小程序,目前可以使用组件: 2 直接通过 git 下载 Vant Weapp 源代码,并将dist目录拷贝到自己的项目中 3 git clone https://github.com/youzan/vant-weapp.git 4 将dist/目录拷贝到项目src/components/目录下面(根据自己目录结构调整)。 5 在页面test.wpy中的config字段使用 6 config = { 7 usingComponents: { 8 'van-popup': '../../components/dist/popup/index' 9 } 10 } 11 使用,页面中: 12 <van-popup show="{{ show }}" bind:close="onClose">内容</van-popup>