From fbecd3bc71a37350a6f720f324558fda3123e040 Mon Sep 17 00:00:00 2001 From: muwoo <2424880409@qq.com> Date: Mon, 12 Jul 2021 17:09:51 +0800 Subject: [PATCH] =?UTF-8?q?ref:=20plugin=20=E6=94=AF=E6=8C=81=20type=20ove?= =?UTF-8?q?r?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- static/plugins/superPanel/index.js | 15 +++++++++++++++ static/preload.js | 3 +-- 2 files changed, 16 insertions(+), 2 deletions(-) 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;