[improvement] optimize listeners

This commit is contained in:
陈嘉涵
2019-05-05 17:46:55 +08:00
parent 70550a500f
commit 9104e2dc5a
11 changed files with 38 additions and 36 deletions
+4 -4
View File
@@ -43,16 +43,16 @@ function Button(
) {
const { tag, type, disabled, loading, hairline, loadingText } = props;
const onClick = (event: Event) => {
function onClick(event: Event) {
if (!loading && !disabled) {
emit(ctx, 'click', event);
functionalRoute(ctx);
}
};
}
const onTouchstart = (event: TouchEvent) => {
function onTouchstart(event: TouchEvent) {
emit(ctx, 'touchstart', event);
};
}
const classes = [
bem([