mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-22 20:37:48 +00:00
fix: 聊天侧边栏未滚动
This commit is contained in:
@@ -45,12 +45,12 @@ const Navbar = ({
|
||||
flexDirection={'column'}
|
||||
alignItems={'center'}
|
||||
justifyContent={'center'}
|
||||
onClick={() =>
|
||||
!item.activeLink.includes(router.pathname) &&
|
||||
onClick={() => {
|
||||
if (item.link === router.pathname) return;
|
||||
router.push(item.link, undefined, {
|
||||
shallow: true
|
||||
})
|
||||
}
|
||||
});
|
||||
}}
|
||||
cursor={'pointer'}
|
||||
fontSize={'sm'}
|
||||
w={'60px'}
|
||||
|
@@ -57,6 +57,7 @@ const NavbarPhone = ({
|
||||
alignItems={'center'}
|
||||
justifyContent={'center'}
|
||||
onClick={() => {
|
||||
if (item.link === router.pathname) return;
|
||||
router.push(item.link);
|
||||
onClose();
|
||||
}}
|
||||
|
@@ -80,29 +80,7 @@ const SlideBar = ({
|
||||
<Box flex={'1 0 0'} w={0} className="textEllipsis">
|
||||
{item.title}
|
||||
</Box>
|
||||
{/* <Input
|
||||
flex={'1 0 0'}
|
||||
w={0}
|
||||
value={item.title}
|
||||
variant={'unstyled'}
|
||||
disabled={editHistoryId !== item.windowId}
|
||||
opacity={'1 !important'}
|
||||
cursor={`${editHistoryId !== item.windowId ? 'pointer' : 'text'} !important`}
|
||||
onChange={(e) => {
|
||||
updateChatHistory(item.windowId, e.target.value);
|
||||
}}
|
||||
/> */}
|
||||
<Box>
|
||||
{/* <IconButton
|
||||
icon={<EditIcon />}
|
||||
variant={'unstyled'}
|
||||
aria-label={'edit'}
|
||||
size={'xs'}
|
||||
onClick={(e) => {
|
||||
console.log(e);
|
||||
setEditHistoryId(item.windowId);
|
||||
}}
|
||||
/> */}
|
||||
<IconButton
|
||||
icon={<DeleteIcon />}
|
||||
variant={'unstyled'}
|
||||
@@ -120,7 +98,14 @@ const SlideBar = ({
|
||||
);
|
||||
|
||||
return (
|
||||
<Box w={'100%'} h={'100%'} p={3} backgroundColor={'blackAlpha.800'} color={'white'}>
|
||||
<Flex
|
||||
flexDirection={'column'}
|
||||
w={'100%'}
|
||||
h={'100%'}
|
||||
p={3}
|
||||
backgroundColor={'blackAlpha.800'}
|
||||
color={'white'}
|
||||
>
|
||||
{/* 新对话 */}
|
||||
<Button
|
||||
w={'100%'}
|
||||
@@ -133,6 +118,7 @@ const SlideBar = ({
|
||||
新对话
|
||||
</Button>
|
||||
{/* 我的模型 & 历史记录 折叠框*/}
|
||||
<Box flex={'1 0 0'} h={0} overflowY={'auto'}>
|
||||
{isSuccess ? (
|
||||
<Accordion defaultIndex={[0]} allowToggle>
|
||||
<AccordionItem borderTop={0} borderBottom={0}>
|
||||
@@ -194,6 +180,7 @@ const SlideBar = ({
|
||||
<RenderHistory />
|
||||
)}
|
||||
</Box>
|
||||
</Flex>
|
||||
);
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user