mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-12 11:19:56 +00:00
feat: 在用户详情组件中添加创建群组按钮功能
This commit is contained in:
parent
b4cbfd2ae9
commit
c92b9bf0fb
@ -53,6 +53,11 @@
|
||||
@click="onOpenDialog"
|
||||
>{{ $L("开始聊天") }}</Button
|
||||
>
|
||||
<Button
|
||||
icon="md-people"
|
||||
@click="onCreateGroup"
|
||||
>{{ $L("创建群组") }}</Button
|
||||
>
|
||||
</div>
|
||||
|
||||
<div class="profile-bio">
|
||||
@ -251,6 +256,15 @@ export default {
|
||||
});
|
||||
},
|
||||
|
||||
onCreateGroup() {
|
||||
const userids = [this.$store.state.userId];
|
||||
if (this.userData.userid && this.$store.state.userId != this.userData.userid) {
|
||||
userids.push(this.userData.userid);
|
||||
}
|
||||
emitter.emit('createGroup', userids);
|
||||
this.onHide();
|
||||
},
|
||||
|
||||
ensureTagDefaults() {
|
||||
if (!Array.isArray(this.userData.personal_tags)) {
|
||||
this.$set(this.userData, "personal_tags", []);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user