fix issues #I7657W

This commit is contained in:
LiuHao
2023-05-19 01:32:24 +08:00
parent 9b6cd8b047
commit 6de98250cc
2 changed files with 6 additions and 3 deletions

View File

@ -247,13 +247,13 @@ const handleUpdate = (row: TreeVO) => {
/** 提交按钮 */
const submitForm = () => {
treeFormRef.value.validate((valid: boolean) => {
treeFormRef.value.validate(async (valid: boolean) => {
if (valid) {
buttonLoading.value = true;
if (form.value.id) {
updateTree(form.value).finally(() => buttonLoading.value = false);
await updateTree(form.value).finally(() => buttonLoading.value = false);
} else {
addTree(form.value).finally(() => buttonLoading.value = false);
await addTree(form.value).finally(() => buttonLoading.value = false);
}
proxy?.$modal.msgSuccess("操作成功");
dialog.visible = false;