Fix: delete node

This commit is contained in:
Lazy 2024-01-07 16:31:02 +08:00
parent eefb7e4c5d
commit cb7d0b6115

View File

@ -61,8 +61,8 @@ const dialog = reactive({
}, },
delete: async () => { delete: async () => {
try { try {
dialog.loading = true;
await deleteNode(dialog.uuid); await deleteNode(dialog.uuid);
dialog.close();
message.success(t("TXT_CODE_a00e84d7")); message.success(t("TXT_CODE_a00e84d7"));
} catch (error: any) { } catch (error: any) {
message.success(error.message ?? error); message.success(error.message ?? error);
@ -139,7 +139,7 @@ defineExpose({ openDialog });
:title="t('TXT_CODE_fb267b0b')" :title="t('TXT_CODE_fb267b0b')"
ok-text="Yes" ok-text="Yes"
cancel-text="No" cancel-text="No"
@confirm="deleteNode(dialog.uuid)" @confirm="dialog.delete()"
> >
<a-button v-if="editMode" key="delete" danger>{{ t("TXT_CODE_8b937b23") }}</a-button> <a-button v-if="editMode" key="delete" danger>{{ t("TXT_CODE_8b937b23") }}</a-button>
</a-popconfirm> </a-popconfirm>