Ver código fonte

增加文章列表样式

root 3 anos atrás
pai
commit
03550b17c0
3 arquivos alterados com 24 adições e 6 exclusões
  1. 3 1
      src/lang/en.js
  2. 3 1
      src/lang/zh.js
  3. 18 4
      src/views/dashboard/admin/index.vue

+ 3 - 1
src/lang/en.js

@@ -200,6 +200,8 @@ export default {
     memberLevel: 'Member Level',
     payCycle: 'Current Pay Cycle',
     remainBv: 'Remain BV',
-    activeDeadline: 'Active Deadline Date'
+    activeDeadline: 'Active Deadline Date',
+    more: 'more',
+    articleNotification: 'System Notification'
   }
 }

+ 3 - 1
src/lang/zh.js

@@ -200,6 +200,8 @@ export default {
     memberLevel: '会员级别',
     payCycle: '当前业绩期',
     remainBv: '剩余PV',
-    activeDeadline: '活跃日期截止'
+    activeDeadline: '活跃日期截止',
+    more: '更多',
+    articleNotification: '系统通知'
   }
 }

+ 18 - 4
src/views/dashboard/admin/index.vue

@@ -22,14 +22,14 @@
       <el-col :xs="24" :sm="24" :lg="12" v-for="(item,key) in news" :key="key">
         <el-card class="box-card">
           <div slot="header" class="clearfix">
-            <span>{{item.CATE_NAME}}</span>
+            <span>{{$t('dashboard.articleNotification')}}</span>
             <el-button type="text" class="box-card-more">
-              <router-link :to="`/article/list/${item.ID}`">more+</router-link>
+              <router-link :to="`/article/list/${item.ID}`">{{$t('dashboard.more')}}+</router-link>
             </el-button>
           </div>
           <template v-if="item.LISTS.length>0">
-            <div v-for="(o,k) in item.LISTS" :key="k" class="text item" >
-              <router-link :to="`/article/detail/${o.ID}`" :title="o.TITLE">{{o.TITLE}}</router-link>
+            <div v-for="(o,k) in item.LISTS" :key="k" class="text item">
+              <router-link :to="`/article/detail/${o.ID}`" :title="o.TITLE">{{sub_str(o.TITLE)}}</router-link>
               <span>{{ formatDate(o.CREATED_AT) }}</span>
             </div>
           </template>
@@ -119,6 +119,9 @@ export default {
     handleSetLineChartData(type) {
       this.lineChartData = lineChartData[type]
     },
+    sub_str(str, len = 15) {
+      if (str) return str.slice(0, len)
+    },
     imgLoad () {
       let _this = this
       if (_this.$refs.bannerHeight) {
@@ -170,6 +173,17 @@ img {
   max-width:400px;
   margin: 0 auto;
 }
+.box-card .item{
+  line-height: 30px;
+}
+.box-card .item span {
+  float: right;
+  color: #999;
+  font-size: 12px;
+}
+.box-card .item:nth-of-type(odd) {
+  background: #FAFAFA;
+}
 ::v-deep .el-carousel__container {
   text-align: center !important;
 }