From 3a334a79e3203b4f295b3d147e6d3aec705dd78f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A2=A8=E7=A6=BB?= <217348180+molikaicode@users.noreply.github.com> Date: Fri, 4 Jul 2025 08:59:00 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=85=BC=E5=AE=B9=E4=B8=8D=E6=94=AF?= =?UTF-8?q?=E6=8C=81=20startViewTransition=20=E6=96=B9=E6=B3=95=E7=9A=84?= =?UTF-8?q?=E6=B5=8F=E8=A7=88=E5=99=A8=E7=8E=AF=E5=A2=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes #195 --- web/src/store/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/src/store/index.js b/web/src/store/index.js index 2f40f47..05706c0 100644 --- a/web/src/store/index.js +++ b/web/src/store/index.js @@ -191,7 +191,7 @@ const useStore = defineStore('global', { localStorage.setItem('isDark', isDark) this.$patch({ isDark }) } - if (animate) { + if (animate && typeof document.startViewTransition === 'function') { let transition = document.startViewTransition(() => { document.documentElement.classList.toggle('dark') })