How to set picture width and height asynchronously by weex custom picture component

the image component that comes with

weex must have width and height set to display.
such as

<image style="widht:100px;height:100px;" src="https://img.codeshelper.com/upload/img/2021/03/28/q2o24511bmg13874.png"></image>

I want to write a picture component with ios and android. After the picture is loaded successfully, I set the width and height, of the component according to the actual size of the picture, but it doesn"t work.

see that there is a setNeedsLayout method, and calling it has no effect.

Mar.28,2021
Bind the load event to

image to get the width and height of the picture, and then set the width and height of the picture by this.$refs


solve it yourself. It's really difficult to use


how to solve it?

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e41e86-44975.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e41e86-44975.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?