<image
src="/test.webp"
mode="widthFix"
wx:if="{{show}}"
bind:error="error"
/>
<button
bind:tap="toggle"
style="margin-top: 128px"
>show webp</button>
Page({
data: {
show: false
},
toggle() {
this.setData({show: !this.data.show})
},
error(e) {
console.error(e)
}
})
开发者工具正常,iOS 和 Android 真机均异常。
{
"type": "error",
"timeStamp": 4682,
"target": {
"id": "",
"offsetLeft": 231,
"offsetTop": 443,
"dataset": {}
},
"currentTarget": {
"id": "",
"offsetLeft": 231,
"offsetTop": 443,
"dataset": {}
},
"mark": {},
"detail": {
"errMsg": "getLocalImgData:fail get file data fail"
},
"mut": false,
"_userTap": false
}