layui的表格重载,即在地址栏中添加赋值变更

    xiaoxiao2022-07-05  158

    layui.use([ 'table', 'laydate', 'jquery' ], function() { var table = layui.table, laydate = layui.laydate, $ = layui.jquery; var active = { reload : function() { var selectValue = $('#selectValue');//取值栏位 var time = $('#time');//取值栏位 //执行重载 table.reload('allTable', {//表格ID page : { curr : 1 //重新从第 1 页开始 }, where : { interfaceType : selectValue.val(),//取值栏位的值,上送的时候就会加上&interfaceType=val值了 sendTime: time.val()//同上 } }); } }; $('#search').on('click', function() {//这块看不懂 var type = $(this).data('type'); active[type] ? active[type].call(this) : ''; }); //这块理应是表格加载,我就不发了,即下图 })

    最新回复(0)