Merge pull request #44 from moxi000/dev

feat: 优化配额管理页面 UI 与交互
This commit is contained in:
Supra4E8C
2026-01-04 23:38:44 +08:00
committed by GitHub
10 changed files with 286 additions and 95 deletions

View File

@@ -70,17 +70,27 @@ export function PageTransition({
: toIndex > fromIndex
? 'forward'
: 'backward';
setTransitionDirection(nextDirection);
setLayers((prev) => {
const prevCurrent = prev[prev.length - 1];
return [
prevCurrent
? { ...prevCurrent, status: 'exiting' }
: { key: location.key, location, status: 'exiting' },
{ key: location.key, location, status: 'current' },
];
let cancelled = false;
queueMicrotask(() => {
if (cancelled) return;
setTransitionDirection(nextDirection);
setLayers((prev) => {
const prevCurrent = prev[prev.length - 1];
return [
prevCurrent
? { ...prevCurrent, status: 'exiting' }
: { key: location.key, location, status: 'exiting' },
{ key: location.key, location, status: 'current' },
];
});
setIsAnimating(true);
});
setIsAnimating(true);
return () => {
cancelled = true;
};
}, [
isAnimating,
location,