简体   繁体   English

Bootstrap表导出和刷新

[英]Bootstrap Table Export and Refresh

I am trying to implement the table refresh and export as shown as the first example here: http://wenzhixin.net.cn/p/bootstrap-table/docs/extensions.html but it seems like my codes are not working. 我正在尝试实现表刷新和导出,如此处的第一个示例所示: http : //wenzhixin.net.cn/p/bootstrap-table/docs/extensions.html,但看来我的代码无法正常工作。 The plugin I use are tableExport and bootstrap-table-export.js. 我使用的插件是tableExport和bootstrap-table-export.js。 This is my code: http://jsfiddle.net/ug0hycdg/ 这是我的代码: http : //jsfiddle.net/ug0hycdg/

Table pagination only works if I include this script: 仅当我包含以下脚本时,表分页才有效:

 $(document).ready(function () {
        $('#pageTables').dataTable();
    });

but the table should be in pagination even without this script. 但即使没有此脚本,该表也应处于分页中。

Any idea why it won't work? 知道为什么它不起作用吗?

I've added the button: 我添加了按钮:

    <button onClick ="$('#pageTables').tableExport({type:'excel',escape:'false'});"> Save </button>

you need to import the source of bootstrap-table, the jsFiddle example: jsfiddle.net/e3nk137y/147/. 您需要导入引导表的源 (jsFiddle示例):jsfiddle.net/e3nk137y/147/。

Hope to help you. 希望对您有所帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM