浏览代码

feat: 优化物联概览页面echarts 图形 title 的左边距,和其他卡片 title 保持一致

yanglzh 1 年之前
父节点
当前提交
150bbafad1
共有 1 个文件被更改,包括 8 次插入4 次删除
  1. 8 4
      src/views/iot/iotmanager/dashboard.vue

+ 8 - 4
src/views/iot/iotmanager/dashboard.vue

@@ -31,12 +31,12 @@
 		</el-row>
 		<el-row :gutter="15" class="home-card-two mb15">
 			<el-col :xs="24" :sm="14" :md="14" :lg="16" :xl="16">
-				<div class="home-card-item">
+				<div class="home-card-item chart">
 					<div style="height: 100%" ref="homeLineRef"></div>
 				</div>
 			</el-col>
 			<el-col :xs="24" :sm="10" :md="10" :lg="8" :xl="8" class="home-media">
-				<div class="home-card-item">
+				<div class="home-card-item chart">
 					<div style="height: 100%" ref="homePieRef"></div>
 				</div>
 			</el-col>
@@ -235,7 +235,7 @@ export default defineComponent({
 				backgroundColor: state.charts.bgColor,
 				title: {
 					text: '设备消息',
-					x: 'left',
+					x: 5,
 					textStyle: { fontSize: '15', color: state.charts.color },
 				},
 				grid: { top: 70, right: 20, bottom: 30, left: 50 },
@@ -340,7 +340,7 @@ export default defineComponent({
 				backgroundColor: state.charts.bgColor,
 				title: {
 					text: '预警类型',
-					x: 'left',
+					x: 5,
 					textStyle: { fontSize: '15', color: state.charts.color },
 				},
 				// tooltip: { trigger: 'item', formatter: '{b} <br/> {c}%' },
@@ -875,4 +875,8 @@ $homeNavLengh: 8;
 		margin-top: 20px;
 	}
 }
+
+.home-card-item.chart {
+	padding: 10px !important;
+}
 </style>