ソースを参照

Merge pull request #7431 from wenzhixin/feature/7415

feature/7415
文翼 1 年間 前
コミット
a01b2e8a72
1 ファイル変更3 行追加0 行削除
  1. 3 0
      src/bootstrap-table.js

+ 3 - 0
src/bootstrap-table.js

@@ -1804,11 +1804,14 @@ class BootstrapTable {
       }
     }
 
+    this.$el.removeAttr('role')
+
     // show no records
     if (!hasTr) {
       this.$body.html(`<tr class="no-records-found">${Utils.sprintf('<td colspan="%s">%s</td>',
         this.getVisibleFields().length + Utils.getDetailViewIndexOffset(this.options),
         this.options.formatNoMatches())}</tr>`)
+      this.$el.attr('role', 'presentation')
     } else if (!this.options.virtualScroll) {
       this.$body.html(trFragments)
     } else {