Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

style: format code with Prettier and StandardJS #492

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions src/pages/layout/proSecNav/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
QuestionCircleOutlined,
FireOutlined,
GlobalOutlined,
QrcodeOutlined,
QrcodeOutlined
} from '@ant-design/icons'

import styles from './index.module.less'
Expand All @@ -19,7 +19,7 @@ const pathSubmenu = {
'/home': ['home'],
'/coupons/add': ['/sub-act', '/sub-coupons'],
'/coupons/edit': ['/sub-act', '/sub-coupons'],
'/product': ['/sub-act', '/sub-coupons'],
'/product': ['/sub-act', '/sub-coupons']
}

const ProSecNav = () => {
Expand All @@ -45,7 +45,7 @@ const ProSecNav = () => {
useEffect(() => {
const selectedPathKey = pathname
setSelectedKeys([selectedPathKey])
setOpenKeys(isOpenChange ? openKeys : (pathSubmenu[pathname] ?? openKeys))
setOpenKeys(isOpenChange ? openKeys : pathSubmenu[pathname] ?? openKeys)
}, [pathname, openKeys, isOpenChange])

const onOpenChange = (keys) => {
Expand Down Expand Up @@ -99,37 +99,37 @@ const ProSecNav = () => {
icon: <FireOutlined />,
children: [
{ label: 'Vue', key: '/coupons/add' },
{ label: 'Angular', key: '/coupons/edit' },
],
{ label: 'Angular', key: '/coupons/edit' }
]
},
{ label: '后端技术栈', key: '/product', icon: <DeploymentUnitOutlined /> },
],
{ label: '后端技术栈', key: '/product', icon: <DeploymentUnitOutlined /> }
]
},
{
label: '构建工具',
key: '/sub-list',
icon: <ApartmentOutlined />,
children: [
{ label: 'Webpack', key: '/coupons/list' },
{ label: 'Vite', key: '/order/list' },
],
{ label: 'Vite', key: '/order/list' }
]
},
{
label: 'Error',
key: '/sub-error',
icon: <QuestionCircleOutlined />,
children: [{ label: 'ErrorBoundary', key: '/error' }],
},
children: [{ label: 'ErrorBoundary', key: '/error' }]
}
]

return (
<Menu
mode="inline"
mode='inline'
defaultSelectedKeys={selectedKeys}
defaultOpenKeys={openKeys}
selectedKeys={selectedKeys}
openKeys={openKeys}
theme="light"
theme='light'
className={styles.menu}
onOpenChange={onOpenChange}
onSelect={onSelect}
Expand Down
12 changes: 6 additions & 6 deletions src/pages/reactGantt/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const ReactGantt = () => {
duration: 1,
progress: 2,
type: 'task',
lazy: false,
lazy: false
},
{
id: 47,
Expand All @@ -21,7 +21,7 @@ const ReactGantt = () => {
duration: 8,
progress: 0,
parent: 0,
type: 'summary',
type: 'summary'
},
{
id: 22,
Expand All @@ -31,7 +31,7 @@ const ReactGantt = () => {
duration: 8,
progress: 0,
parent: 47,
type: 'task',
type: 'task'
},
{
id: 21,
Expand All @@ -41,15 +41,15 @@ const ReactGantt = () => {
duration: 3,
progress: 0,
type: 'task',
lazy: false,
},
lazy: false
}
]

const links = [{ id: 1, source: 20, target: 21, type: 'e2e' }]

const scales = [
{ unit: 'month', step: 1, format: 'MMMM yyy' },
{ unit: 'day', step: 1, format: 'd' },
{ unit: 'day', step: 1, format: 'd' }
]

return (
Expand Down
Loading
Loading