mirror of
https://github.com/youzan/vant.git
synced 2025-10-14 23:20:41 +00:00
fix(Button): should not submit form when loading (#8018)
This commit is contained in:
@@ -135,6 +135,9 @@ export default createComponent({
|
||||
};
|
||||
|
||||
const onClick = (event: MouseEvent) => {
|
||||
if (props.loading) {
|
||||
event.preventDefault();
|
||||
}
|
||||
if (!props.loading && !props.disabled) {
|
||||
emit('click', event);
|
||||
route();
|
||||
|
Reference in New Issue
Block a user