fix(Button): should not submit form when loading (#8018)

This commit is contained in:
neverland
2021-01-26 21:23:25 +08:00
committed by GitHub
parent e97dbeaab5
commit 07678f2d6b

View File

@@ -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();