perf: 使用 modalApi.unlock() 替换 modalApi.lock(false)

This commit is contained in:
xingyu4j
2025-04-29 22:29:03 +08:00
parent 84584a6fd9
commit 0dacc08c2b
52 changed files with 90 additions and 91 deletions

View File

@@ -59,7 +59,7 @@ const [Modal, modalApi] = useVbenModal({
key: 'action_process_msg',
});
} finally {
modalApi.lock(false);
modalApi.unlock();
}
},
async onOpenChange(isOpen: boolean) {
@@ -78,7 +78,7 @@ const [Modal, modalApi] = useVbenModal({
// 设置到 values
await formApi.setValues(formData.value);
} finally {
modalApi.lock(false);
modalApi.unlock();
}
},
});

View File

@@ -28,7 +28,7 @@ const [Modal, modalApi] = useVbenModal({
try {
formData.value = data;
} finally {
modalApi.lock(false);
modalApi.unlock();
}
},
});

View File

@@ -60,7 +60,7 @@ const [Modal, modalApi] = useVbenModal({
key: 'action_process_msg',
});
} finally {
modalApi.lock(false);
modalApi.unlock();
}
},
async onOpenChange(isOpen: boolean) {
@@ -79,7 +79,7 @@ const [Modal, modalApi] = useVbenModal({
// 设置到 values
await formApi.setValues(formData.value);
} finally {
modalApi.lock(false);
modalApi.unlock();
}
},
});

View File

@@ -61,7 +61,7 @@ const [Modal, modalApi] = useVbenModal({
} catch (error) {
console.error('发送短信失败', error);
} finally {
modalApi.lock(false);
modalApi.unlock();
}
},
async onOpenChange(isOpen: boolean) {