Selaa lähdekoodia

整体样式调整

threethousanddream 2 kuukautta sitten
vanhempi
commit
ea6cce888d
3 muutettua tiedostoa jossa 44 lisäystä ja 0 poistoa
  1. 22 0
      pages/home/home.less
  2. 11 0
      pages/home/home.vue
  3. 11 0
      pages/home/me.vue

+ 22 - 0
pages/home/home.less

@@ -76,6 +76,7 @@
         box-sizing: border-box;
         overflow: hidden;
         border: 1px solid #f0f0f0;
+        position: relative;
         .infoImg {
           width: 100%;
           height: 90px;
@@ -107,6 +108,27 @@
             align-content: center;
           }
         }
+        .tags {
+          position: absolute;
+          left: 0;
+          width: 100%;
+          overflow: hidden;
+          padding: 0 10px;
+          top: 0;
+          text-align: right;
+          box-sizing: border-box;
+          .tag {
+            display: inline-block;
+            width: 42px;
+            height: 16px;
+            margin-left: 10px;
+            border-radius: 8px;
+            text-align: center;
+            font-size: 12px;
+            font-weight: 400;
+            color: #fff;
+          }
+        }
       }
     }
   }

+ 11 - 0
pages/home/home.vue

@@ -30,6 +30,17 @@
                   <view class="dateTime">{{ item.date }}</view>
                 </view>
               </view>
+              <view class="tags">
+                <view class="tag" v-if="item.reviewStatus === 0" style="background-color: #ff7f23">审核中</view>
+                <template v-if="item.reviewStatus === 1">
+                  <view class="tag" v-if="item.status === 1" style="background-color: #1ebe1e">已发布</view>
+                  <view class="tag" v-if="item.status === 0" style="color: #0a0a0a; background-color: #ededed">已禁用</view>
+                </template>
+                <view class="tag" v-if="item.reviewStatus === 2" style="color: #0a0a0a; background-color: #ededed">
+                  已驳回
+                </view>
+                <view class="tag" v-if="item.publicStatus" style="background-color: #eb5a10">已公开</view>
+              </view>
             </view>
           </view>
           <template v-if="!loading&&!dataList.length">

+ 11 - 0
pages/home/me.vue

@@ -30,6 +30,17 @@
                 <view class="dateTime">{{ item.date }}</view>
               </view>
             </view>
+            <view class="tags">
+              <view class="tag" v-if="item.reviewStatus === 0" style="background-color: #ff7f23">审核中</view>
+              <template v-if="item.reviewStatus === 1">
+                <view class="tag" v-if="item.status === 1" style="background-color: #1ebe1e">已发布</view>
+                <view class="tag" v-if="item.status === 0" style="color: #0a0a0a; background-color: #ededed">已禁用</view>
+              </template>
+              <view class="tag" v-if="item.reviewStatus === 2" style="color: #0a0a0a; background-color: #ededed">
+                已驳回
+              </view>
+              <view class="tag" v-if="item.publicStatus" style="background-color: #eb5a10">已公开</view>
+            </view>
           </view>
         </view>
         <template v-if="!loading&&!dataList.length">