修复Salon对象存储头像展示
This commit is contained in:
@@ -33,6 +33,12 @@ Component({
|
||||
if (item) this.triggerEvent('select', { item })
|
||||
},
|
||||
|
||||
onAvatarError(event) {
|
||||
const index = Number(event.currentTarget.dataset.index)
|
||||
if (!Number.isInteger(index) || !this.data.items[index]) return
|
||||
this.setData({ [`items[${index}].avatar`]: '' })
|
||||
},
|
||||
|
||||
retry() {
|
||||
this.triggerEvent('retry')
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user