浏览代码

Fixed fixedColumns toogleView display bug (#5413)

文翼 5 年之前
父节点
当前提交
72c6b9a823
共有 1 个文件被更改,包括 7 次插入0 次删除
  1. 7 0
      src/extensions/fixed-columns/bootstrap-table-fixed-columns.js

+ 7 - 0
src/extensions/fixed-columns/bootstrap-table-fixed-columns.js

@@ -90,6 +90,13 @@ $.BootstrapTable = class extends $.BootstrapTable {
   initBody (...args) {
     super.initBody(...args)
 
+    if (this.$fixedColumns && this.$fixedColumns.length) {
+      this.$fixedColumns.toggle(this.fixedColumnsSupported())
+    }
+    if (this.$fixedColumnsRight && this.$fixedColumnsRight.length) {
+      this.$fixedColumnsRight.toggle(this.fixedColumnsSupported())
+    }
+
     if (!this.fixedColumnsSupported()) {
       return
     }