perf: ♻️ Search interaction

This commit is contained in:
viarotel 2024-05-15 11:56:56 +08:00
parent 091d5035dd
commit a195b7ead7
2 changed files with 7 additions and 1 deletions

View File

@ -16,9 +16,12 @@ export default () => {
}
function close() {
remote.getCurrentWebContents().stopFindInPage('clearSelection')
if (!findInPage) {
return false
}
return findInPage.closeFindWindow()
}
@ -62,6 +65,8 @@ export default () => {
: {}),
})
console.log('findInPage', findInPage)
return findInPage
}

View File

@ -15,7 +15,7 @@
</template>
<script setup>
import { useThemeStore } from '$/store'
import { useThemeStore } from '$/store/theme/index.js'
const themeStore = useThemeStore()
@ -32,6 +32,7 @@ window.electron.ipcRenderer.on('focus-on-search', (event, ret) => {
function openPageModal() {
window.findInPageModal.open({ isDark: themeStore.isDark })
}
function closePageModal() {
window.findInPageModal.close()
}