From c9b6d9a10160ca1d18237a0728bac87ec8ff16da Mon Sep 17 00:00:00 2001
From: gerson <1405270578@qq.com>
Date: 星期二, 21 一月 2025 16:16:43 +0800
Subject: [PATCH] 屏蔽非当前聊天室chat_start

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

diff --git a/src/components/chat/smallChat/ChatInput.vue b/src/components/chat/smallChat/ChatInput.vue
index 1b4f9e3..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="璇疯緭鍏ユ搷浣�"
 				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