Vue page loading, flashing problem?

  <div class="currency">
    <div v-if="flag==true">
    <span v-cloak>{{(type.ico}}</span> 
    <span>USD</span>
    </div>
    <div v-if="flag==false">
      <span v-cloak>{{(type1.price}}</span> 
      <!-- <span :percent="88"></span>   -->
      <span>RMB</span>
    </div>
    <p @click="switchChange">

</div> v-ifNaNv-cloak
Mar.06,2021

write some styles in css in addition to the v-cloak declaration. Own Baidu


  1. isn't there something wrong with your js logic in NaN? The one that cannot be transferred to "Number" has been converted into Number, and NaN has appeared.
  2. v-cloak under a single file component is unnecessary and will not be useful. I don't know if you are a single file component.

< div vMuthififteen answer type1.price'vshow = "flag==true" >
well, I finally used a method to force it, which is a little disgusting, and the effect has been achieved. I still hope there is a better way

.
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-1b375e1-2c06d.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-1b375e1-2c06d.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?