vue组件监听不生效,比深度监听还管用哦
在Watch监听数组里面里加上
immediate: true,
watch:{ myArrList:{ immediate: true, handler(curVal,oldVal){ console.log(curVal,oldVal) } , deep:true } },
在Watch监听数组里面里加上
immediate: true,
watch:{ myArrList:{ immediate: true, handler(curVal,oldVal){ console.log(curVal,oldVal) } , deep:true } },