00040-layui 表格table 清空搜索时,不保留上一次的搜索参数

top.layui.form.on('submit(auditEgressionTodoList-refresh)', function(data){
            top.layui.$(':input').not(':button, :submit, :reset').val('').removeAttr('selected').removeAttr('checked')
            search_field = {};
            top.layui.form.render();
            table.reload('auditEgressionTodoList', {
                where: $.extend({
                    userName:null,
                    companyName:null,
                    beginTimeStart:null,
                    beginTimeEnd:null,
                    endTimeStart:null,
                    endTimeEnd:null,
                    withType:null,
                    status:null,
                    createTimeStart:null,
                    createTimeEnd:null,
                },where)
            });
        });

$.extend 的第一个参数:为搜索字段, 需要全部置为 null

猜你喜欢

转载自blog.51cto.com/14816966/2535671