Explorar el Código

固定表格高度增加侧边栏

wyd hace 1 año
padre
commit
7de8f82e3b
Se han modificado 2 ficheros con 7 adiciones y 3 borrados
  1. 4 2
      src/views/Data.vue
  2. 3 1
      src/views/WarnSet/WarnSetModal.vue

+ 4 - 2
src/views/Data.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="realtime-data">
+  <div class="realtime-data" style="height: auto">
     <navigation-name :msg="companyName" show-time show-other>
       <div style="margin-left: 20px;">
         <el-select
@@ -25,6 +25,7 @@
 <!--    <div>{{ tableLoading }}</div>-->
     <el-table
       :data="tableData"
+      height="100%"
       :span-method="objectSpanMethod"
       :header-cell-style="{
         background: '#BFBFBF',
@@ -44,7 +45,7 @@
       row-key="id"
       border
       stripe
-      style="width: 100%">
+      style="width: 100%; background-color: inherit;min-height: 820px;">
       <el-table-column
         v-for="(item, index) in tableColumns"
         :key="index"
@@ -245,6 +246,7 @@ export default {
 <style lang="less" scoped>
   .realtime-data {
     padding: 0 40px;
+    height: 80vh;
 
     .el-table {
       box-shadow: 1px 1px 1px #BFBFBF, -1px -1px -1px #666666;

+ 3 - 1
src/views/WarnSet/WarnSetModal.vue

@@ -3,6 +3,7 @@
     <br/>
     <el-table
       :data="tableData"
+      height="100%"
       :header-cell-style="{
         background: '#BFBFBF',
         boxShadow: 'inset grey 0px -1px',
@@ -21,7 +22,7 @@
       row-key="id"
       border
       stripe
-      style="width: 100%">
+      style="width: 100%;background-color: inherit;min-height: 800px;">
       <el-table-column
         label="名称"
         prop="entityName"
@@ -201,6 +202,7 @@ export default {
 <style lang="less" scoped>
   .warn-set-modal {
     width: 100%;
+    height: 90vh;
     font-size: 16px;
     display: flex;
     flex-direction: column;