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
86
87
88
89
90
91
| <template>
| <a-list
| size="large"
| rowKey="id"
| :loading="loading"
| itemLayout="vertical"
| :dataSource="data"
| >
| <a-list-item :key="item.id" slot="renderItem" slot-scope="item">
| <a-list-item-meta>
| <a slot="title" href="https://vue.ant.design/">{{ item.title }}</a>
| <template slot="description">
| <span>
| <a-tag>Ant Design</a-tag>
| <a-tag>设计语言</a-tag>
| <a-tag>蚂蚁金服</a-tag>
| </span>
| </template>
| </a-list-item-meta>
| <article-list-content :description="item.description" :owner="item.owner" :avatar="item.avatar" :href="item.href" :updateAt="item.updatedAt" />
| </a-list-item>
| <div slot="footer" v-if="data.length > 0" style="text-align: center; margin-top: 16px;">
| <a-button @click="loadMore" :loading="loadingMore">加载更多</a-button>
| </div>
| </a-list>
| </template>
|
| <script>
| import { ArticleListContent } from '@/components'
|
| export default {
| name: 'Article',
| components: {
| ArticleListContent
| },
| data () {
| return {
| loading: true,
| loadingMore: false,
| data: []
| }
| },
| mounted () {
| this.getList()
| },
| methods: {
| getList () {
| this.data = [
| {
| updatedAt: '2021-05-01 12:00:00',
| title: '小诺',
| owner: '俞宝山',
| description: 'snowy是小诺团队产品',
| href: 'https://xiaonuo.vip',
| avatar: 'https://gw.alipayobjects.com/zos/rmsportal/ZiESqWwCXBRQoaPONSJe.png',
| name: '曲丽丽',
| id: 'member1'
| },
| {
| updatedAt: '2021-05-01 12:00:00',
| title: '小诺',
| owner: '徐玉祥',
| description: 'snowy是小诺团队产品',
| href: 'https://xiaonuo.vip',
| avatar: 'https://gw.alipayobjects.com/zos/rmsportal/tBOxZPlITHqwlGjsJWaF.png',
| name: '王昭君',
| id: 'member2'
| },
| {
| updatedAt: '2021-05-01 12:00:00',
| title: '小诺',
| owner: '董夏雨',
| description: 'snowy是小诺团队产品',
| href: 'https://xiaonuo.vip',
| avatar: 'https://gw.alipayobjects.com/zos/rmsportal/sBxjgqiuHMGRkIjqlQCd.png',
| name: '董娜娜',
| id: 'member3'
| }
| ]
| this.loading = false
| },
| loadMore () {
| this.loadingMore = false
| }
| }
| }
| </script>
|
| <style scoped>
|
| </style>
|
|