From 9faad6424eaf2687c67f60516a254260b55d2f92 Mon Sep 17 00:00:00 2001 From: Lcp <2767378157@qq.com> Date: Sat, 7 Sep 2024 17:25:46 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E5=8A=9F=E8=83=BD=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E3=80=91=E5=95=86=E5=9F=8E=EF=BC=9A=E5=8F=91=E9=80=81=E5=95=86?= =?UTF-8?q?=E5=93=81=E6=98=BE=E7=A4=BA=E4=B8=8D=E5=85=A8=E9=97=AE=E9=A2=98?= =?UTF-8?q?=E5=92=8C=E6=89=93=E5=8C=85=E5=90=8E=E5=AE=A2=E6=9C=8D=E8=81=8A?= =?UTF-8?q?=E5=A4=A9=E8=A1=A8=E6=83=85=E7=BC=BA=E5=A4=B1=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/mall/promotion/kefu/components/KeFuMessageList.vue | 2 +- src/views/mall/promotion/kefu/components/tools/emoji.ts | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/views/mall/promotion/kefu/components/KeFuMessageList.vue b/src/views/mall/promotion/kefu/components/KeFuMessageList.vue index bd1b9ce0..92f89646 100644 --- a/src/views/mall/promotion/kefu/components/KeFuMessageList.vue +++ b/src/views/mall/promotion/kefu/components/KeFuMessageList.vue @@ -86,7 +86,7 @@ diff --git a/src/views/mall/promotion/kefu/components/tools/emoji.ts b/src/views/mall/promotion/kefu/components/tools/emoji.ts index ff7a12e7..a71b1397 100644 --- a/src/views/mall/promotion/kefu/components/tools/emoji.ts +++ b/src/views/mall/promotion/kefu/components/tools/emoji.ts @@ -66,7 +66,7 @@ export const useEmoji = () => { ) for (const path in pathList) { const imageModule: any = await pathList[path]() - emojiPathList.value.push(imageModule.default) + emojiPathList.value.push({path: path, src: imageModule.default}) } } @@ -116,7 +116,8 @@ export const useEmoji = () => { function getEmojiFileByName(name: string) { for (const emoji of emojiList) { if (emoji.name === name) { - return emojiPathList.value.find((item: string) => item.indexOf(emoji.file) > -1) + const emojiPath = emojiPathList.value.find((item: {path:string,src:string}) => item.path.indexOf(emoji.file) > -1) + return emojiPath?emojiPath.src:undefined } } return false