Vue项目优化,echart实例

Vue项目优化

1.打包发布自定义配置:https://cli.vuejs.org/zh/config/#vue-config-js

2.配置HTTPS https://freessl.cn

3.mock.js 生成测试数据

 

4.echart实例:
https://echarts.apache.org/zh/index.html

echart实例:
1.引入echarts.min.js
2.<div id="main" style="width:600px;height:800px;></div>
3.<script>
var ectest=echarts.init(document.getElementById("main"));
var option=""//从echart官网复制你想要的图像样式
var option = {
xAxis: {
type: 'category',
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
},
yAxis: {
type: 'value'
},
series: [{
data: [820, 932, 901, 934, 1290, 1330, 1320],
type: 'line'
}]
};

ectest.setOption(option);
</script>

posted @ 2020-05-30 18:58  大树2  阅读(650)  评论(0编辑  收藏  举报