From c144c39d9f3f86e1b52ae4247f8322f6396a4320 Mon Sep 17 00:00:00 2001
From: wujingjing <gersonwu@qq.com>
Date: 星期二, 11 三月 2025 13:39:25 +0800
Subject: [PATCH] 查看文件内容

---
 src/components/chat/smallChat/ChatInput.vue |   26 ++++++++++++++++++++++----
 1 files changed, 22 insertions(+), 4 deletions(-)

diff --git a/src/components/chat/smallChat/ChatInput.vue b/src/components/chat/smallChat/ChatInput.vue
index d2ce7a1..4e64f48 100644
--- a/src/components/chat/smallChat/ChatInput.vue
+++ b/src/components/chat/smallChat/ChatInput.vue
@@ -19,12 +19,14 @@
 				:autosize="{ minRows: 1, maxRows: 3 }"
 				v-elInputFocus
 				show-word-limit
+				@input="inputting"
 				v-model="inputText"
-				placeholder="璇疯緭鍏ラ棶棰�"
+				placeholder="璇疯緭鍏ユ搷浣�"
 				clearable
-				@keydown.enter="handleEnterPress"
+				@keydown="keydownInput"
 			>
 			</el-input>
+			<InputTip ref="inputTipRef" :inputValue="inputText" @updateInputValue="updateInputValue" :isHome="false" />
 		</div>
 		<div class="h100 flex items-end">
 			<div class="upload_img space-y">
@@ -39,7 +41,7 @@
 						v-if="inputText"
 					>
 					</el-button>
-					<el-tooltip placement="top" content="鍋滄鐢熸垚" v-if="isTalking">
+					<el-tooltip placement="top" content="鍋滄鎿嶄綔" v-if="isTalking">
 						<div class="cursor-pointer !ml-0 size-[38px] bg-[#1d86ff] relative !z-10 rounded-full flex-center" link>
 							<div
 								class="size-[38px] bg-black text-white stop-breathe box-content rounded-full flex-center"
@@ -62,7 +64,10 @@
 
 <script setup lang="ts" name="ChatInput">
 import { Clock } from '@element-plus/icons-vue';
-
+import type { InputInstance } from 'element-plus';
+import { useInputEvent } from './useInputEvent';
+import InputTip from './inputTip/index.vue';
+import { ref } from 'vue';
 const inputText = defineModel('modelValue', {
 	type: String,
 	default: '',
@@ -102,6 +107,19 @@
 const toggleHistory = () => {
 	emits('toggleHistory');
 };
+
+const updateInputValue = (val) => {
+	inputText.value = val;
+};
+
+const inputRef = ref<InputInstance>(null);
+
+const { keydownInput, inputText:inputting, inputTipRef } = useInputEvent({
+	props: props,
+	emit: emits,
+	inputValue: inputText,
+	inputRef: inputRef,
+});
 </script>
 
 <style scoped lang="scss">

--
Gitblit v1.9.3