先把 package-lock.json,package.json,node_modules,miniprogram_npm都删干净。
打开终端,执行 npm init ,全程回车,不输入任何配置信息
执行 npm i vant-weapp -S --production
"usingComponents": { "recycle-view": "miniprogram-recycle-view/recycle-view", "recycle-item": "miniprogram-recycle-view/recycle-item" }
<recycle-view batch="{{batchSetRecycleData}}" id="recycleId"> <view slot="before">长列表前面的内容</view> <recycle-item wx:for="{{recycleList}}" wx:key="id"> <view> <image style='width:80px;height:80px;float:left;' src="{{item.image_url}}"></image> {{item.idx+1}}. {{item.title}} </view> </recycle-item> <view slot="after">长列表后面的内容</view>