search

Home  >  Q&A  >  body text

html5 - How to set vue to complete the page loading and then execute the instructions

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.

PHPzPHPz2747 days ago441

reply all(1)I'll reply

  • 给我你的怀抱

    给我你的怀抱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

    reply
    0
  • Cancelreply