How to use image component binderror in WeChat Mini Programs
This article mainly introduces the relevant knowledge of "how to use the image component binderror in WeChat Mini Programs". The editor shows you the operation process through an actual case. The operation method is simple, fast and practical. I hope this article "how to use the image component binderror in WeChat Mini Programs" can help you solve the problem.
WeChat Mini Programs image component binderror usage example (corresponding to onerror in html and js)
Official document
BinderrorHandleEvent event name published to AppService when an error occurs, event object event.detail = {errMsg: 'something wrong'}
In WeChat Mini Programs's development, we use a list to contain pictures, and if the picture link is incorrect, then we should provide it with a default friendly URL address. Using the onerror event in html and js is fine