vue not only refresh the page to refresh the assembly method of recording

the first method:

<medical-record v-if="fresh" />

fresh = false // 组件加载

this.fresh = false
this.$nextTick(() => {
  this.fresh = true
})

The second method:

this.$forceUpdate() // 重新渲染组件

 

Published 10 original articles · won praise 0 · Views 424

Guess you like

Origin blog.csdn.net/lq099526/article/details/104636160