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