做搜索功能的时候,queryBtn点击之后,通过console.log看到销毁重建都执行了,但是并不起作用。单独写一个销毁的点击事件,发现明明执行了销毁的代码,但是页面里的数据都还在。代码如下
var operateEvents = {
'click #tableEditor': function (e, value, row, index) {},
'click #tableDelete': function (e, value, row, index) {}
}
function addFunctionAlty(value,row,index,field){
return [
'编辑',
'删除'
].join("");
}
function initTable(){
//先销毁表格
$('#myTable').bootstrapTable('destroy');
//创建表格
$('#mytable').bootstrapTable({
url: "../conn/web/getmembers.php", //请求地址
method: 'GET', //请求
striped: true,
cache: false,
pagination: true,//是否分页
sortable: true,
showToggle: true,//是否显示 切换试图(table/card)按钮
showC