showRow(row,val){
this.getData2();
},
getData2(){
let _this = this;
let data={'changeTime':row.changeTime,'moneySource':row.moneySource};
_this.$axios.post(url,data).then(function (res) {
console.log(data);
_this.tableData2 = res.data.list;
// console.log(res.data.list);
})
.catch(function (error) {
console.log(error);
});
},
报错row is not defined
楼上讲得很清楚啦,你的showRow方法套了对另一个方法的调用,单纯看你现在的代码,直接把
getData2()
的函数体放进去就好了,报undefined
因为getData2()
中没有row
参数或楼上的