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>