1, include
Including template fragments
th:fragmentth:include
用法:
在某个标签中使用th:fragment属性定义一个变量名,然后在其他模板中通过th:include,即可引入。
a.html
<div th:fragment="hello"> 定义一个fragment,并取名为"hello"
include me.!
</div>
b.html
<div th:include="a :: hello">what?</div> 从名称为a.html的模板中引入名称为"hello"的fragment
2,
<th field="price" width="50" th:attr="hidden=false" >xxxx</th>