fix: 发送区按键
This commit is contained in:
parent
56dab7abba
commit
ef1e8aef5c
@ -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 }) => {
|
|||||||
</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 }) => {
|
|||||||
{/* 输入框 */}
|
{/* 输入框 */}
|
||||||
<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 }) => {
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
{/* 发送和等待按键 */}
|
{/* 发送和等待按键 */}
|
||||||
<Box position={'absolute'} bottom={5} right={media('20px', '10px')}>
|
<Box px={4} onClick={sendPrompt}>
|
||||||
{isChatting ? (
|
{isChatting ? (
|
||||||
<Image
|
<Image
|
||||||
style={{ transform: 'translateY(4px)' }}
|
style={{ transform: 'translateY(4px)' }}
|
||||||
@ -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 }) => {
|
|||||||
</Box>
|
</Box>
|
||||||
)}
|
)}
|
||||||
</Box>
|
</Box>
|
||||||
</Box>
|
</Flex>
|
||||||
</Box>
|
</Box>
|
||||||
</Flex>
|
</Flex>
|
||||||
</Flex>
|
</Flex>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user