mirror of
https://github.com/un-pany/v3-admin-vite.git
synced 2025-04-20 10:59:21 +08:00
perf: 优化 ThemeSwitch 组件细节
This commit is contained in:
parent
30b4754493
commit
61997fd102
@ -14,9 +14,7 @@ function handleChangeTheme({ clientX, clientY }: MouseEvent, themeName: ThemeNam
|
||||
style.setProperty("--v3-theme-x", `${clientX}px`)
|
||||
style.setProperty("--v3-theme-y", `${clientY}px`)
|
||||
style.setProperty("--v3-theme-r", `${maxRadius}px`)
|
||||
const handler = () => {
|
||||
setTheme(themeName)
|
||||
}
|
||||
const handler = () => setTheme(themeName)
|
||||
document.startViewTransition ? document.startViewTransition(handler) : handler()
|
||||
}
|
||||
</script>
|
||||
|
Loading…
x
Reference in New Issue
Block a user