明梦爽
2021-11-05 711d098689b220944d7f7f023daa5c0255605367
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<template>
  <div>
    <el-row type="flex" justify="space-between" class="underline">
      <span>学院动态</span>
      <span @click="goMore('学院动态')">更多<i class="el-icon-d-arrow-right"></i> </span>
    </el-row>
    <div>
      <ul>
        <li :key="index" v-for="(item, index) in schoolList">
          <!-- <a href="item.path"> {{ item.title }} </a> -->
          <!-- <router-link :to="{name:'schoolMessage',params:{id:item.id}}" >{{ item.title }} </router-link> -->
          <div @click="toSchoolMsg(item.title)"> {{ item.title }} </div>
        </li>
      </ul>
    </div>
  </div>
</template>
<script>
export default {
  name: 'school',
  data() {
    return {
      schoolList: [
        { id: '1',title: '学校状态1' },
        { id: '2',title: '学校状态2' },
        { id: '3',title: '学校状态3' },
        { id: '4',title: '学校状态4' },
        { id: '5',title: '学校状态5' },
        { id: '6',title: '学校状态6' }
      ]
    }
  },
  methods:{
    goMore(val){
      this.$router.push({
        path:'moreMessage',
        query:{
          type:val,
        }
      })
    },
    toSchoolMsg(t) {
      this.$router.push({
        path: 'schoolMessage',
        query: {
          title:t
        }
      })
    }
  }
}
</script>
<style lang="less" scoped>
.underline {
  border-bottom: 1px solid rgb(0, 110, 215);
}
ul {
  padding-left: 0;
}
li {
  list-style: none;
  height: 60px;
  // background-color: salmon;
}
a {
  text-decoration: none;
}
</style>