Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
赵月辉
/
fastgpt-migrated
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Unverified
Commit
ef1e8aef
authored
Mar 31, 2023
by
archer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 发送区按键
parent
56dab7ab
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
src/pages/chat/index.tsx
+8
-7
No files found.
src/pages/chat/index.tsx
View file @
ef1e8aef
...
@@ -408,7 +408,7 @@ const Chat = ({ chatId }: { chatId: string }) => {
...
@@ -408,7 +408,7 @@ const Chat = ({ chatId }: { chatId: string }) => {
flexDirection=
{
'column'
}
flexDirection=
{
'column'
}
>
>
{
/* 聊天内容 */
}
{
/* 聊天内容 */
}
<
Box
ref=
{
ChatBox
}
flex=
{
'1 0 0'
}
h=
{
0
}
w=
{
'100%'
}
overflowY=
{
'auto'
}
>
<
Box
ref=
{
ChatBox
}
pb=
{
[
4
,
0
]
}
flex=
{
'1 0 0'
}
h=
{
0
}
w=
{
'100%'
}
overflowY=
{
'auto'
}
>
{
chatData
.
history
.
map
((
item
,
index
)
=>
(
{
chatData
.
history
.
map
((
item
,
index
)
=>
(
<
Box
<
Box
key=
{
index
}
key=
{
index
}
...
@@ -452,7 +452,8 @@ const Chat = ({ chatId }: { chatId: string }) => {
...
@@ -452,7 +452,8 @@ const Chat = ({ chatId }: { chatId: string }) => {
</
Box
>
</
Box
>
{
/* 发送区 */
}
{
/* 发送区 */
}
<
Box
m=
{
media
(
'20px auto'
,
'0 auto'
)
}
w=
{
'100%'
}
maxW=
{
media
(
'min(750px, 100%)'
,
'auto'
)
}
>
<
Box
m=
{
media
(
'20px auto'
,
'0 auto'
)
}
w=
{
'100%'
}
maxW=
{
media
(
'min(750px, 100%)'
,
'auto'
)
}
>
<
Box
<
Flex
alignItems=
{
'flex-end'
}
py=
{
5
}
py=
{
5
}
position=
{
'relative'
}
position=
{
'relative'
}
boxShadow=
{
`0 0 15px rgba(0,0,0,0.1)`
}
boxShadow=
{
`0 0 15px rgba(0,0,0,0.1)`
}
...
@@ -464,8 +465,8 @@ const Chat = ({ chatId }: { chatId: string }) => {
...
@@ -464,8 +465,8 @@ const Chat = ({ chatId }: { chatId: string }) => {
{
/* 输入框 */
}
{
/* 输入框 */
}
<
Textarea
<
Textarea
ref=
{
TextareaDom
}
ref=
{
TextareaDom
}
w=
{
'100%'
}
flex=
{
1
}
pr=
{
'45px'
}
w=
{
0
}
py=
{
0
}
py=
{
0
}
border=
{
'none'
}
border=
{
'none'
}
_focusVisible=
{
{
_focusVisible=
{
{
...
@@ -499,7 +500,7 @@ const Chat = ({ chatId }: { chatId: string }) => {
...
@@ -499,7 +500,7 @@ const Chat = ({ chatId }: { chatId: string }) => {
}
}
}
}
/>
/>
{
/* 发送和等待按键 */
}
{
/* 发送和等待按键 */
}
<
Box
p
osition=
{
'absolute'
}
bottom=
{
5
}
right=
{
media
(
'20px'
,
'10px'
)
}
>
<
Box
p
x=
{
4
}
onClick=
{
sendPrompt
}
>
{
isChatting
?
(
{
isChatting
?
(
<
Image
<
Image
style=
{
{
transform
:
'translateY(4px)'
}
}
style=
{
{
transform
:
'translateY(4px)'
}
}
...
@@ -509,7 +510,7 @@ const Chat = ({ chatId }: { chatId: string }) => {
...
@@ -509,7 +510,7 @@ const Chat = ({ chatId }: { chatId: string }) => {
alt=
{
''
}
alt=
{
''
}
/>
/>
)
:
(
)
:
(
<
Box
cursor=
{
'pointer'
}
onClick=
{
sendPrompt
}
>
<
Box
cursor=
{
'pointer'
}
>
<
Icon
<
Icon
name=
{
'chatSend'
}
name=
{
'chatSend'
}
width=
{
'20px'
}
width=
{
'20px'
}
...
@@ -519,7 +520,7 @@ const Chat = ({ chatId }: { chatId: string }) => {
...
@@ -519,7 +520,7 @@ const Chat = ({ chatId }: { chatId: string }) => {
</
Box
>
</
Box
>
)
}
)
}
</
Box
>
</
Box
>
</
Bo
x
>
</
Fle
x
>
</
Box
>
</
Box
>
</
Flex
>
</
Flex
>
</
Flex
>
</
Flex
>
...
...
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