1、问题描述
watch: {
list: (newV, oldV) => {
this.projectList = newV;
}
}
按照上述写法,运行时出现undefined,这里错误的原因是使用了箭头函数。
2、解决方法
watch: {
list: function(newV, oldV) {
this.projectList = newV;
}
}
3、原因分析
1、问题描述
watch: {
list: (newV, oldV) => {
this.projectList = newV;
}
}
按照上述写法,运行时出现undefined,这里错误的原因是使用了箭头函数。
2、解决方法
watch: {
list: function(newV, oldV) {
this.projectList = newV;
}
}
3、原因分析