在这种情况下,我无法从Vuex Store获得吸气剂,并且每当吸气剂发生变化(新值更新)时,都应重新分配本地状态数据(“列表”)。This is my component, which has 'list' in data
观看数组或对象时,您需要将deep设置为true,以便Vue知道应该监视嵌套数据的更改。
watch: {
getSkills: {
handler () {
this.list = this.getSkills.map(items => {
return { value: items.id, label: items.name }
})
},
deep: true
}
}