Forráskód Böngészése

Merge branch 'xqc_chartHeight'

jwyu 1 éve
szülő
commit
3a9a94cbb0
3 módosított fájl, 16 hozzáadás és 5 törlés
  1. 6 0
      src/App.vue
  2. 9 4
      src/views/chartShow/index.less
  3. 1 1
      src/views/chartShow/index.vue

+ 6 - 0
src/App.vue

@@ -6,6 +6,12 @@
 </template>
 
 <style lang="less">
+div{
+  box-sizing: border-box;
+}
+#app{
+  height: 100%;
+}
 .el-message{
   min-width: 250px !important;
 }

+ 9 - 4
src/views/chartShow/index.less

@@ -18,12 +18,15 @@
 		}
 		max-width: 1200px;
 		max-height: 100vh;
+		height: 100%;
 		overflow: hidden;
 		position: relative;
 		margin: 0 auto;
 		border: 1px solid rgba(0, 0, 0, 0.125);
 		background: #fff;
 		border-radius: 5px;
+		display: flex;
+		flex-direction: column;
 		.chart-header {
 			background-color: #F2F2F2;
 			border-bottom: 1px solid rgba(0, 0, 0, 0.125);
@@ -48,6 +51,7 @@
 		.chart-wrapper {
 			flex: 1;
 			position: relative;
+			overflow: hidden;
 			.mark {
 				position:absolute;
 				left: 50%;
@@ -113,11 +117,12 @@
 		}
 		.chart-show {
 			top: 5vh;
+			max-height: 90vh;
 		}
 		.chart-wrapper {
 			padding: 0 10px 10px;
-			height: calc(100vh - 170px);
-			max-height: calc(100vh - 170px);
+			// height: calc(100vh - 170px);
+			// max-height: calc(100vh - 170px);
 			// max-height: 750px;
 		}
 	}
@@ -134,8 +139,8 @@
 		}
 		.chart-wrapper {
 			width:  calc(100vw - 4px);
-			height: calc(100vh - 100px);
-			max-height: calc(100vw - 100px);
+			// height: calc(100vh - 100px);
+			// max-height: calc(100vw - 100px);
 			padding: 0 0 5px;
 		}
 	}

+ 1 - 1
src/views/chartShow/index.vue

@@ -137,7 +137,7 @@ export default defineComponent({
 
     /* 获取图表数据信息 */
     const loading = ref(false);
-    const haveData = ref(true);
+    const haveData = ref(false);
     const code = ref(route.query.code);
     const isShare = ref(route.query.fromType === 'share');
     // 语言 中英文 ch en  默认中文