mirror of
https://github.com/youzan/vant.git
synced 2025-10-16 08:00:34 +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) => {
|
const onClick = (event: MouseEvent) => {
|
||||||
|
if (props.loading) {
|
||||||
|
event.preventDefault();
|
||||||
|
}
|
||||||
if (!props.loading && !props.disabled) {
|
if (!props.loading && !props.disabled) {
|
||||||
emit('click', event);
|
emit('click', event);
|
||||||
route();
|
route();
|
||||||
|
Reference in New Issue
Block a user