mirror of
https://github.com/kuaifan/dootask.git
synced 2026-01-27 04:58:12 +00:00
no message
This commit is contained in:
parent
b522b1de05
commit
a8b798b00c
@ -2,7 +2,7 @@
|
||||
<div
|
||||
v-if="user"
|
||||
class="avatar-wrapper common-avatar"
|
||||
:class="{'avatar-pointer': clickOpenDialog}"
|
||||
:class="{'avatar-pointer': clickOpenDetail}"
|
||||
@click="onClickOpen">
|
||||
<div
|
||||
v-if="showIcon"
|
||||
@ -174,10 +174,10 @@ export default {
|
||||
},
|
||||
|
||||
onClickOpen() {
|
||||
if (this.clickOpenDialog) {
|
||||
this.openDialog()
|
||||
if (this.clickOpenDetail) {
|
||||
emitter.emit('openUser', this.userid);
|
||||
} else {
|
||||
this.$emit('open-dialog', this.userid)
|
||||
this.$emit('on-click', this.userid)
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@ -16,6 +16,10 @@ export default {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
showStateDot: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
nameText: {
|
||||
type: String,
|
||||
default: '' // showName = true 时有效,留空就显示会员昵称
|
||||
@ -28,16 +32,12 @@ export default {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
clickOpenDialog: {
|
||||
clickOpenDetail: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
userResult: {
|
||||
default: null
|
||||
},
|
||||
showStateDot: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -19,11 +19,11 @@
|
||||
:size="size"
|
||||
:showIcon="showIcon"
|
||||
:showName="showName"
|
||||
:showStateDot="showStateDot"
|
||||
:nameText="nameText"
|
||||
:borderWitdh="borderWitdh"
|
||||
:borderColor="borderColor"
|
||||
:clickOpenDialog="clickOpenDialog"
|
||||
:showStateDot="showStateDot"
|
||||
:clickOpenDetail="clickOpenDetail"
|
||||
:userResult="onUserResult"/>
|
||||
</div>
|
||||
</ETooltip>
|
||||
|
||||
@ -32,7 +32,7 @@
|
||||
<div
|
||||
class="dialog-avatar"
|
||||
@pointerdown="handleOperation">
|
||||
<UserAvatar :userid="source.userid" :size="30" @open-dialog="onOpenDialog"/>
|
||||
<UserAvatar :userid="source.userid" :size="30" click-open-detail/>
|
||||
</div>
|
||||
<DialogView
|
||||
:msg-data="source"
|
||||
@ -220,14 +220,6 @@ export default {
|
||||
})
|
||||
},
|
||||
|
||||
onOpenDialog(userid) {
|
||||
if (this.dialogData.type == 'group' || ![this.dialogData.dialog_user?.userid, this.userId].includes(userid)) {
|
||||
this.$store.dispatch("openDialogUserid", userid).catch(({msg}) => {
|
||||
$A.modalError(msg)
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
onViewReply(data) {
|
||||
this.dispatch("on-view-reply", data)
|
||||
},
|
||||
|
||||
@ -1,15 +1,15 @@
|
||||
<template>
|
||||
<div class="dialog-view" :class="viewClass" :data-id="msgData.id">
|
||||
<!--昵称-->
|
||||
<div v-if="dialogType === 'group'" class="dialog-username">
|
||||
<UserAvatar :userid="msgData.userid" :show-icon="false" :show-name="true" click-open-dialog/>
|
||||
<div v-if="dialogType === 'group'" class="dialog-username" @pointerdown="handleOperation($event, 'mention')">
|
||||
<UserAvatar :userid="msgData.userid" :show-icon="false" :show-name="true" click-open-detail/>
|
||||
</div>
|
||||
|
||||
<div
|
||||
class="dialog-head"
|
||||
:class="headClass"
|
||||
@click="handleClick"
|
||||
@pointerdown="handleOperation">
|
||||
@pointerdown="handleOperation($event, 'operateMsg')">
|
||||
<!--回复-->
|
||||
<div v-if="!hideReply && msgData.reply_id && showReplyData(msgData.msg.reply_data)" class="dialog-reply no-dark-content" :class="replyClass" @click="viewReply">
|
||||
<div class="reply-avatar">
|
||||
@ -392,9 +392,9 @@ export default {
|
||||
},
|
||||
|
||||
methods: {
|
||||
handleOperation({currentTarget}) {
|
||||
handleOperation({currentTarget}, type) {
|
||||
this.$store.commit("longpress/set", {
|
||||
type: 'operateMsg',
|
||||
type,
|
||||
data: this.msgData,
|
||||
element: currentTarget
|
||||
})
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
:userid="userData.userid"
|
||||
:size="120"
|
||||
:show-state-dot="false"
|
||||
@open-dialog="onOpenAvatar"/>
|
||||
@on-click="onOpenAvatar"/>
|
||||
<ul>
|
||||
<li>
|
||||
<h1>{{userData.nickname}}</h1>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user