fix: remove tabindex of div due to black window edge

This commit is contained in:
Lykin 2024-08-06 23:02:29 +08:00
parent b26f5d2bde
commit a3cb09863a
1 changed files with 7 additions and 2 deletions

View File

@ -1,7 +1,7 @@
<script setup> <script setup>
import ContentPane from './components/content/ContentPane.vue' import ContentPane from './components/content/ContentPane.vue'
import BrowserPane from './components/sidebar/BrowserPane.vue' import BrowserPane from './components/sidebar/BrowserPane.vue'
import { computed, onMounted, reactive, ref, watchEffect } from 'vue' import { computed, onMounted, onUnmounted, reactive, ref, watchEffect } from 'vue'
import { debounce } from 'lodash' import { debounce } from 'lodash'
import { useThemeVars } from 'naive-ui' import { useThemeVars } from 'naive-ui'
import Ribbon from './components/sidebar/Ribbon.vue' import Ribbon from './components/sidebar/Ribbon.vue'
@ -117,6 +117,11 @@ onMounted(async () => {
onToggleFullscreen(fullscreen === true) onToggleFullscreen(fullscreen === true)
const maximised = await WindowIsMaximised() const maximised = await WindowIsMaximised()
onToggleMaximize(maximised) onToggleMaximize(maximised)
window.addEventListener('keydown', onKeyShortcut)
})
onUnmounted(() => {
window.removeEventListener('keydown', onKeyShortcut)
}) })
const onKeyShortcut = (e) => { const onKeyShortcut = (e) => {
@ -138,7 +143,7 @@ const onKeyShortcut = (e) => {
<template> <template>
<!-- app content--> <!-- app content-->
<n-spin :show="props.loading" :style="spinStyle" :theme-overrides="{ opacitySpinning: 0 }"> <n-spin :show="props.loading" :style="spinStyle" :theme-overrides="{ opacitySpinning: 0 }">
<div id="app-content-wrapper" :style="wrapperStyle" class="flex-box-v" tabindex="0" @keydown="onKeyShortcut"> <div id="app-content-wrapper" :style="wrapperStyle" class="flex-box-v">
<!-- title bar --> <!-- title bar -->
<div <div
id="app-toolbar" id="app-toolbar"