页面代码
div中 class="layui-form" 和 lay-filter="selFilter" 必需加上
<div class="layui-col-xs6" >
<label class="layui-form-label">有效证件</label>
<div class="layui-input-block layui-form" lay-filter="selFilter">
<select id="reaCredential" name="reaCredential">
<option value="1">学生证</option>
<option value="2">身份证</option>
<option value="3">军人证</option>
<option value="4">老年证</option>
</select>
</div>
</div>
ajax回调函数中的代码
//下拉框赋值
$("#reaCredential").val(data[0].reaCredential);
//渲染
form.render('select','selFilter');