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">
|
<div class="group-info-user">
|
||||||
<ul>
|
<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/>
|
<UserAvatar :userid="item.userid" :size="32" showName tooltipDisabled/>
|
||||||
<div v-if="item.userid === dialogData.owner_id" class="user-tag">{{ $L("群主") }}</div>
|
<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)"/>
|
<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,
|
addShow: false,
|
||||||
addData: {},
|
addData: {},
|
||||||
addLoad: 0,
|
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>
|
</script>
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
<div class="respond-user">
|
<div class="respond-user">
|
||||||
<ul>
|
<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/>
|
<UserAvatar :userid="userid" :size="32" showName tooltipDisabled/>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</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>
|
</script>
|
||||||
|
|||||||
@ -308,7 +308,7 @@
|
|||||||
v-model="groupInfoShow"
|
v-model="groupInfoShow"
|
||||||
placement="right"
|
placement="right"
|
||||||
:size="400">
|
:size="400">
|
||||||
<DialogGroupInfo v-if="groupInfoShow" :dialogId="dialogId"/>
|
<DialogGroupInfo v-if="groupInfoShow" :dialogId="dialogId" @on-close="groupInfoShow=false"/>
|
||||||
</DrawerOverlay>
|
</DrawerOverlay>
|
||||||
|
|
||||||
<!--回复列表-->
|
<!--回复列表-->
|
||||||
@ -331,7 +331,7 @@
|
|||||||
v-model="respondShow"
|
v-model="respondShow"
|
||||||
placement="right"
|
placement="right"
|
||||||
:size="400">
|
:size="400">
|
||||||
<DialogRespond v-if="respondShow" :respond-data="respondData"/>
|
<DialogRespond v-if="respondShow" :respond-data="respondData" @on-close="respondShow=false"/>
|
||||||
</DrawerOverlay>
|
</DrawerOverlay>
|
||||||
|
|
||||||
<!--待办完成-->
|
<!--待办完成-->
|
||||||
|
|||||||
@ -49,17 +49,19 @@
|
|||||||
.group-info-user {
|
.group-info-user {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
margin-top: 16px;
|
margin-top: 12px;
|
||||||
padding: 0 24px;
|
padding: 0 12px;
|
||||||
|
|
||||||
> ul {
|
> ul {
|
||||||
> li {
|
> li {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
list-style: none;
|
list-style: none;
|
||||||
padding-bottom: 16px;
|
padding: 12px;
|
||||||
|
border-radius: 6px;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
|
background-color: rgba($primary-desc-color, 0.1);
|
||||||
.user-exit {
|
.user-exit {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
transform: translateX(0);
|
transform: translateX(0);
|
||||||
@ -67,6 +69,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
&.no {
|
&.no {
|
||||||
|
&:hover {
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
color: #999;
|
color: #999;
|
||||||
.common-loading {
|
.common-loading {
|
||||||
|
|||||||
@ -28,14 +28,19 @@
|
|||||||
.respond-user {
|
.respond-user {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
padding: 16px;
|
padding: 6px;
|
||||||
|
|
||||||
> ul {
|
> ul {
|
||||||
> li {
|
> li {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
list-style: none;
|
list-style: none;
|
||||||
padding-bottom: 16px;
|
padding: 12px;
|
||||||
|
border-radius: 6px;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background-color: rgba($primary-desc-color, 0.1);
|
||||||
|
}
|
||||||
|
|
||||||
.common-avatar {
|
.common-avatar {
|
||||||
width: 0;
|
width: 0;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user