浏览代码

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