导航样式调整

This commit is contained in:
2betop 2020-06-08 18:55:59 +08:00
parent 7e1ffc4cca
commit f8116effe1
2 changed files with 3 additions and 7 deletions

View File

@ -104,6 +104,7 @@ if (process.env.NODE_ENV === 'production') {
const navigations = [ const navigations = [
Docs, Docs,
{ {
prefix: ({classnames: cx}) => <li className={cx('AsideNav-divider')} />,
label: '示例', label: '示例',
children: [ children: [
{ {
@ -535,8 +536,6 @@ const navigations = [
} }
] ]
} }
]; ];
function isActive(link, location) { function isActive(link, location) {
@ -897,10 +896,7 @@ export default function entry({pathPrefix}) {
return ( return (
<Router history={history}> <Router history={history}>
<Route component={App}> <Route component={App}>
<Redirect <Redirect from={`${ContextPath}/`} to={`${ContextPath}/docs/intro`} />
from={`${ContextPath}/`}
to={`${ContextPath}/docs/intro`}
/>
<Redirect from={`${PathPrefix}/`} to={`/docs/intro`} /> <Redirect from={`${PathPrefix}/`} to={`/docs/intro`} />
{navigations2route(PathPrefix)} {navigations2route(PathPrefix)}
<Route path="*" component={NotFound} /> <Route path="*" component={NotFound} />

View File

@ -2,7 +2,7 @@ import React from 'react';
import makeMarkdownRenderer from './MdRenderer'; import makeMarkdownRenderer from './MdRenderer';
export default { export default {
prefix: ({classnames: cx}) => <li className={cx('AsideNav-divider')} />, // prefix: ({classnames: cx}) => <li className={cx('AsideNav-divider')} />,
label: '文档', label: '文档',
children: [ children: [
{ {