Преглед на файлове

Table: fix table column width bug in safari & hide shadow of fixed when scrollX is false (#9327)

FuryBean преди 7 години
родител
ревизия
990df4ed5b
променени са 3 файла, в които са добавени 6 реда и са изтрити 3 реда
  1. 1 1
      packages/table/src/table-column.js
  2. 4 1
      packages/table/src/table-header.js
  3. 1 1
      packages/table/src/table.vue

+ 1 - 1
packages/table/src/table-column.js

@@ -290,7 +290,7 @@ export default {
       }
 
       return _self.showOverflowTooltip || _self.showTooltipWhenOverflow
-        ? <div class="cell el-tooltip" style={{width: (data.column.realWidth || data.column.width) + 'px'}}>{ renderCell(h, data) }</div>
+        ? <div class="cell el-tooltip" style={ {width: (data.column.realWidth || data.column.width) - 1 + 'px'} }>{ renderCell(h, data) }</div>
         : <div class="cell">{ renderCell(h, data) }</div>;
     };
   },

+ 4 - 1
packages/table/src/table-header.js

@@ -137,7 +137,10 @@ export default {
                 }
                 {
                   this.hasGutter
-                    ? <th class="gutter" style={{ width: this.layout.scrollY ? this.layout.gutterWidth + 'px' : '0' }}></th>
+                    ? <th class="gutter" style={{
+                      width: this.layout.scrollY ? this.layout.gutterWidth + 'px' : '0',
+                      display: this.layout.scrollY ? '' : 'none'
+                    }}></th>
                     : ''
                 }
               </tr>

+ 1 - 1
packages/table/src/table.vue

@@ -25,7 +25,7 @@
     <div
       class="el-table__body-wrapper"
       ref="bodyWrapper"
-      :class="[`is-scroll-${scrollPosition}`]"
+      :class="[layout.scrollX ? `is-scroll-${scrollPosition}` : 'is-scroll-none']"
       :style="[bodyHeight]">
       <table-body
         :context="context"