mirror of
https://github.com/vbenjs/vue-vben-admin.git
synced 2025-01-24 02:00:25 +08:00
fix(transition): fix transition not work close #334
This commit is contained in:
parent
7156e47c18
commit
7d8b8db256
@ -7,6 +7,7 @@
|
|||||||
### 🐛 Bug Fixes
|
### 🐛 Bug Fixes
|
||||||
|
|
||||||
- 确保 `table action` 的值被正确更新
|
- 确保 `table action` 的值被正确更新
|
||||||
|
- 修复页面切换的动画无法关闭
|
||||||
|
|
||||||
## 2.0.3 (2021-03-07)
|
## 2.0.3 (2021-03-07)
|
||||||
|
|
||||||
|
@ -18,12 +18,16 @@ export function getTransitionName({
|
|||||||
def: string;
|
def: string;
|
||||||
cacheTabs: string[];
|
cacheTabs: string[];
|
||||||
}) {
|
}) {
|
||||||
|
if (!enableTransition) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
const isInCache = cacheTabs.includes(route.name as string);
|
const isInCache = cacheTabs.includes(route.name as string);
|
||||||
const transitionName = 'fade-slide';
|
const transitionName = 'fade-slide';
|
||||||
let name: string | null = transitionName;
|
let name: string | null = transitionName;
|
||||||
|
|
||||||
if (openCache) {
|
if (openCache) {
|
||||||
name = isInCache && route.meta.loaded && enableTransition ? transitionName : null;
|
name = isInCache && route.meta.loaded ? transitionName : null;
|
||||||
}
|
}
|
||||||
return name || route.meta.transitionName || def;
|
return name || route.meta.transitionName || def;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user