Skip to content
Closed
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
12 changes: 6 additions & 6 deletions src/pages/layout/proSecNav/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@ import { annotatedRootRouter, flattenRoutes } from '@src/routers'

import styles from './index.module.less'

import { mainLayoutMenu } from '@src/config/menu.config'

const PAGE_EXTENSIONS = ['.jsx', '.tsx', '.js', '.ts']
const PAGE_CANDIDATE_TEMPLATES = [
(path, ext) => `/src/pages${path}${ext}`,
(path, ext) => `/src/pages${path}/index${ext}`,
(path, ext) => `/src/pages${path}/index${ext}`
]

const pageModules = import.meta?.glob?.('/src/pages/**/*.{js,jsx,ts,tsx}') ?? {}
Expand Down Expand Up @@ -66,8 +68,6 @@ const resolvePageModuleKey = (() => {
}
})()

import { mainLayoutMenu } from '@src/config/menu.config'

let lazyComponentsCache = null
let lazyComponentsPromise = null
const loadLazyComponents = () => {
Expand Down Expand Up @@ -208,7 +208,7 @@ const ProSecNav = ({ mode = 'inline', theme = 'light', onMenuClick }) => {
}

return (
<span onMouseEnter={onPreload} role="menuitem" tabIndex={0}>
<span onMouseEnter={onPreload} role='menuitem' tabIndex={0}>
{labelText || path}
</span>
)
Expand All @@ -228,7 +228,7 @@ const ProSecNav = ({ mode = 'inline', theme = 'light', onMenuClick }) => {
const base = {
...rest,
path,
label: Label,
label: Label
}
if (children && Array.isArray(children)) {
const validChildren = children.map(translateItem).filter(Boolean)
Expand Down Expand Up @@ -433,7 +433,7 @@ const ProSecNav = ({ mode = 'inline', theme = 'light', onMenuClick }) => {
ProSecNav.propTypes = {
mode: PropTypes.string,
theme: PropTypes.string,
onMenuClick: PropTypes.func,
onMenuClick: PropTypes.func
}

export default ProSecNav
Loading