html5 - How to set vue to complete the page loading and then execute the instructions
PHPz2017-05-16 13:39:24
0
1
456
After wanting to get the width of img, use proportion to set the height of img, but there will be situations where the page has not been loaded and the width obtained by the instruction is smaller than the actual width of img.
Add v-if="data" to the parent node, and the child node will not be executed before the data is obtained