mirror of
https://github.com/rubickCenter/rubick
synced 2025-12-16 23:54:19 +08:00
🐛 修复部分问题
This commit is contained in:
@@ -94,7 +94,7 @@
|
||||
:title="$t('feature.installed.removeFromPanel')"
|
||||
>
|
||||
<MinusCircleOutlined
|
||||
@click="removePluginToSuperPanel(cmd)"
|
||||
@click="removePluginToSuperPanel({ cmd })"
|
||||
/>
|
||||
</a-tooltip>
|
||||
</template>
|
||||
@@ -145,9 +145,9 @@ const pluginDetail = computed(() => {
|
||||
});
|
||||
|
||||
const superPanelPlugins = ref(
|
||||
window.rubick.db.get('super-panel-plugins') || {
|
||||
window.rubick.db.get('super-panel-user-plugins') || {
|
||||
data: [],
|
||||
_id: 'super-panel-plugins',
|
||||
_id: 'super-panel-user-plugins',
|
||||
}
|
||||
);
|
||||
|
||||
@@ -165,9 +165,10 @@ const addCmdToSuperPanel = ({ cmd, code }) => {
|
||||
window.rubick.db.put(toRaw(superPanelPlugins.value));
|
||||
};
|
||||
|
||||
const removePluginToSuperPanel = (cmd) => {
|
||||
const removePluginToSuperPanel = ({ cmd, name }) => {
|
||||
superPanelPlugins.value.data = toRaw(superPanelPlugins.value).data.filter(
|
||||
(item) => {
|
||||
if (name) return item.name !== name;
|
||||
return item.cmd !== cmd;
|
||||
}
|
||||
);
|
||||
@@ -224,9 +225,12 @@ const deletePlugin = async (plugin) => {
|
||||
message.error('卸载超时,请重试!');
|
||||
}, 20000);
|
||||
await window.market.deletePlugin(plugin);
|
||||
removePluginToSuperPanel({ name: plugin.name });
|
||||
updateLocalPlugin();
|
||||
clearTimeout(timer);
|
||||
};
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
|
||||
Reference in New Issue
Block a user