From c78dd9c4b6320dacae10cb76a6f52610c6a18cc4 Mon Sep 17 00:00:00 2001 From: wangwei1240 Date: Thu, 16 May 2024 20:13:45 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=20#364?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderer/components/search.vue | 3 ++- src/renderer/plugins-manager/index.ts | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/renderer/components/search.vue b/src/renderer/components/search.vue index 1d60d0d..83c5a51 100644 --- a/src/renderer/components/search.vue +++ b/src/renderer/components/search.vue @@ -96,7 +96,7 @@ const emit = defineEmits([ ]); const keydownEvent = (e, key: string) => { - e.preventDefault(); + key !== 'space' && e.preventDefault(); const { ctrlKey, shiftKey, altKey, metaKey } = e; const modifiers: Array = []; ctrlKey && modifiers.push('control'); @@ -126,6 +126,7 @@ const keydownEvent = (e, key: string) => { break; case 'space': if (runPluginDisable || !config.value.perf.common.space) return; + e.preventDefault(); emit('choosePlugin'); break; default: diff --git a/src/renderer/plugins-manager/index.ts b/src/renderer/plugins-manager/index.ts index 8ca02e0..657a41e 100644 --- a/src/renderer/plugins-manager/index.ts +++ b/src/renderer/plugins-manager/index.ts @@ -77,6 +77,10 @@ const createPluginManager = (): any => { }; const openPlugin = async (plugin, option) => { + ipcRenderer.send('msg-trigger', { + type: 'removePlugin', + }); + window.initRubick(); if (plugin.pluginType === 'ui' || plugin.pluginType === 'system') { if (state.currentPlugin && state.currentPlugin.name === plugin.name) { window.rubick.showMainWindow(); @@ -103,7 +107,6 @@ const createPluginManager = (): any => { message.error('启动应用出错,请确保启动应用存在!'); } } - window.initRubick(); changePluginHistory({ ...plugin, ...option,