1.父界面
<planComplete
v-if="RegistStatistic"
:RegistStatistic="RegistStatistic"
/>
2.子页面
props接收:
// 原始数据
props: {
RegistStatistic: {
type: Array,
required: true,
default() {
return [];
},
},
},
监听:
watch: {
RegistStatistic() {
this.RegistStatistic.map((item) => {
this.xAxisData.push(item.date); //需要整合数据 整合数据
this.seriesData.push(item.count);
});
this.echarts(); //调用echart方法
},
},