friends.vue
3.11 KB
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
<template>
<v-layout column justify-center align-center id="Friends">
<v-flex>
<div id="SearchBlock">
<input v-model="search" type="search" id="searchInput" :class="!search ? 'empty' : ''" placeholder="搜索 search"/>
</div>
<h3 id="FriendTitle">全部好友({{count}})</h3>
<v-card id="FriendList" flat >
<v-list class="list">
<v-list-tile class="ListItem" v-for="(item, index) in friendList" :key="index">
<v-list-tile-content class="ListItemAvatar">
<img v-if="item.avatar" :src="item.avatar" alt="" />
<i v-if="!item.avatar" class="material-icons icon iconfont icon-face"></i>
<span>{{item.name}}</span>
</v-list-tile-content>
</v-list-tile>
</v-list>
</v-card>
</v-flex>
</v-layout>
</template>
<script>
export default {
data:() => ({
search: '',
count: 3,
friendList: [{
avatar: '/netiou/avatar.png',
name: '杨洋',
},{
avatar: '',
name: '杨洋',
},{
avatar: '/netiou/avatar.png',
name: '杨洋',
}]
})
}
</script>
<style lang="scss" scoped>
#Friends {
#SearchBlock {
width: 100vw;
padding: 1rem 0.7rem;
#searchInput {
background-color: $menu-grey;
border: 1px solid #979797;
border-radius: 0.5rem;
width: 100%;
height: 2rem;
text-align: center;
outline: none;
color: $light-gold;
&.empty {
font-family: 'Material Icons';
}
}
::-moz-placeholder { color: $light-gold; line-height: 2rem;}
::-webkit-input-placeholder { color:$light-gold; line-height: 2rem; }
:-ms-input-placeholder { color:$light-gold; line-height: 2rem; }
}
#FriendTitle {
display: block;
font-size: 1.1rem;
width: calc(100vw - 1rem);
color: $light-gold;
border-left: 0.15rem solid $light-gold;
padding-left: 0.75rem;
margin-left: 1rem;
margin-bottom: 1.7rem;
}
#FriendList {
width: 100vw;
.list {
background-color: $toolbar-grey;
padding: 0 0.8rem;
.ListItem {
height: 3rem;
&:nth-child(1) {
/deep/ .list__tile {
border-top: none;
}
}
/deep/ .list__tile {
height: 3rem;
color: $light-gold;
padding: 0;
border-top: 0.1rem solid #586C80;
}
.ListItemAvatar {
flex-direction: row;
height: 3rem;
align-items: center;
justify-content: flex-start;
span {
height: 3rem;
font-size: 1.1rem;
font-weight: bold;
line-height: 3rem;
margin-left: 1.2rem;
}
img {
height: 80%;
display: block
}
i {
color: $light-gold;
display: block;
width: 2.4rem;
text-align: center;
}
}
}
}
}
}
</style>