How does vue add new fields to the array returned by the interface?

how does vue cycle through adding a new field to the array majors in res.list such as: the activeName field defaults to false.

Apr.05,2021

Vue.set


this.res.list.majors.forEach(item => {
    this.$set(item, 'activeName', false)
})
Menu