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
| <template>
| <div class="card-activity">
| <Card>
| <p slot="title" class="card-title">最新事件</p>
| <div class="wrap">
| <Timeline>
| <TimelineItem v-for="(item, i) in data" :key="i" :color="item.color">
| <p class="time">{{ item.time }}</p>
| <p class="content">{{ item.event }}</p>
| </TimelineItem>
| </Timeline>
| </div>
| </Card>
| </div>
| </template>
|
| <script>
| export default {
| name: "bar",
| components: {},
| props: {},
| data() {
| return {
| data: [
| {
| time: this.format(new Date(), "yyyy-MM-dd HH:mm:ss"),
| event: "用户 user1 登录了系统",
| color: "blue"
| },
| {
| time: this.format(new Date()-3000, "yyyy-MM-dd HH:mm:ss"),
| event: "用户 admin1234 支付了订单,包含2件商品,共计¥123.12元",
| color: "red"
| },
| {
| time: this.format(new Date()-15000, "yyyy-MM-dd HH:mm:ss"),
| event: "用户 13699345246 登录了系统",
| color: "blue"
| },
| {
| time: this.format(new Date()-23000, "yyyy-MM-dd HH:mm:ss"),
| event: "用户 18823451373 提交了订单,包含1件商品,共计¥88.39元",
| color: "green"
| },
| {
| time: this.format(new Date()-30000, "yyyy-MM-dd HH:mm:ss"),
| event: "用户 请输入昵称 分享了商品 Apple Watch Series 5 黑色 蜂窝",
| color: "green"
| },
| {
| time: this.format(new Date()-50000, "yyyy-MM-dd HH:mm:ss"),
| event: "用户 请输入昵称 登录了系统",
| color: "blue"
| },
| ]
| };
| },
| methods: {
| init() {}
| },
| mounted() {
| this.init();
| }
| };
| </script>
| <style lang="less">
| .card-activity {
| .ivu-card-head {
| border-bottom: none !important;
| }
| .card-title {
| color: #67757c;
| }
| .wrap {
| overflow: auto;
| height: 368px;
| }
| }
| </style>
|
|