thymeleaf 小记

关于thymeleaf th:replace th:include th:insert 的区别code

  • th:insert   :保留本身的主标签,保留th:fragment的主标签。rem

  • th:replace :不要本身的主标签,保留th:fragment的主标签。fragment

  • th:include :保留本身的主标签,不要th:fragment的主标签。(官方3.0后不推荐)thymeleaf

 

  • th:remove的值以下:标签

      1.all:删除包含标签和全部的孩子。co

      2.body:不包含标记删除,但删除其全部的孩子。tag

      3.tag:包含标记的删除,但不删除它的孩子。

      4.all-but-first:删除全部包含标签的孩子,除了第一个。

      5.none:什么也不作。这个值是有用的动态评估。

相关文章
相关标签/搜索