修改插件runner为browserview

This commit is contained in:
muwoo
2021-12-03 17:54:58 +08:00
parent 0132a11d7e
commit cd41f0561c
18 changed files with 420 additions and 121 deletions

View File

@@ -1,21 +1,36 @@
<template>
<div id="components-layout">
<div class="rubick-select">
<Search @changeCurrent="changeIndex" :menuPluginInfo="menuPluginInfo" @onSearch="onSearch" />
<Search
:currentPlugin="currentPlugin"
@changeCurrent="changeIndex"
@onSearch="onSearch"
@openMenu="openMenu"
@changeSelect="changeSelect"
/>
</div>
<Result :searchValue="searchValue" :currentSelect="currentSelect" :options="options" />
</div>
</template>
<script setup lang="ts">
import { watch, ref, nextTick } from "vue";
import { watch, ref, nextTick, toRaw } from "vue";
import { ipcRenderer } from "electron";
import Result from "./components/result.vue";
import Search from "./components/search.vue";
import getWindowHeight from "../common/utils/getWindowHeight";
import createPluginManager from "./plugins-manager";
const { initPlugins, getPluginInfo, options, onSearch, searchValue } = createPluginManager();
const {
initPlugins,
getPluginInfo,
options,
onSearch,
searchValue,
changeSelect,
openPlugin,
currentPlugin,
} = createPluginManager();
initPlugins();
@@ -49,6 +64,13 @@ const changeIndex = (index) => {
return;
currentSelect.value = currentSelect.value + index;
};
const openMenu = () => {
openPlugin({
...toRaw(menuPluginInfo.value),
cmd: "插件市场",
});
};
</script>
<style lang="less">