diff --git a/src/components/Breadcrumb/index.vue b/src/components/Breadcrumb/index.vue index 3e1f44f..80076b6 100644 --- a/src/components/Breadcrumb/index.vue +++ b/src/components/Breadcrumb/index.vue @@ -17,11 +17,11 @@ const levelList = ref([]) function getBreadcrumb() { // only show routes with meta.title let matched = route.matched.filter((item) => item.meta && item.meta.title) - // const first = matched[0] + const first = matched[0] // 判断是否为首页 - // if (!isDashboard(first)) { - // matched = [{ path: '/index', meta: { title: '首页' } }].concat(matched) - // } + if (!isDashboard(first)) { + matched = [{ path: '/index', meta: { title: '首页' } }].concat(matched) + } levelList.value = matched.filter((item) => item.meta && item.meta.title && item.meta.breadcrumb !== false) } diff --git a/src/layout/components/Settings/index.vue b/src/layout/components/Settings/index.vue index 7987a3d..8043cc7 100644 --- a/src/layout/components/Settings/index.vue +++ b/src/layout/components/Settings/index.vue @@ -124,8 +124,6 @@ const topNav = computed({ if (!val) { store.dispatch('app/toggleSideBarHide', false) store.commit('SET_SIDEBAR_ROUTERS', store.state.permission.defaultRoutes) - // TODO 临时解决切换topnav路由跳转问题 - setTimeout('window.location.reload()', 100) } }, }) @@ -254,7 +252,8 @@ function saveSetting() { showFooter: storeSettings.value.showFooter, } localStorage.setItem('layout-setting', JSON.stringify(layoutSetting)) - setTimeout(proxy.$modal.closeLoading(), 500) + setTimeout(proxy.$modal.closeLoading(), 100) + setTimeout('window.location.reload()', 200) } function resetSetting() { proxy.$modal.loading('正在清除设置缓存并刷新,请稍候...')