feat: 支持快捷键设置;支持超级面板

This commit is contained in:
muwoo
2021-07-02 17:12:38 +08:00
parent 4bac5ac8a2
commit 7d55ef06a6
18 changed files with 586 additions and 172 deletions

View File

@@ -30,8 +30,8 @@ export default {
mounted() {
this.webview = document.querySelector('webview');
this.webview.addEventListener('dom-ready', () => {
this.webview.send('onPluginReady', this.$route.query);
this.webview.send('onPluginEnter', this.$route.query);
this.webview.send('onPluginReady', this.pluginInfo);
this.webview.send('onPluginEnter', this.pluginInfo);
});
this.setSubPlaceHolder('Hi, Rubick');
this.webview.addEventListener('ipc-message', (event) => {
@@ -74,14 +74,16 @@ export default {
...mapMutations('main', ['setSubPlaceHolder', 'commonUpdate']),
},
beforeRouteUpdate() {
this.path = `File://${this.$route.query.sourceFile}`
this.path = `File://${this.$route.query.sourceFile}`;
console.log(this.pluginInfo)
this.webview.send('onPluginEnter', this.pluginInfo);
},
beforeDestroy() {
const webview = document.querySelector('webview');
webview && webview.send('onPluginOut', this.$route.query)
},
computed: {
...mapState('main', ['searchValue', 'devPlugins']),
...mapState('main', ['searchValue', 'devPlugins', 'pluginInfo']),
pluginDetail() {
return (this.devPlugins.filter(plugin => plugin.name === this.query.name)[0] || {}).features
},