From 3489b89a0bfbaffba106ad38b8622f830e8b3dea Mon Sep 17 00:00:00 2001 From: jinhhanhan <1683105490@qq.com> Date: Sat, 25 Apr 2026 14:15:03 +0800 Subject: [PATCH] =?UTF-8?q?chore=EF=BC=9A=E6=99=BA=E8=83=BD=E5=AE=A2?= =?UTF-8?q?=E6=9C=8D=E5=8A=A0=E4=BA=86=E8=A1=A8=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages_tool/ai-chat/ai-chat-message.vue | 373 ++++++++++++++++++++++++- 1 file changed, 367 insertions(+), 6 deletions(-) diff --git a/pages_tool/ai-chat/ai-chat-message.vue b/pages_tool/ai-chat/ai-chat-message.vue index 201e6c0..f432dd4 100644 --- a/pages_tool/ai-chat/ai-chat-message.vue +++ b/pages_tool/ai-chat/ai-chat-message.vue @@ -211,12 +211,17 @@ @confirm="sendMessage" @input="onInput" /> + + + @@ -261,6 +266,28 @@ + + + + + + ้€‰ๆ‹ฉ่กจๆƒ… + + + + + {{ emoji }} + + + + + @@ -411,6 +438,8 @@ export default { messageId: 0, showToolsPanel: false, enalbeVoicePanelShow: false, + showEmojiPanel: false, + emojiList: ['๐Ÿ˜€','๐Ÿ˜ƒ','๐Ÿ˜„','๐Ÿ˜','๐Ÿ˜†','๐Ÿ˜…','๐Ÿคฃ','๐Ÿ˜‚','๐Ÿ™‚','๐Ÿ™ƒ','๐Ÿ˜‰','๐Ÿ˜Š','๐Ÿ˜‡','๐Ÿฅฐ','๐Ÿ˜','๐Ÿคฉ','๐Ÿ˜˜','๐Ÿ˜—','๐Ÿ˜š','๐Ÿ˜‹','๐Ÿ˜›','๐Ÿ˜œ','๐Ÿคช','๐Ÿ˜','๐Ÿค‘','๐Ÿค—','๐Ÿคญ','๐Ÿคซ','๐Ÿค”','๐Ÿค','๐Ÿคจ','๐Ÿ˜','๐Ÿ˜‘','๐Ÿ˜ถ','๐Ÿ˜','๐Ÿ˜’','๐Ÿ™„','๐Ÿ˜ฌ','๐Ÿคฅ','๐Ÿ˜Œ','๐Ÿ˜”','๐Ÿ˜ช','๐Ÿคค','๐Ÿ˜ด','๐Ÿ˜ท','๐Ÿค’','๐Ÿค•','๐Ÿคข','๐Ÿคฎ','๐Ÿคง','๐Ÿฅต','๐Ÿฅถ','๐Ÿฅด','๐Ÿ˜ต','๐Ÿคฏ','๐Ÿค ','๐Ÿฅณ','๐Ÿ˜Ž','๐Ÿค“','๐Ÿง','๐Ÿ˜•','๐Ÿ˜Ÿ','๐Ÿ™','๐Ÿ˜ฎ','๐Ÿ˜ฏ','๐Ÿ˜ฒ','๐Ÿ˜ณ','๐Ÿฅบ','๐Ÿ˜ฆ','๐Ÿ˜ง','๐Ÿ˜จ','๐Ÿ˜ฐ','๐Ÿ˜ฅ','๐Ÿ˜ข','๐Ÿ˜ญ','๐Ÿ˜ฑ','๐Ÿ˜–','๐Ÿ˜ฃ','๐Ÿ˜ž','๐Ÿ˜“','๐Ÿ˜ฉ','๐Ÿ˜ซ','๐Ÿฅฑ','๐Ÿ˜ค','๐Ÿ˜ก','๐Ÿ˜ ','๐Ÿคฌ','๐Ÿ˜ˆ','๐Ÿ‘ฟ','๐Ÿ’€','๐Ÿ’ฉ','๐Ÿ‘ป','๐Ÿ‘ฝ','๐Ÿค–','๐ŸŽƒ','๐Ÿ˜บ','๐Ÿ˜ธ','๐Ÿ˜น','๐Ÿ˜ป','๐Ÿ˜ผ','๐Ÿ˜ฝ','๐Ÿ™€','๐Ÿ˜ฟ','๐Ÿ˜พ','๐Ÿ‘‹','๐Ÿคš','๐Ÿ–','โœ‹','๐Ÿ––','๐Ÿ‘Œ','๐Ÿค','โœŒ','๐Ÿคž','๐ŸคŸ','๐Ÿค˜','๐Ÿค™','๐Ÿ‘ˆ','๐Ÿ‘‰','๐Ÿ‘†','๐Ÿ–•','๐Ÿ‘‡','โ˜','๐Ÿ‘','๐Ÿ‘Ž','โœŠ','๐Ÿ‘Š','๐Ÿค›','๐Ÿคœ','๐Ÿ‘','๐Ÿ™Œ','๐Ÿ‘','๐Ÿคฒ','๐Ÿค','๐Ÿ™','โœ','๐Ÿ’…','๐Ÿคณ','๐Ÿ’ช','๐Ÿ’—','๐Ÿ’“','๐Ÿ’•','๐Ÿ’–','๐Ÿ’','๐Ÿ’ž','๐Ÿ’˜','๐Ÿ’Œ','๐Ÿ’Ÿ','๐Ÿ’›','๐Ÿ’™','๐Ÿ’œ','๐Ÿ–ค','๐Ÿ’”','๐Ÿ’ข','๐Ÿ’ฃ','๐Ÿ’ฅ','๐Ÿ’ซ','๐Ÿ’ฆ','๐Ÿ’จ','๐Ÿ‘','๐Ÿ‘€','๐Ÿ‘…','๐Ÿ‘„','๐Ÿ‘‚','๐Ÿ‘ƒ','๐Ÿ‘ถ','๐Ÿ‘ฆ','๐Ÿ‘ง','๐Ÿ‘จ','๐Ÿ‘ฉ','๐Ÿ‘ด','๐Ÿ‘ต','๐Ÿ‘ฑ','๐Ÿ‘ฒ','๐Ÿ‘ณ','๐Ÿ‘ด','๐Ÿ‘ต','๐Ÿ‘ถ','๐Ÿ‘ผ','๐Ÿ‘ธ','๐ŸŽ…','๐Ÿคถ','๐Ÿฆธ','๐Ÿฆน','๐Ÿง™','๐Ÿงš','๐Ÿง›','๐Ÿงœ','๐Ÿง','๐Ÿงž','๐ŸงŸ','๐Ÿฆ„','๐Ÿถ','๐Ÿฑ','๐Ÿญ','๐Ÿน','๐Ÿฐ','๐ŸฆŠ','๐Ÿป','๐Ÿผ','๐Ÿจ','๐Ÿฏ','๐Ÿฆ','๐Ÿฎ','๐Ÿท','๐Ÿธ','๐Ÿต','๐Ÿ™ˆ','๐Ÿ™‰','๐Ÿ™Š','๐Ÿ’','๐Ÿ”','๐Ÿง','๐Ÿฆ','๐Ÿค','๐Ÿฃ','๐Ÿฅ','๐Ÿฆ†','๐Ÿฆ…','๐Ÿฆ‰','๐Ÿฆ‡','๐Ÿบ','๐Ÿ—','๐Ÿด','๐Ÿฆ„','๐Ÿ','๐Ÿ›','๐Ÿฆ‹','๐ŸŒ','๐Ÿž','๐Ÿœ','๐ŸฆŸ','๐Ÿฆ—','๐Ÿ•ท','๐Ÿฆ‚','๐Ÿข','๐Ÿ','๐ŸฆŽ','๐Ÿฆ–','๐Ÿฆ•','๐Ÿ™','๐Ÿฆ‘','๐Ÿฆ','๐Ÿฆž','๐Ÿฆ€','๐Ÿก','๐Ÿ ','๐ŸŸ','๐Ÿฌ','๐Ÿณ','๐Ÿ‹','๐Ÿฆˆ','๐ŸŠ','๐Ÿ…','๐Ÿ†','๐Ÿฆ“','๐Ÿฆ','๐Ÿฆง','๐Ÿ˜','๐Ÿฆ›','๐Ÿฆ','๐Ÿช','๐Ÿซ','๐Ÿฆ’','๐Ÿฆ˜','๐Ÿƒ','๐Ÿ‚','๐Ÿ„','๐ŸŽ','๐Ÿ–','๐Ÿ','๐Ÿ‘','๐Ÿ','๐Ÿ“','๐Ÿฆƒ','๐Ÿฆš','๐Ÿฆœ','๐Ÿฆข','๐Ÿฆฉ','๐Ÿ•Š','๐Ÿ•','๐Ÿฉ','๐Ÿˆ','๐Ÿ“','๐Ÿ‡','๐Ÿ','๐Ÿ€','๐Ÿฟ','๐Ÿฆ”','๐Ÿพ','๐Ÿ‰','๐Ÿฒ'], streamingMessage: null, streamInterval: null, streamContent: '', @@ -461,6 +490,11 @@ export default { return { bottom: this.keyboardHeight > 0 ? this.keyboardHeight + 'px' : '0px' }; + }, + canSendMessage() { + const hasContent = this.inputText && this.inputText.trim() !== '' + const hasEmoji = this.containsEmoji(this.inputText) + return hasContent || hasEmoji } }, onShow() { @@ -812,13 +846,17 @@ async loadChatHistoryIfExist() { // ๅ‘้€ๆถˆๆฏ async sendMessage() { - if (!this.inputText.trim()) return + // ็กฎไฟๆœ‰ๅ†…ๅฎนๆˆ–่กจๆƒ… + const hasContent = this.inputText && this.inputText.trim() !== '' + const hasEmoji = this.containsEmoji(this.inputText) + + if (!hasContent && !hasEmoji) return const userMessage = { id: ++this.messageId, role: 'user', type: 'text', - content: this.inputText.trim(), + content: this.inputText, timestamp: Date.now() } this.shouldScrollToBottom = true @@ -846,10 +884,11 @@ async loadChatHistoryIfExist() { } // ไฝฟ็”จAIๆœๅŠก่Žทๅ–ๅ›žๅค + const enhancedMessage = this.enhanceEmojiMessage(userMessage.content) if (this.enableStreaming) { - await this.sendStreamMessage(userMessage.content) + await this.sendStreamMessage(enhancedMessage) } else { - await this.sendNormalMessage(userMessage.content) + await this.sendNormalMessage(enhancedMessage) } } catch (error) { @@ -1251,6 +1290,22 @@ async loadChatHistoryIfExist() { this.showToolsPanel = false }, + // ๅˆ‡ๆขEmoji้ขๆฟ + toggleEmojiPanel() { + this.showEmojiPanel = !this.showEmojiPanel + }, + + // ้š่—Emoji้ขๆฟ + hideEmojiPanel() { + this.showEmojiPanel = false + }, + + // ๆ’ๅ…ฅEmoji + insertEmoji(emoji) { + this.inputText += emoji + this.hideEmojiPanel() + }, + // ๆ˜พ็คบ่ฏญ้Ÿณ้ขๆฟ showVoicePanel() { this.enalbeVoicePanelShow = true @@ -1641,6 +1696,193 @@ async loadChatHistoryIfExist() { this.historyOffset = 0 // ่งฆๅ‘ๆธ…็ฉบไบ‹ไปถ this.$emit('messages-cleared') + }, + + // ๆฃ€ๆต‹ๅญ—็ฌฆไธฒไธญๆ˜ฏๅฆๅŒ…ๅซ่กจๆƒ… + containsEmoji(str) { + const emojiReg = /[\u{1f300}-\u{1f9ff}\u{1f1e0}-\u{1f1ff}\u{2600}-\u{26ff}\u{2700}-\u{27bf}\u{1f900}-\u{1f9ff}\u{1f600}-\u{1f64f}\u{1f680}-\u{1f6ff}\u{200d}\u{2640}-\u{2642}\u{2300}-\u{23ff}\u{2b50}-\u{2bff}]/gu + return emojiReg.test(str) + }, + + // ๆ นๆฎ่กจๆƒ…็”Ÿๆˆ้€‚ๅฝ“็š„ๆ็คบๆ–‡ๆœฌ๏ผŒๅธฎๅŠฉ AI ๆ›ดๅฅฝๅœฐ็†่งฃ + enhanceEmojiMessage(content) { + // ๅธธ่ง่กจๆƒ…็š„ๅซไน‰ๆ˜ ๅฐ„ + const emojiResponses = { + '๐Ÿ˜€': '[ๅผ€ๅฟƒ]', + '๐Ÿ˜‚': '[ๅคง็ฌ‘]', + '๐Ÿ˜Š': '[ๅพฎ็ฌ‘]', + 'โค๏ธ': '[็ˆฑๅฟƒ]', + '๐Ÿ‘': '[็‚น่ตž]', + '๐Ÿ˜ญ': '[ๅ“ญๆณฃ]', + '๐Ÿ™': '[ๆ„Ÿ่ฐข/ๆ‹œๆ‰˜]', + '๐Ÿ˜': '[ๅ–œๆฌข]', + '๐ŸŽ‰': '[ๅบ†็ฅ]', + '๐Ÿค”': '[ๆ€่€ƒ]', + '๐Ÿ˜…': '[ๅฐดๅฐฌ]', + '๐Ÿ˜': '[ๅผ€ๅฟƒ]', + '๐Ÿฅฐ': '[ๅ–œ็ˆฑ]', + '๐Ÿ˜˜': '[้ฃžๅป]', + '๐Ÿ˜': '[ๅ็ฌ‘]', + '๐Ÿฅณ': '[ๅบ†็ฅ]', + '๐Ÿ˜”': '[้šพ่ฟ‡]', + '๐Ÿ˜ข': '[ๅ“ญๆณฃ]', + '๐Ÿ˜ค': '[็”Ÿๆฐ”]', + '๐Ÿ˜ด': '[ๅ›ฐ]', + '๐Ÿค—': '[ๆ‹ฅๆŠฑ]', + '๐Ÿ™‚': '[ๅพฎ็ฌ‘]', + '๐Ÿ˜ƒ': '[ๅผ€ๅฟƒ]', + '๐Ÿ˜„': '[ๅคง็ฌ‘]', + '๐Ÿ˜†': '[ๅผ€ๅฟƒ]', + '๐Ÿ˜‡': '[ๅคฉไฝฟ]', + '๐Ÿคฉ': '[ๆƒŠๅ–œ]', + '๐Ÿ˜‹': '[ๅฅฝๅƒ]', + '๐Ÿ˜›': '[่ฐƒ็šฎ]', + '๐Ÿ˜œ': '[่ฐƒ็šฎ]', + '๐Ÿคช': '[ๆžๆ€ช]', + '๐Ÿ˜': '[ๅผ€ๅฟƒ]', + '๐Ÿค‘': '[ๅ‘่ดข]', + '๐Ÿคญ': '[ๅฎณ็พž]', + '๐Ÿคซ': '[ๅ˜˜]', + '๐Ÿค': '[้—ญๅ˜ด]', + '๐Ÿคจ': '[็–‘ๆƒ‘]', + '๐Ÿ˜': '[ๆ— ่ฏญ]', + '๐Ÿ˜‘': '[ๆ— ่ฏญ]', + '๐Ÿ˜ถ': '[ๆฒ‰้ป˜]', + '๐Ÿ˜’': '[ไธๅฑ‘]', + '๐Ÿ™„': '[็™ฝ็œผ]', + '๐Ÿ˜ฌ': '[ๅฐดๅฐฌ]', + '๐Ÿคฅ': '[่ฏด่ฐŽ]', + '๐Ÿ˜Œ': '[ๅฎ‰ๅฟƒ]', + '๐Ÿ˜ช': '[ๅ›ฐ]', + '๐Ÿคค': '[ๆตๅฃๆฐด]', + '๐Ÿ˜ท': '[็”Ÿ็—…]', + '๐Ÿค’': '[ๅ‘็ƒง]', + '๐Ÿค•': '[ๅ—ไผค]', + '๐Ÿคข': '[ๆถๅฟƒ]', + '๐Ÿคฎ': '[ๅ‘•ๅ]', + '๐Ÿคง': '[ๆ„Ÿๅ†’]', + '๐Ÿฅต': '[็ƒญ]', + '๐Ÿฅถ': '[ๅ†ท]', + '๐Ÿฅด': '[ๅคดๆ™•]', + '๐Ÿ˜ต': '[ๆ™•]', + '๐Ÿคฏ': '[็ˆ†็‚ธ]', + '๐Ÿค ': '[้…ท]', + '๐Ÿ˜Ž': '[้…ท]', + '๐Ÿค“': '[ไนฆๅ‘†ๅญ]', + '๐Ÿง': '[็–‘ๆƒ‘]', + '๐Ÿ˜•': '[ๅ›ฐๆƒ‘]', + '๐Ÿ˜Ÿ': '[ๆ‹…ๅฟƒ]', + '๐Ÿ™': '[้šพ่ฟ‡]', + '๐Ÿ˜ฎ': '[ๆƒŠ่ฎถ]', + '๐Ÿ˜ฏ': '[ๆƒŠ่ฎถ]', + '๐Ÿ˜ฒ': '[้œ‡ๆƒŠ]', + '๐Ÿ˜ณ': '[่„ธ็บข]', + '๐Ÿฅบ': '[ๆณๆฑ‚]', + '๐Ÿ˜ฆ': '[ๆƒŠ่ฎถ]', + '๐Ÿ˜ง': '[ๆƒŠ่ฎถ]', + '๐Ÿ˜จ': '[ๅฎณๆ€•]', + '๐Ÿ˜ฐ': '[็ดงๅผ ]', + '๐Ÿ˜ฅ': '[ๅคฑๆœ›]', + '๐Ÿ˜ฑ': '[ๆๆƒง]', + '๐Ÿ˜–': '[ๅ›ฐๆ‰ฐ]', + '๐Ÿ˜ฃ': '[็—›่‹ฆ]', + '๐Ÿ˜ž': '[้šพ่ฟ‡]', + '๐Ÿ˜“': '[ๆฑ—]', + '๐Ÿ˜ฉ': '[็ดฏ]', + '๐Ÿ˜ซ': '[็ดฏ]', + '๐Ÿฅฑ': '[ๅ›ฐ]', + '๐Ÿ˜ก': '[ๆ„คๆ€’]', + '๐Ÿ˜ ': '[็”Ÿๆฐ”]', + '๐Ÿคฌ': '[ๅ’’้ช‚]', + '๐Ÿ˜ˆ': '[ๆถ้ญ”]', + '๐Ÿ‘ฟ': '[็”Ÿๆฐ”]', + '๐Ÿ’€': '[้ชท้ซ…]', + '๐Ÿ’ฉ': '[ไพฟไพฟ]', + '๐Ÿ‘ป': '[้ฌผ]', + '๐Ÿ‘ฝ': '[ๅค–ๆ˜Ÿไบบ]', + '๐Ÿค–': '[ๆœบๅ™จไบบ]', + '๐ŸŽƒ': '[ไธ‡ๅœฃ่Š‚]', + '๐Ÿ˜บ': '[ๅผ€ๅฟƒ็Œซ]', + '๐Ÿ˜ธ': '[ๅพฎ็ฌ‘็Œซ]', + '๐Ÿ˜น': '[ๅคง็ฌ‘็Œซ]', + '๐Ÿ˜ป': '[่Šฑ็—ด็Œซ]', + '๐Ÿ˜ผ': '[ๅพ—ๆ„็Œซ]', + '๐Ÿ˜ฝ': '[ไบฒไบฒ็Œซ]', + '๐Ÿ™€': '[ๆƒŠ่ฎถ็Œซ]', + '๐Ÿ˜ฟ': '[ๅ“ญๆณฃ็Œซ]', + '๐Ÿ˜พ': '[็”Ÿๆฐ”็Œซ]', + '๐Ÿ‘‹': '[ๆŒฅๆ‰‹]', + '๐Ÿคš': '[ไธพๆ‰‹]', + '๐Ÿ–': '[ๆ‰‹ๆŽŒ]', + 'โœ‹': '[ๆ‰‹ๆŽŒ]', + '๐Ÿ––': '[V]', + '๐Ÿ‘Œ': '[OK]', + '๐Ÿค': '[ๆ]', + 'โœŒ๏ธ': '[่€ถ]', + '๐Ÿคž': '[ๅฅฝ่ฟ]', + '๐ŸคŸ': '[็ˆฑไฝ ]', + '๐Ÿค˜': '[ๆ‘‡ๆปš]', + '๐Ÿค™': '[ๆ‰“็”ต่ฏ]', + '๐Ÿ‘ˆ': '[ๅทฆ่พน]', + '๐Ÿ‘‰': '[ๅณ่พน]', + '๐Ÿ‘†': '[ไธŠ่พน]', + '๐Ÿ–•': '[็ซ–ไธญๆŒ‡]', + '๐Ÿ‘‡': '[ไธ‹่พน]', + 'โ˜': '[ๅ‘ไธŠ]', + '๐Ÿ‘Ž': '[้„™่ง†]', + 'โœŠ': '[ๆ‹ณๅคด]', + '๐Ÿ‘Š': '[ๆ‹ณๅคด]', + '๐Ÿค›': '[ๅทฆๆ‹ณ]', + '๐Ÿคœ': '[ๅณๆ‹ณ]', + '๐Ÿ‘': '[้ผ“ๆŽŒ]', + '๐Ÿ™Œ': '[ไธพๆ‰‹ๅบ†็ฅ]', + '๐Ÿ‘': '[ๅผ ๅผ€ๆ‰‹]', + '๐Ÿคฒ': '[ๆ‘Šๆ‰‹]', + '๐Ÿค': '[ๆกๆ‰‹]', + 'โœ๏ธ': '[ๅ†™ๅญ—]', + '๐Ÿ’…': '[็พŽ็”ฒ]', + '๐Ÿคณ': '[่‡ชๆ‹]', + '๐Ÿ’ช': '[่‚Œ่‚‰]', + '๐Ÿ’—': '[็ˆฑๅฟƒ]', + '๐Ÿ’“': '[ๅฟƒ่ทณ]', + '๐Ÿ’•': '[ไธค้ข—ๅฟƒ]', + '๐Ÿ’–': '[้—ชไบฎๅฟƒ]', + '๐Ÿ’': '[็คผ็‰ฉๅฟƒ]', + '๐Ÿ’ž': '[ๆ—‹่ฝฌๅฟƒ]', + '๐Ÿ’˜': '[ไธ˜ๆฏ”็‰น]', + '๐Ÿ’Œ': '[ๆƒ…ไนฆ]', + '๐Ÿ’Ÿ': '[ๅฟƒๅฝข]', + '๐Ÿ’›': '[้ป„ๅฟƒ]', + '๐Ÿ’™': '[่“ๅฟƒ]', + '๐Ÿ’œ': '[็ดซๅฟƒ]', + '๐Ÿ–ค': '[้ป‘ๅฟƒ]', + '๐Ÿ’”': '[ๅฟƒ็ขŽ]', + '๐Ÿ’ข': '[ๆ„คๆ€’]', + '๐Ÿ’ฃ': '[็‚ธๅผน]', + '๐Ÿ’ฅ': '[็ˆ†็‚ธ]', + '๐Ÿ’ซ': '[ๅคดๆ™•]', + '๐Ÿ’ฆ': '[ๆฑ—]', + '๐Ÿ’จ': '[้ฃŽ]', + '๐Ÿ‘๏ธ': '[็œผ็›]', + '๐Ÿ‘€': '[็œ‹]', + '๐Ÿ‘…': '[่ˆŒๅคด]', + '๐Ÿ‘„': '[ๅ˜ดๅทด]', + '๐Ÿ‘‚': '[่€ณๆœต]', + '๐Ÿ‘ƒ': '[้ผปๅญ]' + } + + // ๅฆ‚ๆžœๆ˜ฏ็บฏ่กจๆƒ…ๆถˆๆฏ๏ผŒๆทปๅŠ ไธ€ไบ›ๆ็คบ + if (this.containsEmoji(content) && !content.match(/[\u4e00-\u9fa5a-zA-Z]/)) { + let enhancedMessage = content + // ไธบ่กจๆƒ…ๆทปๅŠ ๆ่ฟฐ + for (let emoji in emojiResponses) { + if (content.includes(emoji)) { + enhancedMessage += ` (${emojiResponses[emoji]})` + } + } + return enhancedMessage + } + return content } } } @@ -2382,6 +2624,25 @@ $radius-lg: 36rpx; } } + /* EmojiๆŒ‰้’ฎ */ + .emoji-btn { + width: 72rpx; + height: 72rpx; + border-radius: 12rpx; + background-color: #f2f2f2; + margin-left: 12rpx; + display: flex; + align-items: center; + justify-content: center; + border: none; + padding: 0; + + .iconfont { + font-size: 36rpx; + line-height: 1; + } + } + /* ๅ‘้€ๆŒ‰้’ฎ - ๅพฎไฟก่Šๅคฉๆ ทๅผ */ .send-btn { width: 120rpx; @@ -3232,4 +3493,104 @@ $radius-lg: 36rpx; } } } + +/* Emoji้ขๆฟ */ +.emoji-popup { + position: fixed; + top: 0; + left: 0; + right: 0; + bottom: 0; + z-index: 999; + + .emoji-mask { + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + background-color: rgba(0, 0, 0, 0.4); + backdrop-filter: blur(6rpx); + } + + .emoji-panel { + position: absolute; + bottom: 0; + left: 0; + right: 0; + background-color: white; + border-radius: $radius-lg $radius-lg 0 0; + padding: 32rpx; + box-shadow: 0 -4rpx 20rpx rgba(0, 0, 0, 0.08); + max-height: 60vh; + + .emoji-header { + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 24rpx; + border-bottom: 2rpx solid #f0f4f8; + padding-bottom: 16rpx; + + text { + font-size: 34rpx; + font-weight: 600; + color: $color-text; + } + + .close-btn { + width: 56rpx; + height: 56rpx; + border-radius: 50%; + background-color: $bg-main; + display: flex; + align-items: center; + justify-content: center; + transition: all 0.2s ease; + border: none; + + &:hover { + background-color: #e8edf3; + } + + .iconfont { + font-size: 28rpx; + color: $color-text-light; + } + } + } + + .emoji-grid { + display: grid; + grid-template-columns: repeat(8, 1fr); + gap: 16rpx; + max-height: 40vh; + + .emoji-item { + display: flex; + align-items: center; + justify-content: center; + width: 64rpx; + height: 64rpx; + border-radius: 12rpx; + background-color: #f8f8f8; + transition: all 0.2s ease; + + &:hover { + background-color: #e8edf3; + transform: scale(1.1); + } + + &:active { + background-color: #d8dde3; + } + + .emoji-text { + font-size: 36rpx; + line-height: 1; + } + } + } + } +}