Skip to content

Commit

Permalink
fix: 修复 #364
Browse files Browse the repository at this point in the history
  • Loading branch information
wangwei1240 committed May 16, 2024
1 parent 2dd4ed1 commit c78dd9c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/renderer/components/search.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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<string> = [];
ctrlKey && modifiers.push('control');
Expand Down Expand Up @@ -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:
Expand Down
5 changes: 4 additions & 1 deletion src/renderer/plugins-manager/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -103,7 +107,6 @@ const createPluginManager = (): any => {
message.error('启动应用出错,请确保启动应用存在!');
}
}
window.initRubick();
changePluginHistory({
...plugin,
...option,
Expand Down

0 comments on commit c78dd9c

Please sign in to comment.