|
|
@@ -1,14 +1,26 @@
|
|
|
import * as React from 'react';
|
|
|
-import { observer } from 'mobx-react';
|
|
|
-import { Layout, Menu, MenuProps, Button } from 'antd';
|
|
|
-import { TeamOutlined, MenuFoldOutlined, MenuUnfoldOutlined } from '@ant-design/icons';
|
|
|
-import IconFont from '@/components/iconFont';
|
|
|
+import { Layout, Menu, Button } from 'antd';
|
|
|
+import {
|
|
|
+ RobotOutlined,
|
|
|
+ ReadOutlined,
|
|
|
+ FileSearchOutlined,
|
|
|
+ MenuFoldOutlined,
|
|
|
+ MenuUnfoldOutlined
|
|
|
+} from '@ant-design/icons';
|
|
|
import router from '@/router';
|
|
|
-import { NavProps } from '../types';
|
|
|
|
|
|
const Sider = Layout.Sider;
|
|
|
|
|
|
-const Nav: React.FC<NavProps> = (props: NavProps) => {
|
|
|
+interface Props {
|
|
|
+ selectedKey: string,
|
|
|
+ onChangeSelectedKey: (path: string, menuLevel: number) => void,
|
|
|
+ openKeys: string[],
|
|
|
+ onOpenChange: (openKeys: string[]) => void,
|
|
|
+ collapsed: boolean,
|
|
|
+ onClickCollapsed: () => void,
|
|
|
+};
|
|
|
+
|
|
|
+const Nav: React.FC<Props> = (props: Props) => {
|
|
|
const {
|
|
|
selectedKey,
|
|
|
onChangeSelectedKey,
|
|
|
@@ -18,22 +30,22 @@ const Nav: React.FC<NavProps> = (props: NavProps) => {
|
|
|
onClickCollapsed
|
|
|
} = props;
|
|
|
|
|
|
- const items: MenuProps['items'] = [
|
|
|
+ const items = [
|
|
|
{
|
|
|
- key: '/questionAnswerApp',
|
|
|
- icon: <TeamOutlined />,
|
|
|
+ key: '/questionAnswer',
|
|
|
+ icon: <RobotOutlined />,
|
|
|
label: '问答应用',
|
|
|
- onClick: () => { router.navigate({ pathname: '/questionAnswerApp' }) }
|
|
|
+ onClick: () => { router.navigate({ pathname: '/questionAnswer' }) }
|
|
|
},
|
|
|
{
|
|
|
- key: '/knowledgeBase',
|
|
|
- icon: <IconFont name='icon-home' />,
|
|
|
+ key: '/knowledgeLib',
|
|
|
+ icon: <ReadOutlined />,
|
|
|
label: '知识库',
|
|
|
- onClick: () => { router.navigate({ pathname: '/knowledgeBase' }) }
|
|
|
+ onClick: () => { router.navigate({ pathname: '/knowledgeLib' }) }
|
|
|
},
|
|
|
{
|
|
|
key: '/dataExport',
|
|
|
- icon: <IconFont name='icon-home' />,
|
|
|
+ icon: <FileSearchOutlined />,
|
|
|
label: '数据导出',
|
|
|
onClick: () => { router.navigate({ pathname: '/dataExport' }) }
|
|
|
}
|
|
|
@@ -70,4 +82,4 @@ const Nav: React.FC<NavProps> = (props: NavProps) => {
|
|
|
);
|
|
|
};
|
|
|
|
|
|
-export default observer(Nav);
|
|
|
+export default Nav;
|