When you add a new table line, you change the original new line?

 submitAddBook (data) {
    this.addBookOnoff = false
    this.tableData.push(data)
}

The figure above

clipboard.png
is the last line to be added. Why has the previous line been changed as well?

Sep.07,2021

you can see if it is the same object referenced


print the this.tableData to see if it is the data object added by default.


have you solved this problem? ask for sharing


this problem occurs in vue, to a large extent, it is the problem of : key .

In the case of

array, it is possible that you are using the wrong splice, but you are using push, so the problem is on key.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e6422c-45212.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e6422c-45212.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?