浏览代码

Fixed detail view header display error

zhixin 7 年之前
父节点
当前提交
3df4b98c0f
共有 2 个文件被更改,包括 4 次插入2 次删除
  1. 3 1
      src/bootstrap-table.js
  2. 1 1
      src/bootstrap-table.scss

+ 3 - 1
src/bootstrap-table.js

@@ -2238,7 +2238,9 @@
 
 
         if (this.options.detailView && !this.options.cardView) {
         if (this.options.detailView && !this.options.cardView) {
           if (i === 0) {
           if (i === 0) {
-            this.$header_.find('th.detail').find('.fht-cell').width($this.innerWidth())
+            const $thDetail = $ths.filter('.detail')
+            const zoomWidth = $thDetail.width() - $thDetail.find('.fht-cell').width()
+            $thDetail.find('.fht-cell').width($this.innerWidth() - zoomWidth)
           }
           }
           index = i - 1
           index = i - 1
         }
         }

+ 1 - 1
src/bootstrap-table.scss

@@ -139,7 +139,7 @@ $dark-border-color: #32383e;
         }
         }
 
 
         &.detail {
         &.detail {
-          width: 30px;
+          width: 36px;
         }
         }
 
 
         .th-inner {
         .th-inner {