|
|
@ -1,16 +1,16 @@ |
|
|
<template> |
|
|
<template> |
|
|
<div class="friend-item" :class="active ? 'active' : ''" @contextmenu.prevent="showRightMenu($event)"> |
|
|
<div class="friend-item" :class="active ? 'active' : ''" @contextmenu.prevent="showRightMenu($event)"> |
|
|
<div class="friend-avatar"> |
|
|
<div class="friend-avatar"> |
|
|
<head-image :name="friend.nickName" |
|
|
<head-image :name="friend.nickName" :url="friend.headImage" :online="friend.online"> |
|
|
:url="friend.headImage" |
|
|
|
|
|
:online="friend.online"> |
|
|
|
|
|
</head-image> |
|
|
</head-image> |
|
|
</div> |
|
|
</div> |
|
|
<div class="friend-info"> |
|
|
<div class="friend-info"> |
|
|
<div class="friend-name">{{ friend.nickName}}</div> |
|
|
<div class="friend-name">{{ friend.nickName}}</div> |
|
|
<div class="friend-online online"> |
|
|
<div class="friend-online"> |
|
|
<span v-show="friend.onlineWeb" class="el-icon-s-platform" title="电脑端在线"></span> |
|
|
<el-image v-show="friend.onlineWeb" class="online" :src="require('@/assets/image/online_web.png')" |
|
|
<span v-show="friend.onlineApp" class="el-icon-mobile-phone" title="移动端在线"></span> |
|
|
title="电脑设备在线" /> |
|
|
|
|
|
<el-image v-show="friend.onlineApp" class="online" :src="require('@/assets/image/online_app.png')" |
|
|
|
|
|
title="移动设备在线" /> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
<right-menu v-show="menu && rightMenu.show" :pos="rightMenu.pos" :items="rightMenu.items" |
|
|
<right-menu v-show="menu && rightMenu.show" :pos="rightMenu.pos" :items="rightMenu.items" |
|
|
@ -61,10 +61,12 @@ |
|
|
this.$emit(item.key.toLowerCase(), this.msgInfo); |
|
|
this.$emit(item.key.toLowerCase(), this.msgInfo); |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
computed:{ |
|
|
|
|
|
friend(){ |
|
|
|
|
|
return this.$store.state.friendStore.friends[this.index]; |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
props: { |
|
|
props: { |
|
|
friend: { |
|
|
|
|
|
type: Object |
|
|
|
|
|
}, |
|
|
|
|
|
active: { |
|
|
active: { |
|
|
type: Boolean |
|
|
type: Boolean |
|
|
}, |
|
|
}, |
|
|
@ -75,11 +77,7 @@ |
|
|
type: Boolean, |
|
|
type: Boolean, |
|
|
default: true |
|
|
default: true |
|
|
} |
|
|
} |
|
|
}, |
|
|
|
|
|
mounted() { |
|
|
|
|
|
console.log(this.menu) |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
</script> |
|
|
</script> |
|
|
|
|
|
|
|
|
@ -94,6 +92,7 @@ |
|
|
padding-right: 5px; |
|
|
padding-right: 5px; |
|
|
background-color: #fafafa; |
|
|
background-color: #fafafa; |
|
|
white-space: nowrap; |
|
|
white-space: nowrap; |
|
|
|
|
|
cursor: pointer; |
|
|
|
|
|
|
|
|
&:hover { |
|
|
&:hover { |
|
|
background-color: #eeeeee; |
|
|
background-color: #eeeeee; |
|
|
@ -127,10 +126,12 @@ |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.friend-online { |
|
|
.friend-online { |
|
|
padding-right: 15px; |
|
|
.online { |
|
|
font-size: 16px; |
|
|
padding-right: 2px; |
|
|
font-weight: 600; |
|
|
width: 15px; |
|
|
color: #2f6dce; |
|
|
height: 15px; |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|