|
1
2
|
<template>
<List :class="prefixCls">
|
vben
authored
|
3
|
<a-row :gutter="16">
|
Vben
authored
|
4
|
<template v-for="item in list" :key="item.title">
|
vben
authored
|
5
|
<a-col :span="6">
|
|
6
7
8
9
10
11
|
<ListItem>
<Card :hoverable="true" :class="`${prefixCls}__card`">
<img :src="demoImg" />
<div :class="`${prefixCls}__card-title`">
{{ item.title }}
</div>
|
vben
authored
|
12
13
14
|
<div :class="`${prefixCls}__card-content`">
{{ item.content }}
</div>
|
|
15
16
|
</Card>
</ListItem>
|
vben
authored
|
17
|
</a-col>
|
|
18
|
</template>
|
vben
authored
|
19
|
</a-row>
|
|
20
21
22
23
|
</List>
</template>
<script lang="ts">
import { defineComponent } from 'vue';
|
vben
authored
|
24
|
import { List, Card, Row, Col } from 'ant-design-vue';
|
|
25
26
27
28
29
30
31
32
|
import demoImg from '/@/assets/images/demo.png';
import { projectList } from './data';
export default defineComponent({
components: {
List,
ListItem: List.Item,
Card,
|
vben
authored
|
33
34
|
[Row.name]: Row,
[Col.name]: Col,
|
|
35
36
37
38
39
40
41
42
43
44
|
},
setup() {
return {
prefixCls: 'account-center-project',
list: projectList,
demoImg,
};
},
});
</script>
|
|
45
|
<style lang="less">
|
|
46
47
48
49
|
.account-center-project {
&__card {
width: 100%;
|
|
50
|
.ant-card-body {
|
vben
authored
|
51
|
padding: 0 0 24px;
|
|
52
53
54
55
|
}
img {
width: 100%;
|
|
56
|
height: 130px;
|
|
57
58
59
60
61
62
|
}
&-title {
margin: 5px 10px;
font-size: 16px;
font-weight: 500;
|
vben
authored
|
63
|
color: rgb(0 0 0 / 85%);
|
|
64
65
66
67
68
69
70
71
|
}
&-content {
margin: 5px 10px;
}
}
}
</style>
|