主页模式切换
This commit is contained in:
@@ -64,9 +64,14 @@ onMounted(() => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
const handelOpen = async (item: string) => {
|
const handelOpen = async (item: string) => {
|
||||||
await authStore.setShowMenu();
|
await authStore.setShowMenu();
|
||||||
modeStore.setCurrentMode(item); // 将模式code存入 store
|
modeStore.setCurrentMode(item); // 将模式code存入 store
|
||||||
router.push({ path: "/home/index" });
|
if (router.currentRoute.value.path === '/home/index') {
|
||||||
|
// 强制刷新页面
|
||||||
|
window.location.reload();
|
||||||
|
} else {
|
||||||
|
router.push({ path: '/home/index' });
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user