之前已经介绍过Layui数据表格的方法渲染和重载,接下来就是数据表格的自动渲染和重载。
Layui在官网也给出了示例,下面是我自己写的例子:
<div>
<span style="padding-left: 40px">
<input type="text" id="companys" style="width: 200px;height: 29px" class="input-style"
placeholder="搜索公司名称" autocomplete="off">
<button class="layui-btn layui-btn-sm" onclick="searchCompany()">搜索</button>
</span>
</div>
<table class="layui-table"
lay-data="{width: 1190, height:550, url:'/meetinglicense/webController/getInfo', page:true, id:'idTest'}"
lay-filter="demo">
<thead>
<tr>
<th lay-data="{field:'id', width:90,align:'center