From 727f495e6e3ab11cda4a3467b29bb88984a01319 Mon Sep 17 00:00:00 2001 From: augushong Date: Thu, 26 Mar 2020 21:11:06 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=AF=E6=8C=81table=E8=BD=AC=E5=8D=A1?= =?UTF-8?q?=E7=89=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- view/admin/common/_require.html | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/view/admin/common/_require.html b/view/admin/common/_require.html index d534532..0eeb086 100644 --- a/view/admin/common/_require.html +++ b/view/admin/common/_require.html @@ -19,14 +19,14 @@ } .table-card-box{ - - + margin-top: 15px; + background-color: #eee; + padding: 15px 5px; } .table-card-item{ - background-color: #eee; - margin-bottom: 2px; - margin-top: 3px; + + margin-top: 5px; } .table-card-item img{ @@ -35,12 +35,13 @@ } .table-card-item .item-title{ - background-color: #666; - color: #fff; padding: 5px; + font-size: 16px; } .table-card-item .item-value{ padding: 5px; + margin: 5px; + background-color: #fff; } @@ -123,7 +124,13 @@ $(trItem).find('td').each(function (index, ele) { var itemItem = $('.tpl .table-card-item').clone() $(itemItem).find('.item-title').text($('.layui-table thead th').eq(index).text()) - $(ele).children().clone().appendTo($(itemItem).find('.item-value')) + + if($(ele).children().length == 0){ + $(itemItem).find('.item-value').html($(ele).html()) + }else{ + + $(ele).children().clone().appendTo($(itemItem).find('.item-value')) + } $(itemItem).appendTo(boxItem) })