Vue强制刷新Dom

  • 参考:https://segmentfault.com/q/1010000015276370/a-1020000015276972
  • 参考:https://www.jianshu.com/p/15f26c504554
  • 参考: https://blog.csdn.net/qq_16772725/article/details/80467492
  • 官网: https://cn.vuejs.org/v2/api/#vm-forceUpdate
    • vm.$forceUpdate()
    • vm.$nextTick( [callback] )
    <component v-if="hackReset"></component>
    /*某一操作重置数据*/
    this.hardReset= false
    this.$nextTick(() => {
        this.hardReset= true
    });
    

你可能感兴趣的:(Vue.js,vue,刷新,Dom,强制)