diff --git a/static/plugins/superPanel/index.js b/static/plugins/superPanel/index.js index 72c5638..b4618c7 100644 --- a/static/plugins/superPanel/index.js +++ b/static/plugins/superPanel/index.js @@ -96,6 +96,21 @@ new Vue({ } }); } + if (cmd.type === 'over') { + this.targetOptions.push({ + type: 'ext', + name: cmd.label, + icon: plugin.icon, + click: () => { + ipcRenderer.send('superPanel-openPlugin', { + cmd: cmd, + plugin: plugin, + feature: fe, + data: word + }) + } + }); + } }) }); }); diff --git a/static/preload.js b/static/preload.js index 2ba6a2f..1bc6ebe 100644 --- a/static/preload.js +++ b/static/preload.js @@ -173,8 +173,7 @@ window.utools = window.rubick = { }, get(key) { const dbData = getData(dbPath) || []; - - return dbData.find(d => d._id === key); + return dbData.find(d => d._id === key) || ''; }, remove(key) { key = typeof key === 'object' ? key._id : key;