feat: modify routing to nested mode and rename document (#52)

* feat: modify routing to nested mode

* feat: rename document
This commit is contained in:
balibabu
2024-02-02 18:49:54 +08:00
committed by GitHub
parent 503735cd1d
commit 7b71fb2db6
33 changed files with 681 additions and 175 deletions

View File

@ -1,6 +1,7 @@
import { ReactComponent as FilterIcon } from '@/assets/filter.svg';
import { KnowledgeRouteKey } from '@/constants/knowledge';
import { PlusOutlined } from '@ant-design/icons';
import { Button, Col, Row, Space } from 'antd';
import { Button, Flex, Space } from 'antd';
import { useCallback, useEffect } from 'react';
import { useDispatch, useNavigate, useSelector } from 'umi';
import styles from './index.less';
@ -20,7 +21,7 @@ const Knowledge = () => {
}, []);
const handleAddKnowledge = () => {
navigate(`add/setting`);
navigate(`/knowledge/${KnowledgeRouteKey.Configuration}`);
};
useEffect(() => {
@ -50,7 +51,7 @@ const Knowledge = () => {
</Button>
</Space>
</div>
<Row gutter={{ xs: 8, sm: 16, md: 24, lg: 32 }}>
{/* <Row gutter={{ xs: 8, sm: 16, md: 24, lg: 32 }}>
{data.map((item: any) => {
return (
<Col
@ -58,14 +59,19 @@ const Knowledge = () => {
key={item.name}
xs={24}
sm={12}
md={8}
lg={6}
md={10}
lg={8}
>
<KnowledgeCard item={item}></KnowledgeCard>
</Col>
);
})}
</Row>
</Row> */}
<Flex gap="large" wrap="wrap">
{data.map((item: any) => {
return <KnowledgeCard item={item} key={item.name}></KnowledgeCard>;
})}
</Flex>
</div>
);
};