From 4a2dbbf1d904653763f664704f728318987d1351 Mon Sep 17 00:00:00 2001 From: wang <1509326266@qq.com> Date: Sat, 27 Jul 2024 22:46:14 +0800 Subject: [PATCH] feat(components): add theme switching animation --- src/components/common/theme-schema-switch.vue | 52 ++++++++++++++----- src/layouts/modules/global-header/index.vue | 6 +-- src/styles/css/global.css | 18 +++++++ src/views/_builtin/login/index.vue | 7 +-- 4 files changed, 58 insertions(+), 25 deletions(-) diff --git a/src/components/common/theme-schema-switch.vue b/src/components/common/theme-schema-switch.vue index 78050d4f..ffea5216 100644 --- a/src/components/common/theme-schema-switch.vue +++ b/src/components/common/theme-schema-switch.vue @@ -1,13 +1,12 @@ diff --git a/src/layouts/modules/global-header/index.vue b/src/layouts/modules/global-header/index.vue index cd640ba4..80bd3fbc 100644 --- a/src/layouts/modules/global-header/index.vue +++ b/src/layouts/modules/global-header/index.vue @@ -41,11 +41,7 @@ const { isFullscreen, toggle } = useFullscreen(); - + diff --git a/src/styles/css/global.css b/src/styles/css/global.css index 141d4de0..0925ad8e 100644 --- a/src/styles/css/global.css +++ b/src/styles/css/global.css @@ -15,3 +15,21 @@ html { html.grayscale { filter: grayscale(100%); } + +::view-transition-old(root), +::view-transition-new(root) { + animation: none; + mix-blend-mode: normal; +} +::view-transition-old(root) { + z-index: 1; +} +::view-transition-new(root) { + z-index: 9999; +} +.dark::view-transition-old(root) { + z-index: 9999; +} +.dark::view-transition-new(root) { + z-index: 1; +} diff --git a/src/views/_builtin/login/index.vue b/src/views/_builtin/login/index.vue index bf487d93..30409556 100644 --- a/src/views/_builtin/login/index.vue +++ b/src/views/_builtin/login/index.vue @@ -59,12 +59,7 @@ const bgColor = computed(() => {

{{ $t('system.title') }}

- +