2020-05-14 14:36:15 +08:00
|
|
|
<template>
|
2020-07-15 16:09:15 +08:00
|
|
|
<div class="chat-box-members">
|
2020-05-14 14:36:15 +08:00
|
|
|
<div class="chat-member-title">成员列表</div>
|
2020-06-17 14:18:46 +08:00
|
|
|
<div v-if="userRole!=''" class="chat-member-list">
|
2020-05-14 14:36:15 +08:00
|
|
|
<div
|
2020-07-08 18:35:46 +08:00
|
|
|
v-for="member in currentMemberList"
|
2020-05-14 14:36:15 +08:00
|
|
|
:key="member.id"
|
2020-05-28 13:21:51 +08:00
|
|
|
:style="member.userId === userId ?'color:red':''"
|
|
|
|
class="each-chat-member"
|
|
|
|
:title="member.memberName"
|
2020-05-14 14:36:15 +08:00
|
|
|
>{{ member.memberName }}</div>
|
2020-05-28 13:21:51 +08:00
|
|
|
<!-- :class="member.online?'each-chat-member':'each-chat-member each-chat-member-outline'" -->
|
2020-05-14 14:36:15 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
name: 'ChatMemberList',
|
|
|
|
props: {
|
2020-07-08 18:35:46 +08:00
|
|
|
currentMemberList:{
|
|
|
|
type:Array,
|
|
|
|
required:true
|
2020-06-17 14:18:46 +08:00
|
|
|
},
|
|
|
|
userRole:{
|
|
|
|
type: String,
|
|
|
|
required: true
|
2020-05-14 14:36:15 +08:00
|
|
|
}
|
|
|
|
},
|
2020-05-28 13:21:51 +08:00
|
|
|
computed:{
|
|
|
|
userId() {
|
|
|
|
return this.$store.state.user.id;
|
|
|
|
}
|
|
|
|
},
|
|
|
|
watch:{
|
2020-07-17 16:35:24 +08:00
|
|
|
'$store.state.socket.acceptConversionInvite':function(val) {
|
|
|
|
this.$emit('connectMember', val);
|
|
|
|
}
|
2020-05-28 13:21:51 +08:00
|
|
|
},
|
2020-05-14 14:36:15 +08:00
|
|
|
mounted() {
|
|
|
|
},
|
|
|
|
methods:{
|
|
|
|
}
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
.memberAnimate{
|
|
|
|
transform: translateX(97%);
|
|
|
|
}
|
|
|
|
.chat-box-members{
|
|
|
|
position: absolute;
|
|
|
|
width: 140px;
|
2020-07-15 16:09:15 +08:00
|
|
|
top: 0;
|
2020-05-14 14:36:15 +08:00
|
|
|
right: 0;
|
|
|
|
height: 100%;
|
|
|
|
background: #fff;
|
2020-07-15 16:09:15 +08:00
|
|
|
border-left: 1px #dedede solid;
|
2020-07-15 18:08:49 +08:00
|
|
|
padding: 12px 2px 10px 10px;
|
2020-05-14 14:36:15 +08:00
|
|
|
font-size: 14px;
|
|
|
|
}
|
|
|
|
.chat-member-title{
|
|
|
|
}
|
|
|
|
.chat-member-list{
|
2020-07-15 18:08:49 +08:00
|
|
|
margin-top: 10px;
|
2020-05-14 14:36:15 +08:00
|
|
|
font-size: 12px;
|
2020-07-15 18:08:49 +08:00
|
|
|
margin-left: 0px;
|
2020-05-14 14:36:15 +08:00
|
|
|
height: 350px;
|
|
|
|
overflow-y: auto;
|
|
|
|
}
|
|
|
|
.each-chat-member{
|
|
|
|
margin-bottom: 10px;
|
|
|
|
width: 100%;
|
|
|
|
overflow: hidden;
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
white-space: nowrap;
|
|
|
|
cursor: pointer;
|
|
|
|
}
|
|
|
|
.each-chat-member-outline{
|
|
|
|
color: #ccc;
|
|
|
|
}
|
|
|
|
|
|
|
|
// 谷歌、safari、qq浏览器、360浏览器滚动条样式
|
|
|
|
// 定义滚动条高宽及背景 高宽分别对应横竖滚动条的尺寸
|
|
|
|
.chat-member-list::-webkit-scrollbar {
|
|
|
|
width: 6px;
|
|
|
|
height: 6px;
|
|
|
|
// height: 110px;
|
|
|
|
background-color: #FFFFFF;
|
|
|
|
}
|
|
|
|
/*定义滚动条轨道 内阴影+圆角*/
|
|
|
|
.chat-member-list::-webkit-scrollbar-track {
|
|
|
|
// box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
|
|
|
|
border-radius: 10px;
|
|
|
|
background-color: #FFFFFF;;
|
|
|
|
}
|
|
|
|
/*定义滑块 内阴影+圆角*/
|
|
|
|
.chat-member-list::-webkit-scrollbar-thumb {
|
|
|
|
border-radius: 10px;
|
|
|
|
// box-shadow: inset 0 0 6px rgba(0,0,0,.3);
|
|
|
|
background-color: #cacaca;
|
|
|
|
}
|
|
|
|
/*滑块效果*/
|
|
|
|
.chat-member-list::-webkit-scrollbar-thumb:hover {
|
|
|
|
border-radius: 5px;
|
|
|
|
// box-shadow: inset 0 0 5px rgba(0,0,0,0.2);
|
|
|
|
background: rgba(0,0,0,0.4);
|
|
|
|
}
|
|
|
|
/*IE滚动条颜色*/
|
|
|
|
html {
|
|
|
|
scrollbar-face-color:#bfbfbf;/*滚动条颜色*/
|
|
|
|
scrollbar-highlight-color:#000;
|
|
|
|
scrollbar-3dlight-color:#000;
|
|
|
|
scrollbar-darkshadow-color:#000;
|
|
|
|
scrollbar-Shadow-color:#adadad;/*滑块边色*/
|
|
|
|
scrollbar-arrow-color:rgba(0,0,0,0.4);/*箭头颜色*/
|
|
|
|
scrollbar-track-color:#eeeeee;/*背景颜色*/
|
|
|
|
}
|
|
|
|
</style>
|