feat: add confirmDisabled for Dialog (#4959)

This commit is contained in:
Netfan
2024-11-27 11:28:49 +08:00
committed by GitHub
parent f85badf482
commit dedba18553
5 changed files with 11 additions and 3 deletions

View File

@@ -22,10 +22,10 @@ const [Modal, modalApi] = useVbenModal({
});
function handleUpdate(len: number) {
modalApi.setState({ loading: true });
modalApi.setState({ confirmDisabled: true, loading: true });
setTimeout(() => {
list.value = Array.from({ length: len }, (_v, k) => k + 1);
modalApi.setState({ loading: false });
modalApi.setState({ confirmDisabled: false, loading: false });
}, 2000);
}
</script>