diff --git a/components/WalineComponent.js b/components/WalineComponent.js index 09983f23..c3da56ab 100644 --- a/components/WalineComponent.js +++ b/components/WalineComponent.js @@ -62,8 +62,10 @@ const WalineComponent = (props) => { } return () => { - waline.destroy() - waline = null + if (waline) { + waline.destroy() + waline = null + } router.events.off('routeChangeComplete', updateWaline) } }, []) diff --git a/themes/next/LayoutBase.js b/themes/next/LayoutBase.js index 3f0043a2..e178da0f 100644 --- a/themes/next/LayoutBase.js +++ b/themes/next/LayoutBase.js @@ -69,6 +69,7 @@ const LayoutBase = (props) => {
+ {/* 左侧栏样式 */}
{onLoading ? : <> {children} } diff --git a/themes/next/components/MenuButtonGroup.js b/themes/next/components/MenuButtonGroup.js index 07cb95fc..b6930e5f 100644 --- a/themes/next/components/MenuButtonGroup.js +++ b/themes/next/components/MenuButtonGroup.js @@ -10,22 +10,23 @@ const MenuButtonGroup = (props) => { const router = useRouter() const archiveSlot =
{postCount}
- let links = [ + const defaultLinks = [ { icon: 'fas fa-home', name: locale.NAV.INDEX, to: '/' || '/', show: true }, { icon: 'fas fa-th', name: locale.COMMON.CATEGORY, to: '/category', show: CONFIG_NEXT.MENU_CATEGORY }, { icon: 'fas fa-tag', name: locale.COMMON.TAGS, to: '/tag', show: CONFIG_NEXT.MENU_TAG }, { icon: 'fas fa-archive', name: locale.NAV.ARCHIVE, to: '/archive', slot: archiveSlot, show: CONFIG_NEXT.MENU_ARCHIVE }, { icon: 'fas fa-user', name: locale.NAV.ABOUT, to: '/about', show: CONFIG_NEXT.MENU_ABOUT } ] + let links = [].concat(defaultLinks) if (customNav) { - links = links.concat(customNav) + links = defaultLinks.concat(customNav) } return