【发布时间】:2021-11-28 23:41:44
【问题描述】:
片段
<div th:fragment="sort (label,field)">
<label th:text="${label}"> Label
<input th:name="'sort-' + ${field}" type="radio" value="asc"/>
<input th:name="'sort-' + ${field}" type="radio" value="dsc"/>
</label>
</div>
用法
<div th:replace="fragments/form.html :: sort(label = 'Name', field = 'name')"></div>
页面上显示的内容
<label>Name</label>
【问题讨论】: