zoukankan      html  css  js  c++  java
  • 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标签



    
    
    
    
  • 相关阅读:
    USACO 5.1 Starry Night
    USACO 4.4 Frame Up
    USACO 4.4 Shuttle Puzzle
    USACO 4.3 Letter Game (字典树)
    USACO 4.3 Street Race
    BZOJ 1036: [ZJOI2008]树的统计Count (树链剖分模板题)
    BZOJ 1861: [Zjoi2006]Book 书架 (splay)
    codeforces 354 D. Transferring Pyramid
    codeforces 286 E. Ladies' Shop (FFT)
    USACO 4.3 Buy Low, Buy Lower
  • 原文地址:https://www.cnblogs.com/cn-jag/p/6000221.html
Copyright © 2011-2022 走看看