mirror of
https://github.com/rubickCenter/rubick
synced 2025-06-07 11:04:11 +08:00
fix: 修复 #364
This commit is contained in:
parent
2dd4ed10cc
commit
c78dd9c4b6
@ -96,7 +96,7 @@ const emit = defineEmits([
|
|||||||
]);
|
]);
|
||||||
|
|
||||||
const keydownEvent = (e, key: string) => {
|
const keydownEvent = (e, key: string) => {
|
||||||
e.preventDefault();
|
key !== 'space' && e.preventDefault();
|
||||||
const { ctrlKey, shiftKey, altKey, metaKey } = e;
|
const { ctrlKey, shiftKey, altKey, metaKey } = e;
|
||||||
const modifiers: Array<string> = [];
|
const modifiers: Array<string> = [];
|
||||||
ctrlKey && modifiers.push('control');
|
ctrlKey && modifiers.push('control');
|
||||||
@ -126,6 +126,7 @@ const keydownEvent = (e, key: string) => {
|
|||||||
break;
|
break;
|
||||||
case 'space':
|
case 'space':
|
||||||
if (runPluginDisable || !config.value.perf.common.space) return;
|
if (runPluginDisable || !config.value.perf.common.space) return;
|
||||||
|
e.preventDefault();
|
||||||
emit('choosePlugin');
|
emit('choosePlugin');
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -77,6 +77,10 @@ const createPluginManager = (): any => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const openPlugin = async (plugin, option) => {
|
const openPlugin = async (plugin, option) => {
|
||||||
|
ipcRenderer.send('msg-trigger', {
|
||||||
|
type: 'removePlugin',
|
||||||
|
});
|
||||||
|
window.initRubick();
|
||||||
if (plugin.pluginType === 'ui' || plugin.pluginType === 'system') {
|
if (plugin.pluginType === 'ui' || plugin.pluginType === 'system') {
|
||||||
if (state.currentPlugin && state.currentPlugin.name === plugin.name) {
|
if (state.currentPlugin && state.currentPlugin.name === plugin.name) {
|
||||||
window.rubick.showMainWindow();
|
window.rubick.showMainWindow();
|
||||||
@ -103,7 +107,6 @@ const createPluginManager = (): any => {
|
|||||||
message.error('启动应用出错,请确保启动应用存在!');
|
message.error('启动应用出错,请确保启动应用存在!');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
window.initRubick();
|
|
||||||
changePluginHistory({
|
changePluginHistory({
|
||||||
...plugin,
|
...plugin,
|
||||||
...option,
|
...option,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user