Ver Fonte

参数列表样式

喻文俊 há 3 anos atrás
pai
commit
5555b7c100

+ 13 - 7
src/main/resources/static/css/encyclopedia/detail.css

@@ -22,13 +22,19 @@ img{cursor: pointer;}
 .article .section.description .content .content-left .alias{color:#93979f;margin-left:40px}
 .article .section.description .content .cover{width:120px;height:120px;border:1px dashed #93979f;-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden}
 .article .section.description .content .cover img{width:120px;height:120px}
-.article .section.params .tr{width:100%;text-align:center;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;border-left:1px solid #e3e6eb;flex-wrap: wrap;}
-.article .section.params .tr:first-child{border-top:1px solid;border-left:1px solid;border-color:#e3e6eb}
-.article .section.params .tr .group{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;-webkit-box-align:center;-ms-flex-align:center;align-items:center;width:50%}
-.article .section.params .tr .th,.article .section.params .tr .td{line-height:40px;font-size:14px;height:40px;border-right:1px solid;border-bottom:1px solid;border-color:#e3e6eb;-webkit-box-sizing:border-box;box-sizing:border-box}
-.article .section.params .tr .th a,.article .section.params .tr .td a{color:#e15616}
-.article .section.params .tr .th{background:#f4f5f8;width: 30%;}
-.article .section.params .tr .td{background:#ffffff;width: 70%; overflow: hidden;text-overflow: ellipsis;white-space: nowrap;}
+/*.article .section.params .tr{width:100%;text-align:center;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;border-left:1px solid #e3e6eb;flex-wrap: wrap;}*/
+/*.article .section.params .tr:first-child{border-top:1px solid;border-left:1px solid;border-color:#e3e6eb}*/
+/*.article .section.params .tr .group{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;-webkit-box-align:center;-ms-flex-align:center;align-items:center;width:50%}*/
+/*.article .section.params .tr .th,.article .section.params .tr .td{line-height:40px;font-size:14px;height:40px;border-right:1px solid;border-bottom:1px solid;border-color:#e3e6eb;-webkit-box-sizing:border-box;box-sizing:border-box}*/
+/*.article .section.params .tr .th a,.article .section.params .tr .td a{color:#e15616}*/
+/*.article .section.params .tr .th{background:#f4f5f8;width: 30%;}*/
+/*.article .section.params .tr .td{background:#ffffff;width: 70%; overflow: hidden;text-overflow: ellipsis;white-space: nowrap;}*/
+.article .section.params .content{width:100%;font-size:14px;border-collapse:unset;border-spacing:unset}
+.article .section.params .content tr td{padding:8px;line-height:1.6;border-top:1px solid;border-left:1px solid;border-color:#e3e6eb !important}
+.article .section.params .content tr td:last-child{border-right:1px solid}
+.article .section.params .content tr:last-child td{border-bottom:1px solid}
+.article .section.params .content tr .th{width:18%;background:#f4f5f8}
+
 .article .section.approve .content .name{font-size:14px;line-height:24px}
 .article .section.approve .content a{color:#e15616}
 .article .section.approve .content .img-list{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;-webkit-box-align:center;-ms-flex-align:center;align-items:center}

+ 19 - 0
src/main/resources/static/js/base.js

@@ -390,6 +390,25 @@ $(function(){
                 window.location.href = '/equipment/list.html?keyword=' + encodeURIComponent(keyword);
             }
         } else{
+            if( keyword === '' ){
+                $.confirm({
+                    useBootstrap: false,
+                    boxWidth: (isPC?'300px':'70%'),
+                    title:'提示',
+                    content:'请至少输入文章关键字!',
+                    closeIcon: true,
+                    animation: 'opacity',
+                    closeAnimation: 'opacity',
+                    animateFromElement: false,
+                    buttons: {
+                        close: {
+                            text: '确定',
+                            btnClass: 'btn-confirm'
+                        }
+                    }
+                });
+                return;
+            }
             // 文章
             window.location.href = '/info/search-1.html?keyword=' + encodeURIComponent(keyword);
         }

+ 16 - 8
src/main/resources/templates/encyclopedia/product-detail.html

@@ -44,14 +44,22 @@
             <h2>产品参数</h2>
             <div class="line"></div>
         </div>
-        <div class="content">
-            <div class="tr">
-                <div class="group" th:each="params: *{paramList}">
-                    <div class="th" th:text="${params.name}"></div>
-                    <div class="td" th:text="${params.content}"></div>
-                </div>
-            </div>
-        </div>
+        <table class="content">
+            <tr th:each="params: *{paramList}">
+                <td class="th" th:text="${params[0].name}"></td>
+                <td class="td" th:text="${params[0].content}"></td>
+                <td class="th" th:text="${params[1].name}"></td>
+                <td class="td" th:text="${params[1].content}"></td>
+            </tr>
+        </table>
+<!--        <div class="content">-->
+<!--            <div class="tr">-->
+<!--                <div class="group" th:each="params: *{paramList}">-->
+<!--                    <div class="th" th:text="${params.name}"></div>-->
+<!--                    <div class="td" th:text="${params.content}"></div>-->
+<!--                </div>-->
+<!--            </div>-->
+<!--        </div>-->
     </section>
     <!-- 产品优点 -->
     <section class="section" th:if="*{advantage != ''}">