From 9d28b276f16147b19f1c17794f046d516059a97a Mon Sep 17 00:00:00 2001 From: neverland Date: Fri, 21 May 2021 16:04:44 +0800 Subject: [PATCH] fix(Button): should not submit form when loading (#8735) --- src/button/index.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/button/index.tsx b/src/button/index.tsx index 5048333e2..244ba3caa 100644 --- a/src/button/index.tsx +++ b/src/button/index.tsx @@ -86,6 +86,9 @@ function Button( } function onClick(event: Event) { + if (props.loading) { + event.preventDefault(); + } if (!loading && !disabled) { emit(ctx, 'click', event); functionalRoute(ctx);