HaHa
4 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
4 additions and
1 deletions
-
packages/effects/layouts/src/widgets/theme-toggle/theme-button.vue
|
|
|
@ -64,7 +64,7 @@ function toggleTheme(event: MouseEvent) { |
|
|
|
`circle(0px at ${x}px ${y}px)`, |
|
|
|
`circle(${endRadius}px at ${x}px ${y}px)`, |
|
|
|
]; |
|
|
|
document.documentElement.animate( |
|
|
|
const animate = document.documentElement.animate( |
|
|
|
{ |
|
|
|
clipPath: isDark.value ? [...clipPath].reverse() : clipPath, |
|
|
|
}, |
|
|
|
@ -76,6 +76,9 @@ function toggleTheme(event: MouseEvent) { |
|
|
|
: '::view-transition-new(root)', |
|
|
|
}, |
|
|
|
); |
|
|
|
animate.onfinish = () => { |
|
|
|
transition.skipTransition(); |
|
|
|
}; |
|
|
|
}); |
|
|
|
} |
|
|
|
</script> |
|
|
|
|