From 8c6fbc506e9a2c8cde56a794d8319cc55f4be666 Mon Sep 17 00:00:00 2001
From: wujingjing <gersonwu@qq.com>
Date: 星期二, 11 二月 2025 15:56:48 +0800
Subject: [PATCH] 修复问题

---
 src/components/chat/smallChat/ChatInput.vue |   24 +++++++++++++++++++++---
 1 files changed, 21 insertions(+), 3 deletions(-)

diff --git a/src/components/chat/smallChat/ChatInput.vue b/src/components/chat/smallChat/ChatInput.vue
index d2ce7a1..e06cfba 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">
@@ -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