Skip to content

Commit

Permalink
😆 修改创建群聊bug
Browse files Browse the repository at this point in the history
  • Loading branch information
wangsrGit119 committed Dec 17, 2020
1 parent 10610bd commit 8ccb524
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/components/GroupFriendsList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@
<el-table-column label="操作">
<template slot-scope="scope">
<el-button
:disabled="scope.row.type==2 ? true:false"
size="mini"
type="danger"
@click="handleAccept(scope.$index, scope.row)">邀请</el-button>
@click="handleAccept(scope.$index, scope.row)">选择</el-button>
</template>
</el-table-column>
</el-table>
Expand Down Expand Up @@ -61,7 +62,11 @@ import {loadUserFriendsPage,createGroup} from '../api/commonApi'
},
handleAccept(index, row) {
const that = this;
that.invitedUserIds.push(row.userId)
if(that.invitedUserIds.indexOf(row.userId)==-1){
that.invitedUserIds.push(row.userId)
}else {
that.$message.error("以选择该好友,请勿重复选择")
}
},
close(){
this.$emit('friendsDialogHide');
Expand Down

0 comments on commit 8ccb524

Please sign in to comment.