From 1ee379b288687aeb5bf25dcf24ca16f8ff2befad Mon Sep 17 00:00:00 2001 From: muwoo <2424880409@qq.com> Date: Thu, 9 Dec 2021 20:36:33 +0800 Subject: [PATCH] =?UTF-8?q?:sparkles:=20=E9=80=82=E9=85=8D=E8=B6=85?= =?UTF-8?q?=E7=BA=A7=E9=9D=A2=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- feature/src/views/dev/index.vue | 2 ++ feature/src/views/installed/index.vue | 5 +++-- feature/src/views/market/components/finder.vue | 6 ++++-- .../src/views/market/components/plugin-list.vue | 2 ++ src/common/utils/localPlugin.ts | 2 -- src/main/browsers/runner.ts | 14 ++++++++++++-- src/main/common/api.ts | 5 +++++ src/renderer/App.vue | 1 - src/renderer/plugins-manager/index.ts | 6 ++++++ src/renderer/shims-vue.d.ts | 1 + 10 files changed, 35 insertions(+), 9 deletions(-) diff --git a/feature/src/views/dev/index.vue b/feature/src/views/dev/index.vue index d68c10f..fbfbcf0 100644 --- a/feature/src/views/dev/index.vue +++ b/feature/src/views/dev/index.vue @@ -21,6 +21,7 @@ diff --git a/src/renderer/plugins-manager/index.ts b/src/renderer/plugins-manager/index.ts index d3f556a..3cc832f 100644 --- a/src/renderer/plugins-manager/index.ts +++ b/src/renderer/plugins-manager/index.ts @@ -83,6 +83,12 @@ const createPluginManager = (): any => { remote.getGlobal("LOCAL_PLUGINS").updatePlugin(currentPlugin); }; + window.setCurrentPlugin = ({ currentPlugin }) => { + console.log(currentPlugin); + state.currentPlugin = currentPlugin; + setSearchValue(""); + }; + window.initRubick = () => { state.currentPlugin = {}; setSearchValue(""); diff --git a/src/renderer/shims-vue.d.ts b/src/renderer/shims-vue.d.ts index d1bccc7..e962f9f 100644 --- a/src/renderer/shims-vue.d.ts +++ b/src/renderer/shims-vue.d.ts @@ -19,4 +19,5 @@ interface Window { removeSubInput: () => void; updatePlugin: (plugin: any) => void; initRubick: () => void; + setCurrentPlugin: (plugin: any) => void; }