2024-12-01 11:56:54 +00:00
|
|
|
import { IconDefaultProps } from './props';
|
|
|
|
import fmtEvent from '../_util/fmtEvent';
|
|
|
|
import '../_util/assert-component2';
|
2024-11-10 07:01:22 +00:00
|
|
|
Component({
|
2024-12-01 11:56:54 +00:00
|
|
|
props: IconDefaultProps,
|
2024-11-10 07:01:22 +00:00
|
|
|
methods: {
|
|
|
|
onTap: function (e) {
|
|
|
|
if (this.props.onTap) {
|
2024-12-01 11:56:54 +00:00
|
|
|
this.props.onTap(fmtEvent(this.props, e));
|
2024-11-10 07:01:22 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
catchTap: function (e) {
|
|
|
|
if (this.props.catchTap) {
|
2024-12-01 11:56:54 +00:00
|
|
|
this.props.catchTap(fmtEvent(this.props, e));
|
2024-11-10 07:01:22 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
2024-12-01 11:56:54 +00:00
|
|
|
});
|