Listen to whether the array data has changed

in the vue page, data is a piece of data that renders the table. How to monitor or use watch to detect changes in data?

data: [
     {
         name: "John Brown",
         age: 18
     },
     {
         name: "Jim Green",
         age: 24
     },
     {
         name: "Joe Black",
         age: 30,
         address: "Sydney No. 1 Lake Park",
         date: "2016-10-02"
     }]
Apr.07,2021

  1. if is only listening to increase or decrease of array list items, it would be better to listen to the array directly
  

regenerate an object with a deep copy to observe the object of the heart

Menu