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.
给我你的怀抱2017-05-16 13:41:24
Add v-if="data" to the parent node, and the child node will not be executed before the data is obtained