@H_4030@父子组件通信
@H4030@这个官网很清楚,也很简单,父组件中使用v-bind绑定传送,子组件使用props接收即可
@H4030@例如:
@H403_0@<span style="background-color: #ccffcc">
父组件中
<div class="jb51code">
<pre class="brush:js;">
}).then((res) => {
this.number = res.data.domain.list[0].number;
this.amount = res.data.domain.list[0].amount;
this.profits = res.data.domain.list[0].profits;
this.chartData = [this.number,this.amount,this.profits];
}).catch((err) => {
console.log(err);
})
},},</script>