最近在使用layerui的时候发现一个问题,就是使用Layui Table,reload的时候会携带上次查询参数,百度了网上的一些做法就是
table.reload('testTable',{
where: freshData
,method: 'POST'
,page: {
}
,done: function(res, curr, count){
this.where={};
}
不过在分页的时候回出现问题,就是一些查询参数会被清空,于是改进一下
table.reload('testTable',{
where: freshData
,method: 'POST'
,page: {
}
,done: function(res, curr, count){
this.where={查询参数};
}