0👍
It looks like you’re updating subproperties of each of the watched objects, but Vue 2 watchers don’t monitor subproperty changes by default.
One solution is to use the deep
flag for the watchers:
// ChartComponent.vue
export default {
watch: {
aqiLineChartData: {
immediate: true,
deep: true,
handler() {/*...*/}
}
}
}
// LineChart.js
export default {
watch: {
chartData: {
deep: true,
handler() {/*...*/},
}
}
}
- [Vuejs]-How to change vue-toasted pop-up direction
- [Vuejs]-How to reset/clear checkboxes on clicking of label in Vuejs?
Source:stackexchange.com