dialogTableCilck1(row) {
const data = {
forderNo: row.orderNo
}
console.log(data)
this.$post('', data).then(request => {
console.log(request)
this.dialogData1 = request
if (this.dialogData1.length > 0) {
this.receivable = this.dialogData1[0]
}
})
},
After sending a request to the background, get an array type of data, and then assign the data with index 0 in the array to an object. When the page is initialized or reloaded, there is no value in the array, so the index cannot be found. The value of 0 will report an error when assigning it to an object, so when assigning the value under the array index to an object, a judgment must be made, otherwise an error will be reported