feat: openapi page

This commit is contained in:
archer
2023-04-07 22:48:21 +08:00
parent 43f8d6008f
commit 22cc9c85be
24 changed files with 190 additions and 94 deletions

View File

@@ -16,27 +16,27 @@ const unShowLayoutRoute: { [key: string]: boolean } = {
const navbarList = [
{
label: '介绍',
icon: 'icon-gongzuotai-01',
icon: 'board',
link: '/',
activeLink: ['/']
},
{
label: '模型',
icon: 'icon-moxing',
icon: 'model',
link: '/model/list',
activeLink: ['/model/list', '/model/detail']
},
// {
// label: '数据',
// icon: 'icon-datafull',
// link: '/data/list',
// activeLink: ['/data/list', '/data/detail']
// },
{
label: '账号',
icon: 'icon-yonghu-yuan',
icon: 'user',
link: '/number/setting',
activeLink: ['/number/setting']
},
{
label: '开发',
icon: 'develop',
link: '/openapi',
activeLink: ['/openapi']
}
];

View File

@@ -2,8 +2,7 @@ import React from 'react';
import { Box, Flex } from '@chakra-ui/react';
import Image from 'next/image';
import { useRouter } from 'next/router';
import Icon from '../Iconfont';
import MyIcon from '../Icon';
export enum NavbarTypeEnum {
normal = 'normal',
small = 'small'
@@ -66,20 +65,16 @@ const Navbar = ({
backgroundColor: 'transparent'
})}
>
<Icon
name={item.icon}
width={24}
height={24}
color={item.activeLink.includes(router.pathname) ? '#2B6CB0' : '#4A5568'}
<MyIcon
name={item.icon as any}
width={'24px'}
height={'24px'}
fill={item.activeLink.includes(router.pathname) ? '#2B6CB0' : '#4A5568'}
/>
<Box mt={1}>{item.label}</Box>
</Flex>
))}
</Box>
{/* 通知 icon */}
{/* <Flex className={styles.informIcon} mb={5} justifyContent={'center'}>
<Icon name={'icon-tongzhi'} width={28} height={28} color={'#718096'}></Icon>
</Flex> */}
</Flex>
);
};

View File

@@ -1,6 +1,6 @@
import React from 'react';
import { useRouter } from 'next/router';
import Icon from '../Iconfont';
import MyIcon from '../Icon';
import {
Flex,
Drawer,
@@ -39,9 +39,8 @@ const NavbarPhone = ({
px={7}
>
<Box onClick={onOpen}>
<Icon name="icon-caidan" width={20} height={20}></Icon>
<MyIcon name="menu" width={'20px'} height={'20px'} color={'blackAlpha.600'}></MyIcon>
</Box>
{/* <Icon name="icon-tongzhi" width={20} height={20}></Icon> */}
</Flex>
<Drawer isOpen={isOpen} placement="left" size={'xs'} onClose={onClose}>
<DrawerOverlay />
@@ -74,11 +73,11 @@ const NavbarPhone = ({
backgroundColor: 'transparent'
})}
>
<Icon
name={item.icon}
width={24}
height={24}
color={item.activeLink.includes(router.pathname) ? '#2B6CB0' : '#4A5568'}
<MyIcon
name={item.icon as any}
width={'24px'}
height={'24px'}
fill={item.activeLink.includes(router.pathname) ? '#2B6CB0' : '#4A5568'}
/>
<Box ml={5}>{item.label}</Box>
</Flex>