diff --git a/src/pages/layout/proSecNav/index.jsx b/src/pages/layout/proSecNav/index.jsx index cc49e541..3c5f88dd 100644 --- a/src/pages/layout/proSecNav/index.jsx +++ b/src/pages/layout/proSecNav/index.jsx @@ -10,7 +10,7 @@ import { QuestionCircleOutlined, FireOutlined, GlobalOutlined, - QrcodeOutlined, + QrcodeOutlined } from '@ant-design/icons' import styles from './index.module.less' @@ -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 = () => { @@ -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) => { @@ -99,11 +99,11 @@ const ProSecNav = () => { icon: , children: [ { label: 'Vue', key: '/coupons/add' }, - { label: 'Angular', key: '/coupons/edit' }, - ], + { label: 'Angular', key: '/coupons/edit' } + ] }, - { label: '后端技术栈', key: '/product', icon: }, - ], + { label: '后端技术栈', key: '/product', icon: } + ] }, { label: '构建工具', @@ -111,25 +111,25 @@ const ProSecNav = () => { icon: , children: [ { label: 'Webpack', key: '/coupons/list' }, - { label: 'Vite', key: '/order/list' }, - ], + { label: 'Vite', key: '/order/list' } + ] }, { label: 'Error', key: '/sub-error', icon: , - children: [{ label: 'ErrorBoundary', key: '/error' }], - }, + children: [{ label: 'ErrorBoundary', key: '/error' }] + } ] return ( { duration: 1, progress: 2, type: 'task', - lazy: false, + lazy: false }, { id: 47, @@ -21,7 +21,7 @@ const ReactGantt = () => { duration: 8, progress: 0, parent: 0, - type: 'summary', + type: 'summary' }, { id: 22, @@ -31,7 +31,7 @@ const ReactGantt = () => { duration: 8, progress: 0, parent: 47, - type: 'task', + type: 'task' }, { id: 21, @@ -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 ( diff --git a/src/routers/index.jsx b/src/routers/index.jsx index 8b90ce77..c78e435f 100644 --- a/src/routers/index.jsx +++ b/src/routers/index.jsx @@ -64,7 +64,7 @@ const rootRouter = [ key: '/', i18nKey: 'home', auth: true, - element: lazyLoad(Home), + element: lazyLoad(Home) }, { index: false, @@ -73,7 +73,7 @@ const rootRouter = [ i18nKey: 'demo', key: '/demo', auth: true, - element: lazyLoad(Demo), + element: lazyLoad(Demo) }, { index: false, @@ -81,7 +81,7 @@ const rootRouter = [ name: 'Parallax', key: '/parallax', auth: true, - element: lazyLoad(ParallaxVert), + element: lazyLoad(ParallaxVert) }, { index: false, @@ -89,7 +89,7 @@ const rootRouter = [ name: 'gantt', key: '/gantt', auth: false, - element: lazyLoad(ReactGantt), + element: lazyLoad(ReactGantt) }, { index: false, @@ -97,7 +97,7 @@ const rootRouter = [ name: 'QrGenerate', key: '/qrcode', auth: true, - element: lazyLoad(QrCode), + element: lazyLoad(QrCode) }, { index: false, @@ -105,7 +105,7 @@ const rootRouter = [ name: 'React Tilt', key: '/tilt', auth: true, - element: lazyLoad(ReactTilt), + element: lazyLoad(ReactTilt) }, { index: false, @@ -113,7 +113,7 @@ const rootRouter = [ name: 'React Music', key: '/music', auth: false, - element: lazyLoad(ReactMusic), + element: lazyLoad(ReactMusic) }, { index: false, @@ -121,7 +121,7 @@ const rootRouter = [ name: 'React Video', key: '/video', auth: false, - element: lazyLoad(MyVideo), + element: lazyLoad(MyVideo) }, { index: false, @@ -129,7 +129,7 @@ const rootRouter = [ name: 'React Crypto', key: '/crypto', auth: false, - element: lazyLoad(MyCrypto), + element: lazyLoad(MyCrypto) }, { index: false, @@ -137,7 +137,7 @@ const rootRouter = [ name: 'ChatGPT Markmap', key: '/markmap', auth: false, - element: lazyLoad(ChatGpt), + element: lazyLoad(ChatGpt) }, { index: false, @@ -145,7 +145,7 @@ const rootRouter = [ name: 'ChatGPT Mermaid', key: '/mermaid', auth: false, - element: lazyLoad(Mermaid), + element: lazyLoad(Mermaid) }, { index: false, @@ -153,7 +153,7 @@ const rootRouter = [ name: 'PrismRender', key: '/prism', auth: true, - element: lazyLoad(PrismRender), + element: lazyLoad(PrismRender) }, { index: false, @@ -161,7 +161,7 @@ const rootRouter = [ name: 'ReactThree', key: '/three', auth: true, - element: lazyLoad(ReactThree), + element: lazyLoad(ReactThree) }, { index: false, @@ -169,7 +169,7 @@ const rootRouter = [ name: 'Geo', key: '/geo', auth: false, - element: lazyLoad(GeoChart), + element: lazyLoad(GeoChart) }, { index: false, @@ -177,7 +177,7 @@ const rootRouter = [ name: 'ReactEcharts', key: '/echarts', auth: true, - element: lazyLoad(Echarts), + element: lazyLoad(Echarts) }, { index: false, @@ -185,7 +185,7 @@ const rootRouter = [ name: 'DynamicModal', key: '/dynamic', auth: false, - element: lazyLoad(DynamicModal), + element: lazyLoad(DynamicModal) }, { index: false, @@ -193,7 +193,7 @@ const rootRouter = [ name: 'BigScreen', key: '/big-screen', auth: false, - element: lazyLoad(BigScreen), + element: lazyLoad(BigScreen) }, { index: false, @@ -201,7 +201,7 @@ const rootRouter = [ name: 'reactAmap', key: '/react-amap', auth: false, - element: lazyLoad(ReactAmap), + element: lazyLoad(ReactAmap) }, { index: false, @@ -209,7 +209,7 @@ const rootRouter = [ name: 'PostMessage', key: '/postmessage', auth: false, - element: lazyLoad(PostMessage), + element: lazyLoad(PostMessage) }, { index: false, @@ -217,7 +217,7 @@ const rootRouter = [ name: 'myIframe', key: '/my-iframe', auth: false, - element: lazyLoad(MyIframe), + element: lazyLoad(MyIframe) }, { index: false, @@ -225,7 +225,7 @@ const rootRouter = [ name: 'SuperMap', key: '/super-map', auth: false, - element: lazyLoad(SuperMap), + element: lazyLoad(SuperMap) }, { index: false, @@ -233,7 +233,7 @@ const rootRouter = [ name: 'D3Chart', key: '/d3-chart', auth: false, - element: lazyLoad(D3Chart), + element: lazyLoad(D3Chart) }, { index: false, @@ -241,7 +241,7 @@ const rootRouter = [ name: 'Barcode', key: '/barcode', auth: false, - element: lazyLoad(Barcode), + element: lazyLoad(Barcode) }, { index: false, @@ -249,7 +249,7 @@ const rootRouter = [ name: 'PdfView', key: '/pdf-view', auth: false, - element: lazyLoad(ReactPdf), + element: lazyLoad(ReactPdf) }, { index: false, @@ -257,7 +257,7 @@ const rootRouter = [ name: 'Print', key: '/print', auth: false, - element: lazyLoad(Print), + element: lazyLoad(Print) }, { index: false, @@ -273,7 +273,7 @@ const rootRouter = [ name: 'React', key: '/coupons/home', auth: false, - element: lazyLoad(CouponsHome), + element: lazyLoad(CouponsHome) }, { index: false, @@ -281,7 +281,7 @@ const rootRouter = [ path: 'add', key: '/coupons/add', auth: false, - element: lazyLoad(CouponsAdd), + element: lazyLoad(CouponsAdd) }, { index: false, @@ -289,7 +289,7 @@ const rootRouter = [ name: 'Angular', key: '/coupons/edit', auth: false, - element: lazyLoad(CouponsEdit), + element: lazyLoad(CouponsEdit) }, { index: false, @@ -297,9 +297,9 @@ const rootRouter = [ name: 'Node', key: '/coupons/detail', auth: false, - element: lazyLoad(CouponsDetail), - }, - ], + element: lazyLoad(CouponsDetail) + } + ] }, { index: false, @@ -307,7 +307,7 @@ const rootRouter = [ name: '后端技术栈', key: '/product', auth: false, - element: lazyLoad(Product), + element: lazyLoad(Product) }, { index: false, @@ -315,15 +315,15 @@ const rootRouter = [ name: 'Error', key: '/error', auth: false, - element: lazyLoad(ErrorPage), + element: lazyLoad(ErrorPage) }, { path: '*', name: 'No Match', key: '*', - element: lazyLoad(NoMatch), - }, - ], + element: lazyLoad(NoMatch) + } + ] }, { index: false, @@ -331,7 +331,7 @@ const rootRouter = [ name: '登录', key: '/signin', auth: false, - element: lazyLoad(SignIn), + element: lazyLoad(SignIn) }, { index: false, @@ -339,7 +339,7 @@ const rootRouter = [ name: '注册', key: '/signup', auth: false, - element: lazyLoad(SignUp), + element: lazyLoad(SignUp) }, { index: false, @@ -347,7 +347,7 @@ const rootRouter = [ name: 'Dashboard', key: '/dashboard', auth: true, - element: lazyLoad(Dashboard), + element: lazyLoad(Dashboard) }, { index: false, @@ -355,14 +355,14 @@ const rootRouter = [ name: '403', key: '/403', auth: false, - element: lazyLoad(Exception403), + element: lazyLoad(Exception403) }, { path: '*', name: 'No Match', key: '*', - element: lazyLoad(NoMatch), - }, + element: lazyLoad(NoMatch) + } ] export default rootRouter diff --git a/src/utils/publicFn/index.jsx b/src/utils/publicFn/index.jsx index d9adde2a..0afb01eb 100644 --- a/src/utils/publicFn/index.jsx +++ b/src/utils/publicFn/index.jsx @@ -20,7 +20,7 @@ export const getKeyName = (pathName = '/404') => { title: 'Not Found', tabKey: '/404', element: , - i18nKey: 'notFound', + i18nKey: 'notFound' } } @@ -67,7 +67,7 @@ export const formatTime = (date, format) => { dd: padZero(date.getDate()), HH: padZero(date.getHours()), mm: padZero(date.getMinutes()), - ss: padZero(date.getSeconds()), + ss: padZero(date.getSeconds()) } return format.replace(/yyyy|MM|dd|HH|mm|ss/g, (match) => map[match]) @@ -126,7 +126,7 @@ export const groupBy = (arr, groupFn) => arr.reduce( (grouped, obj) => ({ ...grouped, - [groupFn(obj)]: [...(grouped[groupFn(obj)] || []), obj], + [groupFn(obj)]: [...(grouped[groupFn(obj)] || []), obj] }), {} )