Skip to content

Commit f6384f2

Browse files
Updated chat list layout.
1 parent 03182ed commit f6384f2

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

src/ChatList.vue

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<template>
22
<div class="chat-list" :style="{background: colors.chatList.bg}">
3-
<table style="padding-top: 5px;" width=100%>
3+
<table>
44
<tbody>
55
<tr v-for="chat in chatList" :key="chat.id" @click="openChat(chat.id)">
6-
<td style="text-align: center;">
6+
<td class="chat-img-td">
77
<img :src="chat.imageUrl" class="chat-img" />
88
</td>
9-
<td class="chat-element" :style="{color: colors.chatList.text}">
9+
<td class="chat-name-td" :style="{color: colors.chatList.text}">
1010
{{ chat.name }}
1111
</td>
1212
<td>
@@ -51,17 +51,28 @@ export default {
5151
padding-left: 5px;
5252
padding-top: 8px;
5353
}
54+
.chat-img-td {
55+
text-align: center;
56+
width: 50px;
57+
}
5458
.chat-img {
5559
border-radius: 50%;
5660
width: 50px;
5761
margin-right: 5px;
62+
display: block;
5863
}
59-
.chat-element {
64+
.chat-name-td {
6065
font-size: 20px;
6166
vertical-align: middle;
6267
text-align: left;
6368
}
6469
.chat-badge {
6570
font-size: 17px;
6671
}
72+
table {
73+
width: 100%
74+
}
75+
tr>td {
76+
padding-top: 5px;
77+
}
6778
</style>

0 commit comments

Comments
 (0)