修改echart引入方式
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
|
||||
<script>
|
||||
import echartMixins from "@/utils/resizeMixins";
|
||||
const echarts = require("echarts");
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@@ -20,7 +20,7 @@ export default {
|
||||
methods: {
|
||||
draw() {
|
||||
// 基于准备好的dom,初始化echarts实例
|
||||
this.chart = echarts.init(document.getElementById("centreLeft1Chart"));
|
||||
this.chart = this.$echarts.init(document.getElementById("centreLeft1Chart"));
|
||||
// ----------------------------------------------------------------
|
||||
|
||||
this.chart.setOption({
|
||||
|
||||
Reference in New Issue
Block a user