修改房间布局错误的bug

This commit is contained in:
ival 2019-11-12 14:56:53 +08:00
parent 0b47562cca
commit ff6c1c67c4
3 changed files with 4 additions and 2 deletions

View File

@ -135,6 +135,7 @@ export default {
height: 30px;
line-height: 30px;
padding-left: 10px;
display: flow-root;
}
.delete {

View File

@ -145,6 +145,7 @@ export default {
height: 30px;
line-height: 30px;
padding-left: 10px;
display: flow-root;
&:hover {
background: #D6E0F2;

View File

@ -164,7 +164,7 @@ export default {
if (user.userRole) {
if (index >= 0) {
this.checkUserState(user, this.members[index]);
this.members.splice(index, 1, Object.assign(this.members[index], this.transformUser(user)));
this.members.splice(index, 1, this.transformUser(user));
} else {
this.checkUserState(user, null);
this.members.push(this.transformUser(user));
@ -211,7 +211,7 @@ export default {
this.jumpOutRoom();
}
} else if (old.userRole) {
if (!user.inRoom) {
if (old.inRoom && !user.inRoom) {
this.$store.dispatch('socket/setChatContent', {...message, roomTip: `${user.nickName}离线`});
if (this.userId == user.id) {
this.jumpOutRoom();