<template> <div class="chart-container"> <div class="chart-header"> <!--标题 --> <span class="title"> 经销商订单同比/环比统计 </span> </div> <div class="chart-content" :style="{'height':height,'width':width}"> <!-- echarts内容 --> <areaChart :xAxisData="xAxisData" :seriesData="seriesData" :legend="legend"/> </div> </div> </template> <script> import areaChart from "../../../components/echart/lineChart/areaChart.vue"; export default { name: "layoutChartSelect", components: { areaChart, }, props: { name: { type: String, default: "", }, width:{ type: String, default: "500px" }, height:{ type: String, default: "250px" } }, data() { return { seriesData: [], xAxisData: [], yAxisData: [], legend:[] }; }, mounted() { setTimeout(() => { this.seriesData = [ { data: [820, 932, 901, 934, 1290, 1330, 1320], }, ]; this.xAxisData = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"]; this.legend['供应商数量'] },1000); }, }; </script> <style lang="scss" scoped> .chart-container { .chart-header { width: 600px; align-items: center; display: flex; justify-content: space-between; } .chart-content { // width: 600px; // height: 400px; } } </style>