From 77950e48c76f4a3b29d01831d43039caba29888a Mon Sep 17 00:00:00 2001
From: wwf <1971391498@qq.com>
Date: 星期二, 18 十一月 2025 14:12:42 +0800
Subject: [PATCH] 修改
---
app/components/base/chat/chat/chat-input-area/operation.tsx | 34 ++++++++++++++++------------------
1 files changed, 16 insertions(+), 18 deletions(-)
diff --git a/app/components/base/chat/chat/chat-input-area/operation.tsx b/app/components/base/chat/chat/chat-input-area/operation.tsx
index 122dfcb..56ca863 100644
--- a/app/components/base/chat/chat/chat-input-area/operation.tsx
+++ b/app/components/base/chat/chat/chat-input-area/operation.tsx
@@ -1,4 +1,7 @@
-import { memo } from 'react'
+import {
+ forwardRef,
+ memo,
+} from 'react'
import {
RiMicLine,
RiSendPlane2Fill,
@@ -20,22 +23,17 @@
onSend: () => void
theme?: Theme | null
}
-const Operation = (
- {
- ref,
- fileConfig,
- speechToTextConfig,
- onShowVoiceInput,
- onSend,
- theme,
- }: OperationProps & {
- ref: React.RefObject<HTMLDivElement>;
- },
-) => {
+const Operation = forwardRef<HTMLDivElement, OperationProps>(({
+ fileConfig,
+ speechToTextConfig,
+ onShowVoiceInput,
+ onSend,
+ theme,
+}, ref) => {
return (
<div
className={cn(
- 'flex shrink-0 items-center justify-end',
+ 'shrink-0 flex items-center justify-end',
)}
>
<div
@@ -50,13 +48,13 @@
size='l'
onClick={onShowVoiceInput}
>
- <RiMicLine className='h-5 w-5' />
+ <RiMicLine className='w-5 h-5' />
</ActionButton>
)
}
</div>
<Button
- className='ml-3 w-8 px-0'
+ className='ml-3 px-0 w-8'
variant='primary'
onClick={onSend}
style={
@@ -67,12 +65,12 @@
: {}
}
>
- <RiSendPlane2Fill className='h-4 w-4' />
+ <RiSendPlane2Fill className='w-4 h-4' />
</Button>
</div>
</div>
)
-}
+})
Operation.displayName = 'Operation'
export default memo(Operation)
--
Gitblit v1.8.0