Browse Source

Update bootstrap-table.js

文翼 6 years ago
parent
commit
02e83b620a
1 changed files with 2 additions and 3 deletions
  1. 2 3
      src/bootstrap-table.js

+ 2 - 3
src/bootstrap-table.js

@@ -666,9 +666,8 @@
       this.$header = this.$el.find('>thead')
       if (!this.$header.length) {
         this.$header = $(`<thead class="${this.options.theadClasses}"></thead>`).appendTo(this.$el)
-      }
-      else{
-        this.$header.addClass(this.options.theadClasses);
+      } else if (this.options.theadClasses) {
+        this.$header.addClass(this.options.theadClasses)
       }
       this.$header.find('tr').each((i, el) => {
         const column = []