guhongwei 5 lat temu
rodzic
commit
fd9be4ed6e
1 zmienionych plików z 8 dodań i 11 usunięć
  1. 8 11
      src/views/news/listDetail.vue

+ 8 - 11
src/views/news/listDetail.vue

@@ -19,10 +19,7 @@
               </el-col>
               <el-col :span="24" class="menu">
                 <el-col class="menuList" :span="24" v-for="(item, index) in menuList" :key="index">
-                  <p
-                    @click="changeMenu(item.name, index)"
-                    :style="`background:${menuIndex == index ? menuBack : ''};color:${menuIndex == index ? menuColor : ''}`"
-                  >
+                  <p @click="changeMenu(item.name, index)" :style="`color:${menuIndex == index ? menuColor : ''}`">
                     {{ item.name }}
                   </p>
                 </el-col>
@@ -74,8 +71,7 @@ export default {
   data: function() {
     return {
       menuList: [{ name: '科技资讯' }, { name: '技术前沿' }, { name: '工作动态' }, { name: '通知通告' }],
-      menuBack: 'rgb(33,82,153,0.5)',
-      menuColor: 'rgb(255, 255, 255)',
+      menuColor: 'rgb(5,73,130)',
       menuIndex: '0',
       columnName: '',
       displays: '0',
@@ -110,22 +106,22 @@ export default {
       if (this.col_name == '科技资讯') {
         this.menuIndex = 0;
         this.columnName = this.col_name;
-        this.menuColor = 'rgb(255, 255, 255)';
+        this.menuColor = 'rgb(5,73,130)';
         this.$set(this, `displays`, this.display);
       } else if (this.col_name == '技术前沿') {
         this.menuIndex = 1;
         this.columnName = this.col_name;
-        this.menuColor = 'rgb(255, 255, 255)';
+        this.menuColor = 'rgb(5,73,130)';
         this.$set(this, `displays`, this.display);
       } else if (this.col_name == '工作动态') {
         this.menuIndex = 2;
         this.columnName = this.col_name;
-        this.menuColor = 'rgb(255, 255, 255)';
+        this.menuColor = 'rgb(5,73,130)';
         this.$set(this, `displays`, this.display);
       } else if (this.col_name == '通知通告') {
         this.menuIndex = 3;
         this.columnName = this.col_name;
-        this.menuColor = 'rgb(255, 255, 255)';
+        this.menuColor = 'rgb(5,73,130)';
         this.$set(this, `displays`, this.display);
       }
     },
@@ -133,7 +129,7 @@ export default {
     changeMenu(name, index) {
       this.menuIndex = index;
       this.columnName = name;
-      this.menuColor = 'rgb(255, 255, 255)';
+      this.menuColor = 'rgb(5,73,130)';
       this.$set(this, `displays`, 0);
     },
     // 点击详情
@@ -193,6 +189,7 @@ export default {
         border-bottom: 1px solid #ccc;
         p {
           font-size: 20px;
+          font-weight: bold;
         }
       }
     }