Skip to content

Commit

Permalink
feat: change default router link
Browse files Browse the repository at this point in the history
  • Loading branch information
zzcr committed Dec 5, 2024
1 parent 5669126 commit 6efec4c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/sites/src/router.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { createRouter, createWebHistory } from 'vue-router'
import Layout from '@/views/layout/layout.vue'
import { LANG_KEY, LANG_PATH_MAP, ZH_CN_LANG, CURRENT_THEME_KEY, THEME_ROUTE_MAP, SMB_THEME } from './const'
import { LANG_KEY, LANG_PATH_MAP, ZH_CN_LANG, CURRENT_THEME_KEY, THEME_ROUTE_MAP, DEFAULT_THEME } from './const'
import { $local } from './tools/storage'

const Components = () => import('@/views/components/components.vue')
Expand Down Expand Up @@ -38,7 +38,7 @@ let routes = [
const lang = $local[LANG_KEY]
const langPath = LANG_PATH_MAP[lang] || LANG_PATH_MAP[ZH_CN_LANG]
const themeKey = localStorage.getItem(CURRENT_THEME_KEY)
const theme = THEME_ROUTE_MAP[themeKey] || THEME_ROUTE_MAP[SMB_THEME]
const theme = THEME_ROUTE_MAP[themeKey] || THEME_ROUTE_MAP[DEFAULT_THEME]
return { path: `${context}${langPath}/${theme}/overview` }
}
}
Expand Down

0 comments on commit 6efec4c

Please sign in to comment.