|
@@ -1,13 +1,185 @@
|
|
|
<template>
|
|
|
- <div>
|
|
|
- 通讯录
|
|
|
+ <div class="container">
|
|
|
+ <div class="content">
|
|
|
+ <div class="list-ul">
|
|
|
+ <div class="list-li" @click="router.push('invitation')">
|
|
|
+ <svg-icon class="li-img" name="yq" />
|
|
|
+ <div class="li-cont">新邀请</div>
|
|
|
+ </div>
|
|
|
+ <div class="list-li" @click="router.push('group')">
|
|
|
+ <svg-icon class="li-img" name="ql" />
|
|
|
+ <div class="li-cont no-border">群聊</div>
|
|
|
+ </div>
|
|
|
+ <!-- <div class="list-li">
|
|
|
+ <svg-icon class="li-img" name="tz" />
|
|
|
+ <div class="li-cont no-border">系统通知</div>
|
|
|
+ </div> -->
|
|
|
+ </div>
|
|
|
+ <van-index-bar>
|
|
|
+ <template v-for="(group, groupIndex) in memberGroups" :key="group.index">
|
|
|
+ <van-index-anchor :index="group.index" />
|
|
|
+ <van-cell-group inset>
|
|
|
+ <van-cell v-for="(item, index) in group.members">
|
|
|
+ <template #title>
|
|
|
+ <div class="cell-item">
|
|
|
+ <van-image
|
|
|
+ class="cell-img"
|
|
|
+ round
|
|
|
+ :src="item.avatar"
|
|
|
+ />
|
|
|
+ <div>{{ item.name }}</div>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </van-cell>
|
|
|
+ </van-cell-group>
|
|
|
+ </template>
|
|
|
+ </van-index-bar>
|
|
|
+ <div class="total">7个朋友</div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
-
|
|
|
+const router = useRouter();
|
|
|
+const memberGroups = ref([
|
|
|
+ {
|
|
|
+ index: 'A',
|
|
|
+ members: [
|
|
|
+ { id: '1', name: '安琪拉', avatar: 'https://fastly.jsdelivr.net/npm/@vant/assets/cat.jpeg' },
|
|
|
+ { id: '2', name: '艾琳', avatar: 'https://fastly.jsdelivr.net/npm/@vant/assets/cat.jpeg' },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ {
|
|
|
+ index: 'B',
|
|
|
+ members: [
|
|
|
+ { id: '3', name: '白起', avatar: 'https://fastly.jsdelivr.net/npm/@vant/assets/cat.jpeg' },
|
|
|
+ { id: '4', name: '百里守约', avatar: 'https://fastly.jsdelivr.net/npm/@vant/assets/cat.jpeg' },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ {
|
|
|
+ index: 'C',
|
|
|
+ members: [
|
|
|
+ { id: '1', name: '安琪拉', avatar: 'https://fastly.jsdelivr.net/npm/@vant/assets/cat.jpeg' },
|
|
|
+ { id: '2', name: '艾琳', avatar: 'https://fastly.jsdelivr.net/npm/@vant/assets/cat.jpeg' },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ {
|
|
|
+ index: 'D',
|
|
|
+ members: [
|
|
|
+ { id: '3', name: '白起', avatar: 'https://fastly.jsdelivr.net/npm/@vant/assets/cat.jpeg' },
|
|
|
+ { id: '4', name: '百里守约', avatar: 'https://fastly.jsdelivr.net/npm/@vant/assets/cat.jpeg' },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ {
|
|
|
+ index: 'E',
|
|
|
+ members: [
|
|
|
+ { id: '1', name: '安琪拉', avatar: 'https://fastly.jsdelivr.net/npm/@vant/assets/cat.jpeg' },
|
|
|
+ { id: '2', name: '艾琳', avatar: 'https://fastly.jsdelivr.net/npm/@vant/assets/cat.jpeg' },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ {
|
|
|
+ index: 'F',
|
|
|
+ members: [
|
|
|
+ { id: '3', name: '白起', avatar: 'https://fastly.jsdelivr.net/npm/@vant/assets/cat.jpeg' },
|
|
|
+ { id: '4', name: '百里守约', avatar: 'https://fastly.jsdelivr.net/npm/@vant/assets/cat.jpeg' },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ {
|
|
|
+ index: 'G',
|
|
|
+ members: [
|
|
|
+ { id: '3', name: '白起', avatar: 'https://fastly.jsdelivr.net/npm/@vant/assets/cat.jpeg' },
|
|
|
+ { id: '4', name: '百里守约', avatar: 'https://fastly.jsdelivr.net/npm/@vant/assets/cat.jpeg' },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+]);
|
|
|
</script>
|
|
|
|
|
|
<style lang="less" scoped>
|
|
|
+.container{
|
|
|
+ height: 100%;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+
|
|
|
+ .content{
|
|
|
+ padding: 16px;
|
|
|
+ overflow: auto;
|
|
|
+ .list-ul{
|
|
|
+ background: #fff;
|
|
|
+ border-radius: 12px;
|
|
|
+ padding: 12px 16px;
|
|
|
+ .list-li{
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ .li-img{
|
|
|
+ width: 32px;
|
|
|
+ height: 32px;
|
|
|
+ flex-shrink: 0;
|
|
|
+ margin-right: 12px;
|
|
|
+ }
|
|
|
+ .li-cont{
|
|
|
+ flex: 1;
|
|
|
+ border-bottom: 1px solid #F2F2F2;
|
|
|
+ padding-top:10px;
|
|
|
+ padding-bottom: 10px;
|
|
|
+ font-family: PingFang SC, PingFang SC;
|
|
|
+ font-weight: 500;
|
|
|
+ font-size: 15px;
|
|
|
+ color: #000000;
|
|
|
+ }
|
|
|
+ .no-border {
|
|
|
+ border-bottom: none;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ :deep(.van-cell-group--inset){
|
|
|
+ border-radius:12px !important;
|
|
|
+ margin: 0 !important;
|
|
|
+ }
|
|
|
+ :deep(.van-cell){
|
|
|
+ padding: 12px 16px !important;
|
|
|
+ }
|
|
|
+ :deep(.van-cell:after){
|
|
|
+ left: 60px;
|
|
|
+ }
|
|
|
+ :deep(.van-index-anchor--sticky){
|
|
|
+ background: #F7F8FA !important;
|
|
|
+ color: #4765DD !important;
|
|
|
+ }
|
|
|
+ :deep(.van-index-bar__index){
|
|
|
+ font-weight: 400 !important;
|
|
|
+ font-size: 10px !important;
|
|
|
+ color: #1D2129 !important;
|
|
|
+ margin-bottom: 8px !important;
|
|
|
+ }
|
|
|
+ :deep(.van-index-bar__index--active){
|
|
|
+ color: #4765DD !important;
|
|
|
+ }
|
|
|
+ .cell-item{
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ font-family: PingFang SC, PingFang SC;
|
|
|
+ font-weight: 500;
|
|
|
+ font-size: 15px;
|
|
|
+ color: #000000;
|
|
|
+ .cell-img{
|
|
|
+ width: 32px;
|
|
|
+ height: 32px;
|
|
|
+ flex-shrink: 0;
|
|
|
+ margin-right: 12px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .total{
|
|
|
+ text-align: center;
|
|
|
+ font-family: PingFang SC, PingFang SC;
|
|
|
+ font-weight: 400;
|
|
|
+ font-size: 12px;
|
|
|
+ color: #8D8D8D;
|
|
|
+ margin-top: 22px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .content::-webkit-scrollbar{
|
|
|
+ width: 0;
|
|
|
+ }
|
|
|
+}
|
|
|
|
|
|
</style>
|