mirror of
https://github.com/rubickCenter/rubick
synced 2025-12-29 22:39:45 +08:00
🐛 fix #210
This commit is contained in:
@@ -115,6 +115,7 @@ import { computed, ref, toRaw } from 'vue';
|
||||
import path from 'path';
|
||||
import MarkdownIt from 'markdown-it';
|
||||
import { PlusCircleOutlined, MinusCircleOutlined } from '@ant-design/icons-vue';
|
||||
import { message } from 'ant-design-vue';
|
||||
|
||||
const { ipcRenderer } = window.require('electron');
|
||||
|
||||
@@ -133,6 +134,7 @@ const localPlugins = computed(() =>
|
||||
);
|
||||
const updateLocalPlugin = () => store.dispatch('updateLocalPlugin');
|
||||
const startUnDownload = (name) => store.dispatch('startUnDownload', name);
|
||||
const errorUnDownload = (name) => store.dispatch('errorUnDownload', name);
|
||||
|
||||
const currentSelect = ref([0]);
|
||||
|
||||
@@ -146,7 +148,7 @@ const superPanelPlugins = ref(
|
||||
_id: 'super-panel-plugins',
|
||||
}
|
||||
);
|
||||
console.log(toRaw(superPanelPlugins.value.data));
|
||||
|
||||
const addCmdToSuperPanel = ({ cmd, code }) => {
|
||||
const plugin = {
|
||||
...toRaw(pluginDetail.value),
|
||||
@@ -216,8 +218,13 @@ const readme = computed(() => {
|
||||
|
||||
const deletePlugin = async (plugin) => {
|
||||
startUnDownload(plugin.name);
|
||||
const timer = setTimeout(() => {
|
||||
errorUnDownload(plugin.name);
|
||||
message.error('卸载超时,请重试!');
|
||||
}, 20000);
|
||||
await window.market.deletePlugin(plugin);
|
||||
updateLocalPlugin();
|
||||
clearTimeout(timer);
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user