00040-layui When the table is cleared and searched, the last search parameters are not retained

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)
            });
        });

The first parameter of $.extend: is the search field, all need to be set to null

Guess you like

Origin blog.51cto.com/14816966/2535671