feat: 插件删除功能

This commit is contained in:
Junyan Qin
2024-11-09 23:25:26 +08:00
parent 601fa0ac7f
commit 15482e398b
6 changed files with 39 additions and 7 deletions

View File

@@ -59,7 +59,7 @@ const props = defineProps({
},
});
const emit = defineEmits(['toggle', 'update', 'uninstall']);
const emit = defineEmits(['toggle', 'update', 'remove']);
const openGithubSource = () => {
window.open(props.plugin.source, '_blank');
@@ -73,8 +73,8 @@ const updatePlugin = () => {
emit('update', props.plugin);
}
const uninstallPlugin = () => {
emit('uninstall', props.plugin);
const removePlugin = () => {
emit('remove', props.plugin);
}
const menuItems = [
@@ -96,7 +96,7 @@ const menuItems = [
{
title: '删除',
condition: (plugin) => true,
action: uninstallPlugin
action: removePlugin
}
]
</script>