mirror of
https://github.com/kuaifan/dootask.git
synced 2026-01-15 19:28:11 +00:00
perf: 可以通过群成员点击打开对话
This commit is contained in:
parent
0f076b4a16
commit
4844cc1ea1
@ -18,7 +18,7 @@
|
||||
|
||||
<div class="group-info-user">
|
||||
<ul>
|
||||
<li v-for="(item, index) in userList" :key="index">
|
||||
<li v-for="(item, index) in userList" :key="index" @click="openUser(item.userid)">
|
||||
<UserAvatar :userid="item.userid" :size="32" showName tooltipDisabled/>
|
||||
<div v-if="item.userid === dialogData.owner_id" class="user-tag">{{ $L("群主") }}</div>
|
||||
<Icon v-else-if="dialogData.owner_id == userId || item.inviter == userId" class="user-exit" type="md-exit" @click="onExit(item)"/>
|
||||
@ -79,6 +79,8 @@ export default {
|
||||
addShow: false,
|
||||
addData: {},
|
||||
addLoad: 0,
|
||||
|
||||
openIng: false,
|
||||
}
|
||||
},
|
||||
|
||||
@ -260,6 +262,20 @@ export default {
|
||||
},
|
||||
});
|
||||
},
|
||||
|
||||
openUser(userid) {
|
||||
if (this.openIng) {
|
||||
return
|
||||
}
|
||||
this.openIng = true
|
||||
this.$store.dispatch("showSpinner", 600)
|
||||
this.$store.dispatch("openDialogUserid", userid).then(_ => {
|
||||
this.$emit("on-close")
|
||||
}).finally(_ => {
|
||||
this.openIng = false
|
||||
this.$store.dispatch("hiddenSpinner")
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
|
||||
<div class="respond-user">
|
||||
<ul>
|
||||
<li v-for="(userid, index) in respondData.userids" :key="index">
|
||||
<li v-for="(userid, index) in respondData.userids" :key="index" @click="openUser(userid)">
|
||||
<UserAvatar :userid="userid" :size="32" showName tooltipDisabled/>
|
||||
</li>
|
||||
</ul>
|
||||
@ -23,5 +23,27 @@ export default {
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
openIng: false,
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
openUser(userid) {
|
||||
if (this.openIng) {
|
||||
return
|
||||
}
|
||||
this.openIng = true
|
||||
this.$store.dispatch("showSpinner", 600)
|
||||
this.$store.dispatch("openDialogUserid", userid).then(_ => {
|
||||
this.$emit("on-close")
|
||||
}).finally(_ => {
|
||||
this.openIng = false
|
||||
this.$store.dispatch("hiddenSpinner")
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -308,7 +308,7 @@
|
||||
v-model="groupInfoShow"
|
||||
placement="right"
|
||||
:size="400">
|
||||
<DialogGroupInfo v-if="groupInfoShow" :dialogId="dialogId"/>
|
||||
<DialogGroupInfo v-if="groupInfoShow" :dialogId="dialogId" @on-close="groupInfoShow=false"/>
|
||||
</DrawerOverlay>
|
||||
|
||||
<!--回复列表-->
|
||||
@ -331,7 +331,7 @@
|
||||
v-model="respondShow"
|
||||
placement="right"
|
||||
:size="400">
|
||||
<DialogRespond v-if="respondShow" :respond-data="respondData"/>
|
||||
<DialogRespond v-if="respondShow" :respond-data="respondData" @on-close="respondShow=false"/>
|
||||
</DrawerOverlay>
|
||||
|
||||
<!--待办完成-->
|
||||
|
||||
@ -49,17 +49,19 @@
|
||||
.group-info-user {
|
||||
flex: 1;
|
||||
overflow: auto;
|
||||
margin-top: 16px;
|
||||
padding: 0 24px;
|
||||
margin-top: 12px;
|
||||
padding: 0 12px;
|
||||
|
||||
> ul {
|
||||
> li {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
list-style: none;
|
||||
padding-bottom: 16px;
|
||||
padding: 12px;
|
||||
border-radius: 6px;
|
||||
|
||||
&:hover {
|
||||
background-color: rgba($primary-desc-color, 0.1);
|
||||
.user-exit {
|
||||
opacity: 1;
|
||||
transform: translateX(0);
|
||||
@ -67,6 +69,9 @@
|
||||
}
|
||||
|
||||
&.no {
|
||||
&:hover {
|
||||
background-color: transparent;
|
||||
}
|
||||
justify-content: center;
|
||||
color: #999;
|
||||
.common-loading {
|
||||
|
||||
@ -28,14 +28,19 @@
|
||||
.respond-user {
|
||||
flex: 1;
|
||||
overflow: auto;
|
||||
padding: 16px;
|
||||
padding: 6px;
|
||||
|
||||
> ul {
|
||||
> li {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
list-style: none;
|
||||
padding-bottom: 16px;
|
||||
padding: 12px;
|
||||
border-radius: 6px;
|
||||
|
||||
&:hover {
|
||||
background-color: rgba($primary-desc-color, 0.1);
|
||||
}
|
||||
|
||||
.common-avatar {
|
||||
width: 0;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user