Skip to content

Commit c5de135

Browse files
committed
fix: /account/center/project style
1 parent 684a19b commit c5de135

File tree

1 file changed

+57
-25
lines changed

1 file changed

+57
-25
lines changed

src/views/account/center/page/Project.vue

Lines changed: 57 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,31 @@
11
<template>
2-
<a-list :loading="loading" :data-source="data" :grid="{ gutter: 24, xxl: 3, xl: 2, lg: 2, md: 2, sm: 2, xs: 1 }">
3-
<a-list-item slot="renderItem" slot-scope="item">
4-
<a-card class="ant-pro-pages-list-projects-card" hoverable>
5-
<img slot="cover" :src="item.cover" :alt="item.title" />
6-
<a-card-meta :title="item.title">
7-
<template slot="description">
8-
<ellipsis :length="50">{{ item.description }}</ellipsis>
9-
</template>
10-
</a-card-meta>
11-
<div class="cardItemContent">
12-
<span>{{ item.updatedAt | fromNow }}</span>
13-
<div class="avatarList">
14-
<avatar-list size="mini">
15-
<avatar-list-item
16-
v-for="(member, i) in item.members"
17-
:key="`${item.id}-avatar-${i}`"
18-
:src="member.avatar"
19-
:tips="member.name"
20-
/>
21-
</avatar-list>
2+
<div class="ant-pro-pages-account-projects-cardList">
3+
<a-list :loading="loading" :data-source="data" :grid="{ gutter: 24, xxl: 3, xl: 2, lg: 2, md: 2, sm: 2, xs: 1 }">
4+
<a-list-item slot="renderItem" slot-scope="item">
5+
<a-card class="ant-pro-pages-account-projects-card" hoverable>
6+
<img slot="cover" :src="item.cover" :alt="item.title" />
7+
<a-card-meta :title="item.title">
8+
<template slot="description">
9+
<ellipsis :length="50">{{ item.description }}</ellipsis>
10+
</template>
11+
</a-card-meta>
12+
<div class="cardItemContent">
13+
<span>{{ item.updatedAt | fromNow }}</span>
14+
<div class="avatarList">
15+
<avatar-list size="mini">
16+
<avatar-list-item
17+
v-for="(member, i) in item.members"
18+
:key="`${item.id}-avatar-${i}`"
19+
:src="member.avatar"
20+
:tips="member.name"
21+
/>
22+
</avatar-list>
23+
</div>
2224
</div>
23-
</div>
24-
</a-card>
25-
</a-list-item>
26-
</a-list>
25+
</a-card>
26+
</a-list-item>
27+
</a-list>
28+
</div>
2729
</template>
2830

2931
<script>
@@ -72,6 +74,36 @@ export default {
7274
}
7375
</script>
7476

75-
<style scoped>
77+
<style lang="less" scoped>
78+
.ant-pro-pages-account-projects-cardList {
79+
margin-top: 24px;
7680
81+
/deep/ .ant-card-meta-title {
82+
margin-bottom: 4px;
83+
}
84+
85+
/deep/ .ant-card-meta-description {
86+
height: 44px;
87+
overflow: hidden;
88+
line-height: 22px;
89+
}
90+
91+
.cardItemContent {
92+
display: flex;
93+
height: 20px;
94+
margin-top: 16px;
95+
margin-bottom: -4px;
96+
line-height: 20px;
97+
98+
> span {
99+
flex: 1 1;
100+
color: rgba(0,0,0,.45);
101+
font-size: 12px;
102+
}
103+
104+
/deep/ .ant-pro-avatar-list {
105+
flex: 0 1 auto;
106+
}
107+
}
108+
}
77109
</style>

0 commit comments

Comments
 (0)