由于ecahrts是一个组件 所以需要在这个组件进行监听一下 传来的数据
props: {
dataValue: {
type: Number,
default: 0,
},
dataName: {
type: String,
default: "出勤率",
},
},
watch: {
dataValue: {
handler(newData) {
console.log("子", newData);
this.init()
},
// 立即监听
immediate: true,
// 深度监听
deep: true,
},
},