1.第一种
<template> <my-chilid v-if="show"/> </template> <script> export default{ data(){ return { show:true, list:[] } }, watch:{ list(){ this.show= false this.$nextTick(()=>{ this.show= true }) } } } </script>
2.第二种
<template>
<my-chilid :key="mykey"/>
</template>
<script>
export default{
data(){
return {
mykey:1,
list:[]
}
},
watch:{
list(){
++this.mykey
}
}
}
</script>