// echarts 转成img标签src可以接受的url
var chartDom = document.getElementById(‘myCharts’);
var myChart = this.$echarts.init(chartDom);
var option;
option = {
animation:false, // 关闭开始动画
xAxis: {
type: ‘category’,
data: [‘Mon’, ‘Tue’, ‘Wed’, ‘Thu’, ‘Fri’, ‘Sat’, ‘Sun’]
},
yAxis: {
type: ‘value’
},
series: [
{
data: [150, 230, 224, 218, 135, 147, 260],
type: ‘line’
}
]
};
option && myChart.setOption(option);
this.echartsimg = myChart.getDataURL()
// dom 直接绑定src
< img :src=“echartsimg” alt=“”/>
/* esl
int
-disable */
const
Pr
int
1 = function (dom, options) {
if (!(this instanceof
Pr
int
1)) return new
Pr
int
1(dom, options);
this.options = this.extend({
'no
Pr
int
': '.no-
pr
int
'
}, options);
if ((typeof dom) === "string") {