我正在使用Bootstrap-table,我想将表数据导出到Excel文件。
我喜欢Bootstrap-Table-Export插件使用的图标,我想使用它,但是我想调用自己的导出函数以进行自定义格式。
在Bootstrap-table-export.js中,有很多键值对字符串和功能。
我感兴趣的是:
key: "exportTable",
value: function exportTable(options) {
var _this2 = this;
... code that does export....
我可以更改源以在这里调用我的代码,但是我想要一种与未来版本兼容的方式。可以更改键值对以用我自己的代码覆盖“导出”功能?
给我一个线索,即可以覆盖导出功能。是这样吗?
谢谢!
I am using Bootstrap-table and I would like to export my table data to an Excel file.
I like the icons used by the bootstrap-table-export plugin and I want to use that, but I want to call my own export function for custom formatting.
In the bootstrap-table-export.js, there are a bunch of key-value pairs of strings and functions.
The one I am interested in is:
key: "exportTable",
value: function exportTable(options) {
var _this2 = this;
... code that does export....
I can alter the source to just call my code here, but I would like a way that is compatible with future versions. Can the key-value pairs be altered to override the "exportTable" function with my own code?
The documentation at https://bootstrap-table.com/docs/extensions/export/#exporttable gives me a clue that the exportTable function can be overridden. Is this the case?
Thanks!
发布评论