fix: 修复强制刷新页面getTopMenu()函数获取不到path报错的问题

This commit is contained in:
xiaoxian521 2023-05-26 23:25:58 +08:00
parent 727216acce
commit b29500c4ed
3 changed files with 3 additions and 3 deletions

View File

@ -7,7 +7,7 @@ const props = defineProps({
});
const { title } = useNav();
const topPath = getTopMenu().path;
const topPath = getTopMenu()?.path;
</script>
<template>

View File

@ -50,7 +50,7 @@ const tabDom = ref();
const containerDom = ref();
const scrollbarDom = ref();
const isShowArrow = ref(false);
const topPath = getTopMenu().path;
const topPath = getTopMenu()?.path;
const { VITE_HIDE_HOME } = import.meta.env;
const { isFullscreen, toggle } = useFullscreen();

View File

@ -88,7 +88,7 @@ export function useNav() {
}
function backTopMenu() {
router.push(getTopMenu().path);
router.push(getTopMenu()?.path);
}
function onPanel() {