hideLoading() }).catch(error => { //存在有上传失败的文件 wx.hideLoading() wx.showToast({ title: '上传失败!', icon: 'none', }) }) } 删除图片操作函数绑定相对应的删除图片事件deleteImg(event) { const delIndex = event.detail.index const { fileList } = this.data fileList.splice(del...
1<imagecatchtap='onCollectionTap'wx:if="{{collected}}"src="/images/icon/collect1.png"></image>2<imagewx:else catchtap='onCollectionTap'src="/images/icon/collect.png"></image> 首先对Image绑定相应变量,选用catchxxx而不选用bindxxx进行绑定是因为,catch不会出发冒泡事件就不会向父节点传递,写的过...