From 1628cf60af75e673ad45ff466160d04a233f7a86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vi=CC=81ctor=20CG?= Date: Mon, 29 Jul 2024 12:57:08 +0200 Subject: [PATCH] refactor(staggered-fade-and-slide): use Vue native staggered transition --- .../src/components/animations/index.ts | 1 + .../test-staggered-fade-and-slide.vue | 68 +++++++++ packages/_vue3-migration-test/src/router.ts | 8 +- .../animations/staggered-fade-and-slide.vue | 139 +++++++++++++----- .../x-components/src/components/base-grid.vue | 74 ++++------ packages/x-components/src/views/home/Home.vue | 7 +- 6 files changed, 215 insertions(+), 82 deletions(-) create mode 100644 packages/_vue3-migration-test/src/components/animations/test-staggered-fade-and-slide.vue diff --git a/packages/_vue3-migration-test/src/components/animations/index.ts b/packages/_vue3-migration-test/src/components/animations/index.ts index b951da74a4..ca0d8338a1 100644 --- a/packages/_vue3-migration-test/src/components/animations/index.ts +++ b/packages/_vue3-migration-test/src/components/animations/index.ts @@ -5,3 +5,4 @@ export { default as TestCrossFade } from './test-cross-fade.vue'; export { default as TestFade } from './test-fade.vue'; export { default as TestFadeAndSlide } from './test-fade-and-slide.vue'; export { default as TestAnimationFactory } from './test-animation-factory.vue'; +export { default as TestStaggeredFadeAndSlide } from './test-staggered-fade-and-slide.vue'; diff --git a/packages/_vue3-migration-test/src/components/animations/test-staggered-fade-and-slide.vue b/packages/_vue3-migration-test/src/components/animations/test-staggered-fade-and-slide.vue new file mode 100644 index 0000000000..dadcd355f5 --- /dev/null +++ b/packages/_vue3-migration-test/src/components/animations/test-staggered-fade-and-slide.vue @@ -0,0 +1,68 @@ + + + diff --git a/packages/_vue3-migration-test/src/router.ts b/packages/_vue3-migration-test/src/router.ts index c188737156..b6a8ec7597 100644 --- a/packages/_vue3-migration-test/src/router.ts +++ b/packages/_vue3-migration-test/src/router.ts @@ -49,7 +49,8 @@ import { TestRenderlessExtraParam, TestAnimationFactory, TestIcons, - TestDisplayEmitter + TestDisplayEmitter, + TestStaggeredFadeAndSlide } from './'; const routes = [ @@ -302,6 +303,11 @@ const routes = [ path: '/display-emitter', name: 'DisplayEmitter', component: TestDisplayEmitter + }, + { + path: '/staggered-fade-and-slide', + name: 'StaggeredFadeAndSlide', + component: TestStaggeredFadeAndSlide } ]; diff --git a/packages/x-components/src/components/animations/staggered-fade-and-slide.vue b/packages/x-components/src/components/animations/staggered-fade-and-slide.vue index bc2a484abd..86dc978b32 100644 --- a/packages/x-components/src/components/animations/staggered-fade-and-slide.vue +++ b/packages/x-components/src/components/animations/staggered-fade-and-slide.vue @@ -1,15 +1,19 @@ - diff --git a/packages/x-components/src/components/base-grid.vue b/packages/x-components/src/components/base-grid.vue index 86ed995de2..c89abc01ea 100644 --- a/packages/x-components/src/components/base-grid.vue +++ b/packages/x-components/src/components/base-grid.vue @@ -1,7 +1,6 @@