wangting
2023-07-28 02a343d4fe06d7a7f6afd32b92318b3c569af498
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<template>
  <el-popover placement="bottom"
              width="350"
              trigger="click">
 
    <el-tabs v-model="activeName">
      <!--<el-tab-pane :label="'邮件('+emailData.length+')'"
                   name="first"></el-tab-pane>-->
      <el-tab-pane :label="'消息('+noticeData.length+')'"
                   name="second"></el-tab-pane>
    </el-tabs>
    <el-scrollbar style="height:300px">
      <avue-notice :data="noticeData"
                   :option="option"
                   @page-change="pageChange"></avue-notice>
    </el-scrollbar>
    <div slot="reference">
      <el-badge is-dot>
        <i class="el-icon-bell"></i>
      </el-badge>
    </div>
  </el-popover>
</template>
 
<script>
export default {
  name: "top-notice",
  data () {
    return {
      activeName: 'second',
      option: {
        props: {
          img: 'img',
          title: 'title',
          subtitle: 'subtitle',
          tag: 'tag',
          status: 'status'
        },
      },
      emailData:[],
      noticeData: [{
        img: '/img/bg/vip1.png',
        title: '史蒂夫·乔布斯 关注了你',
        subtitle: '05-08 15:08',
        tag: '已经开始',
        status: 0
      }, {
        img: '/img/bg/vip2.png',
        title: '斯蒂夫·沃兹尼亚克 关注了你',
        subtitle: '05-08 15:08',
        tag: '未开始',
        status: 1
      }, {
        img: '/img/bg/vip3.png',
        title: '蒂姆·库克 关注了你',
        subtitle: '05-08 15:08',
        status: 3,
        tag: '有错误'
      }, {
        img: '/img/bg/vip4.png',
        title: '比尔·费尔南德斯 关注了你',
        subtitle: '05-08 15:08',
        status: 4,
        tag: '已完成'
      }]
    }
  },
  created () {
 
  },
  methods: {
    pageChange (page, done) {
      setTimeout(() => {
        this.$message.success('页码' + page)
        this.noticeData = this.noticeData.concat(list);
        done();
      }, 1000)
 
    },
  }
};
</script>
 
<style lang="scss" scoped>
</style>