diff --git a/web/src/pages/search/index.less b/web/src/pages/search/index.less index 1584190236..2653dc6f92 100644 --- a/web/src/pages/search/index.less +++ b/web/src/pages/search/index.less @@ -1,4 +1,6 @@ .searchPage { + background-position: center; + background-size: cover; .card { width: 100%; :global(.ant-card-body) { @@ -13,14 +15,18 @@ font-size: 14px; cursor: pointer; } + + .mainLayout { + background: transparent; + } +} + +.transparentSearchSide { + background-color: rgb(251 251 251 / 88%) !important; } .searchSide { - // height: calc(100vh - 72px); position: relative; - // position: fixed !important; - // top: 72px; - // bottom: 0; :global(.ant-layout-sider-children) { height: auto; } @@ -37,9 +43,11 @@ } .list { width: 100%; - // height: 100%; height: calc(100vh - 152px); overflow: auto; + &::-webkit-scrollbar-track { + background: transparent; + } } .checkbox { width: 100%; @@ -51,8 +59,6 @@ .firstRenderContent { height: 100%; - background-position: center; - background-size: cover; } .content { diff --git a/web/src/pages/search/index.tsx b/web/src/pages/search/index.tsx index c4c7d5ec35..257c46be28 100644 --- a/web/src/pages/search/index.tsx +++ b/web/src/pages/search/index.tsx @@ -86,25 +86,24 @@ const SearchPage = () => { return ( <> - + - + {isFirstRender ? ( - {/* - - {appConf.appName} - */} {InputSearch} diff --git a/web/src/pages/search/sidebar.tsx b/web/src/pages/search/sidebar.tsx index 2f14a9d5e7..368f6e5795 100644 --- a/web/src/pages/search/sidebar.tsx +++ b/web/src/pages/search/sidebar.tsx @@ -1,7 +1,10 @@ import { useNextFetchKnowledgeList } from '@/hooks/knowledge-hooks'; +import { UserOutlined } from '@ant-design/icons'; import type { CheckboxProps } from 'antd'; import { Avatar, Checkbox, Layout, List, Space, Typography } from 'antd'; +import { CheckboxChangeEvent } from 'antd/es/checkbox'; import { CheckboxValueType } from 'antd/es/checkbox/Group'; +import classNames from 'classnames'; import { Dispatch, SetStateAction, @@ -10,18 +13,21 @@ import { useMemo, } from 'react'; -import { UserOutlined } from '@ant-design/icons'; -import { CheckboxChangeEvent } from 'antd/es/checkbox'; import styles from './index.less'; const { Sider } = Layout; interface IProps { + isFirstRender: boolean; checkedList: string[]; setCheckedList: Dispatch>; } -const SearchSidebar = ({ checkedList, setCheckedList }: IProps) => { +const SearchSidebar = ({ + isFirstRender, + checkedList, + setCheckedList, +}: IProps) => { const { list, loading } = useNextFetchKnowledgeList(); const ids = useMemo(() => list.map((x) => x.id), [list]); @@ -49,7 +55,13 @@ const SearchSidebar = ({ checkedList, setCheckedList }: IProps) => { }, [ids, setCheckedList]); return ( - +