左下角切换模式,模拟式编辑

This commit is contained in:
sjl
2025-11-05 09:45:46 +08:00
parent e7c93d03aa
commit f6b4979e7c
2 changed files with 14 additions and 3 deletions

View File

@@ -72,7 +72,15 @@ const handelOpen = async (item: string, key: string) => {
// 强制刷新页面
await tabsStore.closeMultipleTab()
await initDynamicRouter()
await router.push({ path: '/home/index' })
// 只有当目标路径与当前路径不同时才跳转
if (router.currentRoute.value.path !== '/home/index') {
await router.push({ path: '/home/index' })
} else {
// 如果已在目标页面,手动触发组件更新
window.location.reload() // 或者采用其他方式刷新数据
}
}
</script>
<style scoped lang="scss">