From d33eacc1f85ac3a736b33ba4713a19aae466d711 Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期五, 05 八月 2022 16:42:53 +0800
Subject: [PATCH] 1.做适应平板显示的内容大小
---
src/views/scgl/sckbg.vue | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/src/views/scgl/sckbg.vue b/src/views/scgl/sckbg.vue
index 9810c13..db79de5 100644
--- a/src/views/scgl/sckbg.vue
+++ b/src/views/scgl/sckbg.vue
@@ -30,7 +30,7 @@
<div class="elTableDiv">
<el-table
:data="tableData"
- :height="tableHeight+'px'"
+ :height="isIpad? (tableHeight+50):tableHeight"
border
stripe
:style="{width: 100+'%',height:tableHeight+'px',}"
@@ -192,7 +192,7 @@
<div class="elTableDiv">
<el-table
:data="WXtableData"
- :height="tableHeight+'px'"
+ :height="isIpad? (tableHeight+50):tableHeight"
border
stripe
:style="{width: 100+'%',height:tableHeight+'px',}"
@@ -320,7 +320,7 @@
<el-dialog
:title="dialogTitle"
:visible.sync="dialogVisible"
- width="800"
+ width="850px"
class="dialogVisible"
:top="dialogTitle==='鑷埗鎶ュ伐'?'5vh':'15vh'"
:close-on-click-modal="false"
@@ -661,6 +661,7 @@
title="棰勮"
:visible.sync="dialogVisible2"
width="1140"
+ :close-on-click-modal="false"
@close="dialogVisible2Close"
>
<!-- 瑕佹墦鍗扮殑鍖哄煙 -->
@@ -769,6 +770,7 @@
return {
mainHeight: 0,
tableHeight: 0,
+ isIpad: false,
// produceCode: '', // 宸ュ簭鐮�
// WXproduceCode: '', // 澶栧崗宸ュ簭鐮�
radioSelected: '', // 宸ュ簭閫変腑
@@ -1503,7 +1505,11 @@
getHeight() {
this.$nextTick(() => {
this.mainHeight = window.innerHeight - 250
- this.tableHeight = this.mainHeight - 80
+ this.tableHeight = this.mainHeight - 50
+ this.isIpad = window.innerHeight < 769
+ if (window.innerHeight < 769) {
+ this.tableHeight = this.tableHeight - 50
+ }
})
}
}
--
Gitblit v1.9.3