perf: 优化路由动画切换 1、切换出现双页面问题 2、切换出现横向和纵向滚动条问题

This commit is contained in:
zhongming4762
2026-08-05 19:14:12 +08:00
parent 9f5b1cd9fb
commit d3dc081b5d
3 changed files with 32 additions and 4 deletions

View File

@@ -9,7 +9,7 @@ import type {
import type { TabDefinition } from '@vben-core/typings';
import { markRaw, toRaw } from 'vue';
import { markRaw, nextTick, toRaw } from 'vue';
import { preferences } from '@vben-core/preferences';
import {
@@ -415,7 +415,8 @@ export const useTabbarStore = defineStore('core-tabbar', {
this.renderRouteView = false;
startProgress();
await new Promise((resolve) => setTimeout(resolve, 200));
await nextTick();
// await new Promise((resolve) => setTimeout(resolve, 200));
this.excludeCachedTabs.delete(name as string);
this.renderRouteView = true;