若依多选框
<div class="radio-box" th:each="dict : ${@dict.getType('quanxian')}"><labelth:for="${'permissions_' + dict.dictCode}" ><input name="permissions" type="checkbox" th:value="${dict.dictVa
·
<div class="radio-box" th:each="dict : ${@dict.getType('quanxian')}">
<label th:for="${'permissions_' + dict.dictCode}" >
<input name="permissions" type="checkbox" th:value="${dict.dictValue}" th:text="${dict.dictLabel}">
</label>
<!-- 放外面 否则会多次添加-->
<input th:value="*{permissions}" id="quanxian" type="hidden">//回显用添加页不用
</div>
$("[name='permissions']").each(function(){
const that=$(this)
if($("#quanxian").val().indexOf(that.val())!=-1&&that.attr("checked")!=1)
that.attr("checked",1)
})
显示页删字段字典
更多推荐
已为社区贡献1条内容
所有评论(0)