perf: cancel round corner of window when full screen

This commit is contained in:
tiny-craft 2023-09-24 22:48:41 +08:00
parent e1d2e6c618
commit dbdec4bfcf
1 changed files with 10 additions and 1 deletions

View File

@ -74,6 +74,15 @@ watch(
}
},
)
const borderRadius = computed(() => {
if (isMacOS()) {
return WindowIsFullscreen().then((full) => {
return full ? '0' : '10px'
})
}
return '10px'
})
</script>
<template>
@ -81,7 +90,7 @@ watch(
<n-spin
:show="props.loading"
:theme-overrides="{ opacitySpinning: 0 }"
:style="{ backgroundColor: themeVars.bodyColor, borderRadius: WindowIsFullscreen() ? '0' : '10px' }">
:style="{ backgroundColor: themeVars.bodyColor, borderRadius }">
<div
id="app-content-wrapper"
class="flex-box-v"