Skip to content

Commit

Permalink
fixed: button 组件获取 data-xxx 的参数#13
Browse files Browse the repository at this point in the history
  • Loading branch information
linxz committed May 14, 2020
1 parent 15f514a commit 747c592
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/button/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import fmtClass from '../_util/fmtClass';
import fmtEvent from '../_util/fmtEvent';

const SUPPORT_COMPONENT2 = my.canIUse('component2');
const prefixCls = 'am-button';
Expand Down Expand Up @@ -85,8 +86,9 @@ Component({
});
return ret;
},
onButtonTap(...args) {
this.props.onTap(...args);
onButtonTap(e) {
const event = fmtEvent(this.props, e);
this.props.onTap(event);
},
propsChange(prevProps, nextProps) {
const pProps = Object.getOwnPropertyNames(prevProps);
Expand Down

0 comments on commit 747c592

Please sign in to comment.