【发布时间】:2020-12-28 14:08:52
【问题描述】:
我不知道这段代码有什么问题:
import 'promise-polyfill/src/polyfill';
import Tabulator from 'tabulator-tables';
export default class Table {
constructor(tableElement) {
this.tableElemet = tableElement;
}
render(tableData, locale) {
const self = this;
this.table = new Tabulator(this.tableElement, {
locale: locale,
cellHozAlign: "right",
columns: this.columns(),
data: tableData,
layout: "fitColumns",
resizableColumns: false,
maxHeight: "500px",
pagination:"local",
paginationSize: 30,
paginationSizeSelector:[30, 50, 100, true],
langs: this.langs(),
downloadConfig: {
columnGroups: true
},
tableBuilt: function (){
self.modifyPagination(this.getPageMax());
}
});
}
//other functions
}
我正在使用 ES6。仅在 IE 出现错误时:
Error: Unspecified error. {
[functions]: , __proto__: { },
description: "Unspecified error.",
message: "Unspecified error.",
name: "Error",
number: -2147467259,
stack: "Error: Unspecified error.
at RowManager.prototype.adjustTableSize (tabulator.js?v32:147:7)
at Anonymous function ({myFilePath}", Symbol()_6.e5wrk79qtse: undefined }
有人有什么想法吗? 我试图显示一个空表(没有任何参数) - 也有同样的问题。 如果您需要更多信息,请告诉我。
制表器 v4.9.1
浏览器:IE 11
Windows 10
【问题讨论】:
-
你在什么样的JS项目中使用Tabulator.js?像 Angular、ReactJS 等。为了缩小问题范围,我建议您使用带有 Tabulator 4.9.1 的简单 HTML 页面创建一个示例,看看它是否适用于 IE 11。如果相同的代码用于 IE 11,那么我建议您尝试使用最新版本的 Tabulator.js 进行测试。如果有一些与 Tabulator.js 相关的问题,它可能会帮助您修复错误
标签: javascript internet-explorer internet-explorer-11 tabulator