Gop*_*osa 2 twitter-bootstrap bootstrap-table
我使用 bootstrap-table 从数据库中填充数据,但在如何重置表(包括“排序”功能及其图标)方面遇到了问题。我到目前为止使用过:
$('#table').bootstrapTable('resetView');
$('#table').bootstrapTable('refresh');
Run Code Online (Sandbox Code Playgroud)
在http://bootstrap-table.wenzhixin.net.cn/documentation/ 上,但它们都不起作用。我有一个重置按钮,但它不起作用。
$('#resetBtn').on('click', function() {
});
Run Code Online (Sandbox Code Playgroud)
您可以销毁表并重新构建它,尝试使用:
$('#resetBtn').on('click', function() {
$('#table').bootstrapTable('destroy'); //Destroy bootstrap table
$('#table').bootstrapTable(); //Rebuild bootstrap table
//You can do it in one line
//$('#table').bootstrapTable('destroy').bootstrapTable();
});
Run Code Online (Sandbox Code Playgroud)
希望这可以帮助。
| 归档时间: |
|
| 查看次数: |
6080 次 |
| 最近记录: |