Why can't data like arr [2] = {name:1} be monitored when vue data is being monitored?

when vue renders list data. If I want to change the third piece of data. If I write it in the form of arr [2] = {name:2}, the data will not be updated. It must be written in the format arr.splice (1, 1, {name:2}). Or the push method vue will refresh the data. Why. Is it because vue doesn"t support arr [2] = {name:2} to change the data list in the first place? Why.

Mar.15,2021

I guess you must not have read the vue document
clipboard.png


because in the source code, the defineproperty (), used by the author only monitors the list, transmitted by the external data, but not every subscript object in the list

.
Menu