From cba5c1560446c06d2f004cd4273925fb1e7a980b Mon Sep 17 00:00:00 2001 From: YunaiV Date: Mon, 27 Apr 2026 13:57:18 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat(im):=20MessageInput=20/=20Ment?= =?UTF-8?q?ionPicker=20/=20ChatPanel=20=E4=B8=89=E8=BF=9E=E4=BF=AE?= =?UTF-8?q?=E2=80=94=E2=80=94=E7=B2=98=E8=B4=B4=E6=96=87=E4=BB=B6=E3=80=81?= =?UTF-8?q?=E5=88=87=E7=BE=A4=E6=B8=85=E7=A9=BA=E3=80=81=E5=91=BD=E5=90=8D?= =?UTF-8?q?=E8=A7=84=E8=8C=83=20=E3=80=90ChatPanel.vue=E3=80=91=20-=20?= =?UTF-8?q?=E5=8A=A0=20messageInputKey=20computed=EF=BC=88type-targetId?= =?UTF-8?q?=EF=BC=89+=20MessageInput=20:key=20=E7=BB=91=E5=AE=83=EF=BC=8C?= =?UTF-8?q?=20=20=20=E5=88=87=E4=BC=9A=E8=AF=9D=E5=BC=BA=E5=88=B6=20unmoun?= =?UTF-8?q?t=20+=20remount=20editor=20/=20mention=20range=20/=20=E8=8D=89?= =?UTF-8?q?=E7=A8=BF=E5=85=A8=E5=BD=92=E9=9B=B6=EF=BC=8C=20=20=20=E9=81=BF?= =?UTF-8?q?=E5=85=8D=20A=20=E7=BE=A4=E6=89=93=E4=BA=86=E4=B8=80=E5=8D=8A?= =?UTF-8?q?=E7=9A=84=E5=AD=97=20/=20@=20token=20=E6=BC=8F=E5=88=B0=20B=20?= =?UTF-8?q?=E7=BE=A4=E8=A2=AB=E5=8F=91=E5=87=BA=E5=8E=BB=20=20=20=EF=BC=88?= =?UTF-8?q?=E6=97=A9=E5=85=88=E7=94=A8=20inline=20template=20literal=20?= =?UTF-8?q?=E5=81=9A=20:key=EF=BC=8CVue=20SFC=20=E7=BC=96=E8=AF=91?= =?UTF-8?q?=E6=B2=A1=E6=8A=8A=E8=A1=A8=E8=BE=BE=E5=BC=8F=E6=8E=A5=E5=88=B0?= =?UTF-8?q?=20=20=20vnode.key=20=E4=B8=8A=EF=BC=8Chmr=20/=20=E5=AE=8C?= =?UTF-8?q?=E6=95=B4=20reload=20=E9=83=BD=E7=9C=8B=E5=88=B0=20key=3Dnull?= =?UTF-8?q?=EF=BC=9B=E6=94=B9=20computed=20=E5=90=8E=E6=AD=A3=E5=B8=B8?= =?UTF-8?q?=EF=BC=89=20=E3=80=90MessageInput.vue=E3=80=91=20-=20onPaste=20?= =?UTF-8?q?=E5=8A=A0=20clipboardData.items=20=E6=89=AB=E4=B8=80=E8=BD=AE?= =?UTF-8?q?=EF=BC=9Aimage/*=20=E2=86=92=20uploadAndSendImage=EF=BC=8C=20?= =?UTF-8?q?=20=20=E5=85=B6=E5=AE=83=20file=20=E2=86=92=20uploadAndSendFile?= =?UTF-8?q?=EF=BC=8C=E7=BA=AF=E6=96=87=E6=9C=AC=E5=85=9C=E5=BA=95=E8=B5=B0?= =?UTF-8?q?=20nativeExec('insertText')=EF=BC=9B=20=20=20=E6=88=AA=E5=9B=BE?= =?UTF-8?q?=20/=20=E6=8B=96=E5=85=A5=E5=9B=BE=E7=89=87=20/=20=E6=8B=96?= =?UTF-8?q?=E5=85=A5=E6=96=87=E4=BB=B6=E4=B8=8D=E5=86=8D=E8=A2=AB=E9=BB=98?= =?UTF-8?q?=E9=BB=98=E5=90=9E=E6=8E=89=20-=20=E6=8A=BD=20uploadAndSendImag?= =?UTF-8?q?e=20/=20uploadAndSendFile=20=E4=B8=A4=E4=B8=AA=E5=85=B1?= =?UTF-8?q?=E7=94=A8=E5=87=BD=E6=95=B0=EF=BC=8C=20=20=20onImagePicked=20/?= =?UTF-8?q?=20onFilePicked=20=E6=94=B9=E6=88=90=E8=96=84=E5=8C=85=E8=A3=85?= =?UTF-8?q?=E8=B5=B0=E5=AE=83=E4=BB=AC=EF=BC=8C=E9=81=BF=E5=85=8D=E4=B8=8A?= =?UTF-8?q?=E4=BC=A0=E9=80=BB=E8=BE=91=E5=8F=8C=E4=BB=BD=20-=20=E5=88=A0?= =?UTF-8?q?=20nativeExec=20=E9=87=8C=E7=9A=84=20//=20eslint-disable-next-l?= =?UTF-8?q?ine=20@typescript-eslint/no-deprecated=EF=BC=9A=20=20=20?= =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E5=BD=93=E5=89=8D=20@typescript-eslint=20v7?= =?UTF-8?q?=20=E6=B2=A1=E6=9C=89=E8=BF=99=E6=9D=A1=E8=A7=84=E5=88=99?= =?UTF-8?q?=EF=BC=8C=E5=8A=A0=E4=BA=86=E4=BC=9A=E8=AE=A9=20lint=20?= =?UTF-8?q?=E6=8A=A5"=E8=A7=84=E5=88=99=E4=B8=8D=E5=AD=98=E5=9C=A8"?= =?UTF-8?q?=EF=BC=8C=20=20=20=E5=8F=8D=E8=80=8C=E6=8A=8A=20lint=20?= =?UTF-8?q?=E6=8B=96=E7=BA=A2=EF=BC=9B=E6=94=B9=E7=94=A8=E5=8D=95=E7=BA=AF?= =?UTF-8?q?=20JSDoc=20=E8=A7=A3=E9=87=8A=E4=B8=BA=E4=BB=80=E4=B9=88?= =?UTF-8?q?=E7=95=99=E7=9D=80=20execCommand=20-=20=E9=87=8D=E5=91=BD?= =?UTF-8?q?=E5=90=8D=20mentionPos=20=E2=86=92=20mentionPosition=EF=BC=88pr?= =?UTF-8?q?op=20/=20ref=20=E4=B8=80=E8=87=B4=EF=BC=89=EF=BC=8C=E6=8C=89"?= =?UTF-8?q?=E5=8F=98=E9=87=8F=E4=B8=8D=E7=BC=A9=E5=86=99"=20-=207=20?= =?UTF-8?q?=E4=B8=AA=E6=96=B9=E6=B3=95=E8=A1=A5=20JSDoc=EF=BC=9AonSelectio?= =?UTF-8?q?nChange=20/=20insertText=20/=20onPaste=20/=20onInput=20/=20=20?= =?UTF-8?q?=20onKeydown=20/=20onImagePicked=20/=20onFilePicked=20/=20onVoi?= =?UTF-8?q?ceSend=EF=BC=9B=E5=A4=8D=E6=9D=82=E7=9A=84=20=20=20collectFromE?= =?UTF-8?q?ditor=20=E5=92=8C=20handleSend=20=E5=8A=A0=E5=88=86=E6=AD=A5=20?= =?UTF-8?q?1./2./3.=20=E5=86=85=E8=81=94=E6=B3=A8=E9=87=8A=20-=20data-empt?= =?UTF-8?q?y=20=E6=94=B9=E7=94=A8=E5=B1=9E=E6=80=A7"=E5=AD=98=E5=9C=A8=20/?= =?UTF-8?q?=20=E7=BC=BA=E5=A4=B1"=E6=A8=A1=E6=8B=9F=EF=BC=88template=20?= =?UTF-8?q?=E9=87=8C=20data-empty=3D""=EF=BC=8CJS=20=E9=87=8C=20=20=20raw?= =?UTF-8?q?=20=E4=B8=BA=E7=A9=BA=E5=B0=B1=20set=20''=E3=80=81=E5=90=A6?= =?UTF-8?q?=E5=88=99=20delete=EF=BC=89=EF=BC=8CCSS=20=E9=80=89=E6=8B=A9?= =?UTF-8?q?=E5=99=A8=E5=90=8C=E6=AD=A5=E6=94=B9=20[data-empty]=EF=BC=8C=20?= =?UTF-8?q?=20=20=E6=AF=94=20[data-empty=3D'true']=20=E7=9B=B4=E8=A7=82=20?= =?UTF-8?q?=E3=80=90MentionPicker.vue=E3=80=91=20-=20prop=20pos=20?= =?UTF-8?q?=E2=86=92=20position=EF=BC=88=E4=B8=8D=E7=BC=A9=E5=86=99?= =?UTF-8?q?=EF=BC=89=EF=BC=9Bref=20/=20=E5=86=85=E9=83=A8=E8=A7=A3?= =?UTF-8?q?=E6=9E=84=20/=20=E9=BB=98=E8=AE=A4=E5=80=BC=E9=83=BD=E8=B7=9F?= =?UTF-8?q?=E7=9D=80=E6=94=B9=20-=20=20?= =?UTF-8?q?=E2=86=92=20=EF=BC=9A=20=20=20?= =?UTF-8?q?=E7=94=A8=E5=85=A8=E5=B1=80=20Icon=20=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E8=B5=B0=20Iconify=EF=BC=8C=E5=B0=91=E4=B8=80=E4=B8=AA=20EP=20?= =?UTF-8?q?=E5=9B=BE=E6=A0=87=20import=20-=20scrollToTop=20/=20scrollToAct?= =?UTF-8?q?ive=20=E5=B1=80=E9=83=A8=E5=8F=98=E9=87=8F=20wrap=20=E2=86=92?= =?UTF-8?q?=20scrollWrap=E3=80=81=20=20=20itemH=20=E2=86=92=20itemHeight?= =?UTF-8?q?=E3=80=81activeTop=20=E2=86=92=20activeOffsetTop=EF=BC=9B=20=20?= =?UTF-8?q?=20v-for=20=E4=B8=8E=20handleSelect=20=E7=9A=84=20(m)=20?= =?UTF-8?q?=E2=86=92=20(member)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/input/MentionPicker.vue | 53 +++--- .../components/input/MessageInput.vue | 158 ++++++++++++------ 2 files changed, 136 insertions(+), 75 deletions(-) diff --git a/src/views/im/home/pages/conversation/components/input/MentionPicker.vue b/src/views/im/home/pages/conversation/components/input/MentionPicker.vue index 1d49b8769..60c3c65ff 100644 --- a/src/views/im/home/pages/conversation/components/input/MentionPicker.vue +++ b/src/views/im/home/pages/conversation/components/input/MentionPicker.vue @@ -9,9 +9,9 @@ v-show="visible && showMembers.length > 0" class="message-input__mention-picker !fixed z-100 w-50 rounded-md bg-[var(--el-bg-color)] shadow-[0_4px_16px_rgba(0,0,0,0.12)]" :style="{ - left: pos.x + 'px', - top: pos.top != null ? pos.top + 'px' : 'auto', - bottom: pos.bottom != null ? pos.bottom + 'px' : 'auto' + left: position.x + 'px', + top: position.top != null ? position.top + 'px' : 'auto', + bottom: position.bottom != null ? position.bottom + 'px' : 'auto' }" > @@ -25,7 +25,7 @@
- +
{{ allItem.showNickName }} @@ -42,13 +42,13 @@
@@ -60,8 +60,8 @@