zoukankan      html  css  js  c++  java
  • 4.4 thymeleaf使用补充

    1. 转义字符的使用

    th:text="${#dates.format(ruleSeasonalRestrictPo.beforeDate,'yyyy-MM-dd''T''HH:mm:ss')}"

    效果:2019-06-28T10:08:32,使用转义字符可以使得时间格式里面的字符T不被当做格式字符而匹配

    2. 判断一个对象是否为空,不为空的话获取属性的值

    th:if="${ruleSeasonalRestrictPo?.tag == 2}"

     3. 动态改变style样式

    // 显示隐藏
    <button th:style="'display:'+ @{(${idEdit} ? 'none' : 'inline-block')}+''">审核通过</button>
    // 是否可用
    <input type="text" name="rMK2Content" value="" th:disabled="${isEdit}">
  • 相关阅读:
    table
    html <input>
    html基本结构
    Spark join连接
    combineByKey
    scala mkstring
    countByValue
    spark aggregate
    scala flatmap、reduceByKey、groupByKey
    生态圈安装
  • 原文地址:https://www.cnblogs.com/shiyun32/p/11101176.html
Copyright © 2011-2022 走看看