转自:https://blog.csdn.net/WO_JIAMIFENG/article/details/115250918
<div :key="inputkey">
我是子组件,我不更新,我的标签上加个:key
<div>
watch: {
data: {
deep: true,
immediate: true,
handler(val) {
this.inputkey= +new Date()
}
}
},
data() {
return {
inputkey: +new Date(),
}
}