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标签



    
    
    
    
  • 相关阅读:
    C#动态显示时间
    死锁问题
    TCP_NODELAY算法使用事项
    二叉搜索树的后序遍历
    从上到下打印二叉树
    栈的压入、弹出序列
    包含min函数的栈
    顺时针打印矩阵
    树的子结构
    合并两个排序链表
  • 原文地址:https://www.cnblogs.com/cn-jag/p/6000221.html
Copyright © 2011-2022 走看看