layui表刷新方法

<div class="reload"><a href="###" onclick="reloadTable()"></a></div> 
<table id="dataProject" class="layui-table" lay-filter="test"></table>


layui.use(['table','form'], function(){    
//表刷新方法
    reloadTable = function (item) {
        $("#dataProject").empty();
        table.reload("dataProject", { //此处是上文提到的 初始化标识id
            page:{
                curr: 1
            }
        });
    };
});

猜你喜欢

转载自blog.csdn.net/Guoyu1_/article/details/89095001