Commit a5a5bf7e by Liu

fix: 输入框部分样式

parent dcbf2627
...@@ -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-[36px] 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-[24px] 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-[200px] p-2 rounded overflow-y-auto outline-none" className="w-full min-h-[40px] max-h-[48px] 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>
) )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment