瀏覽代碼

空状态优化

zhouna 3 年之前
父節點
當前提交
67f20c9de1
共有 3 個文件被更改,包括 16 次插入7 次删除
  1. 9 6
      src/css/editableDetail.less
  2. 6 1
      src/html/editableDetail.html
  3. 1 0
      src/js/editableDetail.js

+ 9 - 6
src/css/editableDetail.less

@@ -1,6 +1,9 @@
 @import './reset.less';
 body{
   overflow-y: auto;
+  background: #fff;
+  border-left: 40px solid #EFF1F6;
+  border-right: 40px solid #EFF1F6;
 }
 .ellipsis{
   overflow: hidden;
@@ -18,16 +21,16 @@ body{
   height: 18px;
 }
 .tab-container{
-  background: @disColor;
-  /*height: 100%;*/
+  /*background: @disColor;
+  height: 100%;*/
   .content-box1{
     margin: 0 30px;
     padding-bottom: 90px;
-    background: #fff;
     position: relative;
     overflow-y: auto;
+    /*background: #fff;
     border-right: 10px #EFF1F6 solid;
-    border-left: 10px #EFF1F6 solid;
+    border-left: 10px #EFF1F6 solid;*/
     box-sizing: border-box;
   }
   .content-item{
@@ -204,7 +207,7 @@ body{
   margin-top: 120px;
   text-align: center;
   img{
-    width: 140px;
+    width: 240px;
   }
   p{
     margin-top: 15px;
@@ -236,7 +239,7 @@ body{
   padding: 30px 0;
   position: absolute;
   bottom: 0;
-  width: calc(100% - 100px);
+  width: calc(100% - 140px);
   margin-left: 40px;
   button{
     display: inline-block;

+ 6 - 1
src/html/editableDetail.html

@@ -11,7 +11,12 @@
     <div class="main-part clearfix">
         <div class="tab-container clearfix">
             <p id="loading">加载中,请稍候 ...</p>
-            <div class="content-box1" id="contentInfo"></div>
+            <div class="content-box1" id="contentInfo">
+                <div class="empty">
+                    <img src="../images/404.png" alt="空"/>
+                    <p>暂无信息~</p>
+                </div>
+            </div>
             <div class="oper-box"> <button id="saveBtn">保 存</button> </div>
         </div>
     </div>

+ 1 - 0
src/js/editableDetail.js

@@ -76,6 +76,7 @@ function initContent(moduleId,data){
         <p>暂无信息~</p>
     </div>`;
   }
+  $(".empty").remove();
   $.tmpl(hml,info).appendTo("#contentInfo");
   saveDataEvent();
   //console.log(obj)