Template
1
0
mirror of https://github.com/un-pany/v3-admin-vite.git synced 2025-04-20 19:09:21 +08:00

perf: 代码优化 components/Screenfull

This commit is contained in:
pany 2023-05-22 13:46:45 +08:00
parent d50cba28af
commit d22a44396d

View File

@ -39,9 +39,7 @@ watchEffect((onCleanup) => {
screenfull.on("change", handleChange)
//
onCleanup(() => {
if (screenfull.isEnabled) {
screenfull.off("change", handleChange)
}
screenfull.isEnabled && screenfull.off("change", handleChange)
})
})
</script>