layuiAdmin iframe版 网页查询搜索功能where

标签: layui插件

1.查询区:关键词

			<fieldset class="layui-elem-field layui-form">
				  <legend>查询参数</legend>
				  <div class="layui-field-box">
					  <div class="layui-form-item">
						<div class="layui-input-inline">
						  <input type="text" name="keyword" placeholder="请输入关键词" autocomplete="off" class="layui-input">
						</div>
						<div class="layui-input-inline">
							<button class="layui-btn layuiadmin-btn-useradmin" lay-submit lay-filter="LAY-user-front-search">
							  <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
							</button>
						</div>
					  </div>
				  </div>
			</fieldset>

2.列表表格区

<table class="layui-hide" id="test-table-toolbar" lay-filter="test-table-toolbar"></table>

3.js部分

    //监听搜索
    form.on('submit(LAY-user-front-search)', function(data){
      var field = data.field;
      
      //执行重载
      table.reload('test-table-toolbar', {
        where: field
      });
    });

 

版权声明:本文为haibo0668原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/haibo0668/article/details/103981581