一、下载包
npm install echarts -S
二、main.js中引入
import echarts from 'echarts'
Vue.prototype.$echarts = echarts
三、在页面中使用
<template>
<div id="myChart" :style="{ width: '100%', height: '400px' }"></div>
</template>
<script>
import echarts from "echarts";
import {
getLineList } from "@/api/home";
export default {
data() {
return {
lineList: [], //时间
baseVideo: [], //基础素材
MaterialVideo: [], //成品素材
};
},
created() {
},
mounted() {
this.handleGetLine();
this.drawLine(