码迷,mamicode.com
首页 > 其他好文 > 详细

thymeleaf switch在表格中的使用,遇到的空行问题

时间:2017-07-21 01:16:35      阅读:300      评论:0      收藏:0      [点我收藏+]

标签:length   style   get   max   maxlength   case   tar   title   text   

switch在表格中的使用时 如果把<td>写在<div th:switch="${data.isShow}"> 里面导致外面出现很多空的<div><p></p></div>,从而导致界面出现空行。放在外面时,显示正常。
 
<td><div th:switch="${data.isShow}">
<p th:case="1">
<input th:id="‘targetId_‘+${data.targetId}" th:value="${data.currTarget}"
th:class="form-control" maxlength="5" style="text-align:center;" title="只能输入1到100的数字,可以有一位小数"></input>
<input th:id="‘targetId_‘+${data.targetId}+‘_hidden‘" th:value="${data.currTarget}"
type="hidden"></input>
</p>
<p th:case="0">
<p th:text="${data.currTarget}"></p>
</p>
</div>
</td>

thymeleaf switch在表格中的使用,遇到的空行问题

标签:length   style   get   max   maxlength   case   tar   title   text   

原文地址:http://www.cnblogs.com/goingforward/p/7215308.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!