关于Echarts 组件封装
<template>
<div ref="echarts" style="width: 100%;height: 100%;"></div>
</template>
<script>
import echarts from "echarts";
export default {
name: "VueEcharts",
props: {
option: {
type: Object,
default: () => ({
})
},
renderer: {
type: String,
default: "canvas"
},
carousel: {
type: Object,
default: null
}
},
mounted() {
this.myChart = echarts.init(this.$refs.echarts, null, {
renderer: this.renderer || "canvas"
});
this.myChart.setOption(this.opt