VueJS dynamic property name not updating value

前端 未结 2 1189
感情败类
感情败类 2021-01-06 08:06

I am trying to implement an associated array combined with accessing the property within the value, the key is based on the value of the campaign object.

<         


        
2条回答
  •  我在风中等你
    2021-01-06 08:47

    Properties with reactivity must be in a Vue instance which is created by Vue constructor.

    It ensures that properties are reactive and trigger view updates, i.e., they are initialed with Object.defineProperty and MutationObserver underlyingly.

    So, use Vue.set to add new properties, and delete by Vue.delete.

    View more info - Reactivity in Depth

提交回复
热议问题