vue watch使用了immediate之后,handler的this指向问题
watch使用了immediate之后,handler的this指向问题??
这里的handler方法不能使用箭头函数,改成传统function就可以了
list: { handler: function (newList, oldList) { this.handleListData(newList, oldList) }, deep: true, immediate: true },
这里的handler方法不能使用箭头函数,改成传统function就可以了
list: { handler: function (newList, oldList) { this.handleListData(newList, oldList) }, deep: true, immediate: true },