浏览代码

Merge pull request #4328 from wenzhixin/fix/4318

Copy the dir attribute
Dustin Utecht 6 年之前
父节点
当前提交
384c02344f
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      src/extensions/print/bootstrap-table-print.js

+ 2 - 1
src/extensions/print/bootstrap-table-print.js

@@ -107,7 +107,8 @@ $.BootstrapTable = class extends $.BootstrapTable {
     }
 
     const buildTable = (data, columnsArray) => {
-      const html = ['<table><thead>']
+      const dir = this.$el.attr('dir') || 'ltr'
+      const html = [`<table dir="${dir}"><thead>`]
 
       for (const columns of columnsArray) {
         html.push('<tr>')