1:首先要用到echarts
2:在vue中安装这个依赖
3:引入要用的页面
import echarts from 'echarts';
4:然后初始化
统计更新及时率
{{item.name}}
.layui-card-header {
position: relative;
height: 42px;
line-height: 42px;
padding: 0 15px;
border-bottom: 1px solid #f6f6f6;
color: #333;
border-radius: 2px 2px 0 0;
font-size: 14px;
}
.common-height {
height: 280px;
}
.layui-card {
margin-bottom: 15px;
border-radius: 2px;
background-color: #fff;
box-shadow: 0 1px 2px 0 rgba(0,0,0,.05);
}
.layui-card-body {
position: relative;
padding: 10px 15px;
line-height: 24px;
}
.layui-col-md20 {
width: 20%;
}
.time-city-panel {
display: flex !important;
justify-content: space-between;
align-items: center;
}
.time-city-panel img {
width: 73px !important;
height: 61px !important;
padding: 0 10px 10px !important;
}
.time-city-panel .one-row,
.time-city-panel .two-row {
padding: 0 10px;
}
.time-city-panel .one-row p:first-of-type {
font-size: 18px;
font-weight: bold;
padding: 0 0 10px;
text-align: left;
}
.time-city-panel .two-row p:first-of-type {
padding: 0 0 10px;
color: #96acbc;
font-weight: bold;
line-height: 22px;
}
.db_img {
width: 20px;
height: 22px;
margin: 0 5px;
vertical-align: middle;
}
.panel-title .left-text {
padding-left: 10px;
border-left: 8px solid #239fe6;
font-size: 20px;
display: inline-block;
height: 30px;
line-height: 30px;
vertical-align: middle;
}
.panel-title .right-text {
float: right;
color: #239fe6;
font-size: 14px;
margin-left: 15px;
}
.common-height {
height: 280px;
}
.text-overflow {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.tjgx-panel .right-text span,
.ajtj-panel .right-text span {
display: inline-block;
color: #b0b0b0;
}
.tjgx-panel .right-text span.acitive,
.ajtj-panel .right-text span.acitive {
color: #239fe6;
}
#chart,
#ajtjChart {
width: 100%;
height: 90%;
}
5:Echarts 组件
6:效果图
以上就是vue中使用echarts的步骤的详细内容,更多关于vue 使用echarts的资料请关注考高分网其它相关文章!



