• thymeleafDemo


    <p th:text="${#strings.concat(accountFinishInfoVo.firstDepartmentName+' - '+accountFinishInfoVo.departmentName)}">
    儿科 - 小儿骨科
    </p>
    strings.concat函数:字符串拼接
    <img th:src="${#strings.isEmpty(accountFinishInfoVo.profilePicLarge)} ? 'http://fimg.xx.com/images/xx/xx-user-default.png' : ${accountFinishInfoVo.profilePicLarge}"
    width="60" height="60" alt="" title=""/>
    strings.isEmpty:字符串判空
     
    <a th:href="@{'/user/diagnose/manuscript/go'(mid=${userVo.mid},userId=${userVo.id})}" >个人信息</a>跳转
     
    <div th:each="data:${pager.data}" th:remove="tag">
    迭代
    <div th:switch="${data.itemType}" th:remove="tag">
    <div th:case="1" th:remove="tag">
    <div th:substituteby="/daily/bp_common::bp_common(${data})"></div>
    </div>
    <div th:case="2" th:remove="tag">
    <div th:substituteby="/daily/me_common::me_common(${data})"></div>
    </div>
    </div>
    th:switch判断
    <div th:substituteby="/daily/me_common::me_common(${data})"></div>
    th:substituteby="/daily/me_common::me_common(${data})"
    组件引用 对应下面代码的
    th:fragment="me_common(data)"
    <html th:remove="tag" xmlns:th="http://www.thymeleaf.org">
      <div th:fragment="me_common(data)" th:remove="tag">
      </div>
    </html>
    <p class="sub-title" th:if="${task==null and userVo.staffId==staffInfo.id  or userVo.continueWrite==true}">添加方式:
        <small th:text="${data.addWayStr}">手动添加</small>
    </p>
    if标签 (and与 or或),条件不成立,不显示P标签



    
    
    
    
  • 相关阅读:
    606. Construct String from Binary Tree
    696. Count Binary Substrings
    POJ 3255 Roadblocks (次短路)
    POJ 2823 Sliding Window (单调队列)
    POJ 1704 Georgia and Bob (博弈)
    UVa 1663 Purifying Machine (二分匹配)
    UVa 10801 Lift Hopping (Dijkstra)
    POJ 3281 Dining (网络流之最大流)
    UVa 11100 The Trip, 2007 (题意+贪心)
    UVaLive 4254 Processor (二分+优先队列)
  • 原文地址:https://www.cnblogs.com/cn-jag/p/6000221.html
Copyright © 2020-2023  润新知