Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sdream-ai-fe
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
侯明涛
sdream-ai-fe
Commits
a5a5bf7e
Commit
a5a5bf7e
authored
Oct 21, 2025
by
Liu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 输入框部分样式
parent
dcbf2627
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
3 deletions
+25
-3
src/components/ChatEditor/index.tsx
+25
-3
No files found.
src/components/ChatEditor/index.tsx
View file @
a5a5bf7e
...
@@ -5,6 +5,8 @@ import { useLocalStorageState, useToggle } from 'ahooks'
...
@@ -5,6 +5,8 @@ import { useLocalStorageState, useToggle } from 'ahooks'
import
{
LoginModal
}
from
'../LoginModal'
import
{
LoginModal
}
from
'../LoginModal'
import
type
{
RootState
}
from
'@/store'
import
type
{
RootState
}
from
'@/store'
import
SendIcon
from
'@/assets/svg/send.svg?react'
import
SendIcon
from
'@/assets/svg/send.svg?react'
import
dataIcon
from
'@/assets/data-icon.png'
import
efficiencyIcon
from
'@/assets/efficiency-icon.png'
import
{
type
WithAuthProps
,
withAuth
}
from
'@/auth/withAuth'
import
{
type
WithAuthProps
,
withAuth
}
from
'@/auth/withAuth'
import
{
useAppSelector
}
from
'@/store/hook'
import
{
useAppSelector
}
from
'@/store/hook'
...
@@ -121,11 +123,12 @@ const ChatEditorBase: React.FC<ChatEditorProps & WithAuthProps> = ({ checkAuth,
...
@@ -121,11 +123,12 @@ const ChatEditorBase: React.FC<ChatEditorProps & WithAuthProps> = ({ checkAuth,
return
(
return
(
<
div
<
div
className=
"flex items-end w-full h-auto relative mx-auto rounded-[
36
px] overflow-hidden transition duration-200 py-[8px] pl-[12px] pr-[12px] sm:py-[12px] sm:pl-[32px] sm:pr-[20px]"
className=
"flex items-end w-full h-auto relative mx-auto rounded-[
24
px] overflow-hidden transition duration-200 py-[8px] pl-[12px] pr-[12px] sm:py-[12px] sm:pl-[32px] sm:pr-[20px]"
style=
{
{
style=
{
{
background
:
'#FFFFFF'
,
background
:
'#FFFFFF'
,
border
:
'1px solid #0a0a0a78'
,
border
:
'1px solid #0a0a0a78'
,
boxShadow
:
'0 8px 12px 0 rgba(235,235,235,0.30)'
,
boxShadow
:
'0 8px 12px 0 rgba(235,235,235,0.30)'
,
height
:
'102px'
,
}
}
}
}
>
>
<
div
<
div
...
@@ -134,7 +137,7 @@ const ChatEditorBase: React.FC<ChatEditorProps & WithAuthProps> = ({ checkAuth,
...
@@ -134,7 +137,7 @@ const ChatEditorBase: React.FC<ChatEditorProps & WithAuthProps> = ({ checkAuth,
enterKeyHint=
"send"
enterKeyHint=
"send"
role=
"textbox"
role=
"textbox"
translate=
"no"
translate=
"no"
className=
"w-full min-h-[40px] max-h-[
200
px] p-2 rounded overflow-y-auto outline-none"
className=
"w-full min-h-[40px] max-h-[
48
px] p-2 rounded overflow-y-auto outline-none"
onInput=
{
handleInput
}
onInput=
{
handleInput
}
onFocus=
{
onFocus
}
onFocus=
{
onFocus
}
onKeyDown=
{
handleKeyDown
}
onKeyDown=
{
handleKeyDown
}
...
@@ -142,9 +145,10 @@ const ChatEditorBase: React.FC<ChatEditorProps & WithAuthProps> = ({ checkAuth,
...
@@ -142,9 +145,10 @@ const ChatEditorBase: React.FC<ChatEditorProps & WithAuthProps> = ({ checkAuth,
suppressContentEditableWarning
suppressContentEditableWarning
style=
{
{
style=
{
{
resize
:
'none'
,
resize
:
'none'
,
maxHeight
:
'48px'
,
marginBottom
:
'40px'
,
}
}
}
}
/>
/>
<
Tooltip
isOpen=
{
Boolean
(
token
)
&&
showContentTips
&&
!
isAsking
&&
!
content
}
color=
"foreground"
content=
"请输入您的问题📖"
placement=
"top-end"
>
<
Tooltip
isOpen=
{
Boolean
(
token
)
&&
showContentTips
&&
!
isAsking
&&
!
content
}
color=
"foreground"
content=
"请输入您的问题📖"
placement=
"top-end"
>
<
Button
className=
"ask-send"
onPress=
{
handleSubmit
}
radius=
"full"
isDisabled=
{
!
content
||
isAsking
}
isIconOnly
color=
"primary"
>
<
Button
className=
"ask-send"
onPress=
{
handleSubmit
}
radius=
"full"
isDisabled=
{
!
content
||
isAsking
}
isIconOnly
color=
"primary"
>
<
SendIcon
/>
<
SendIcon
/>
...
@@ -178,6 +182,24 @@ const ChatEditorBase: React.FC<ChatEditorProps & WithAuthProps> = ({ checkAuth,
...
@@ -178,6 +182,24 @@ const ChatEditorBase: React.FC<ChatEditorProps & WithAuthProps> = ({ checkAuth,
)
}
)
}
</
AnimatePresence
>
</
AnimatePresence
>
</
div
>
</
div
>
<
div
className=
"absolute left-4 bottom-2 flex items-center gap-3 pointer-events-auto"
>
<
Button
className=
"w-[96px] h-[32px] px-3 rounded-full bg-white border border-[#E6E8EB] shadow-none text-[#111827] text-[12px]"
radius=
"full"
variant=
"bordered"
startContent=
{
<
img
src=
{
dataIcon
}
alt=
"数据助手"
className=
"w-5 h-5"
/>
}
>
数据助手
</
Button
>
<
Button
className=
"w-[96px] h-[32px] px-3 rounded-full bg-white border border-[#E6E8EB] shadow-none text-[#111827] text-[12px]"
radius=
"full"
variant=
"bordered"
startContent=
{
<
img
src=
{
efficiencyIcon
}
alt=
"提质增效"
className=
"w-5 h-5"
/>
}
>
提质增效
</
Button
>
</
div
>
<
LoginModal
onClose=
{
handleCloseLoginModal
}
isOpen=
{
isOpenLoginModal
}
/>
<
LoginModal
onClose=
{
handleCloseLoginModal
}
isOpen=
{
isOpenLoginModal
}
/>
</
div
>
</
div
>
)
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment