index.js 499 B

123456789101112131415161718
  1. import { IconDefaultProps } from './props';
  2. import fmtEvent from '../_util/fmtEvent';
  3. import '../_util/assert-component2';
  4. Component({
  5. props: IconDefaultProps,
  6. methods: {
  7. onTap: function (e) {
  8. if (this.props.onTap) {
  9. this.props.onTap(fmtEvent(this.props, e));
  10. }
  11. },
  12. catchTap: function (e) {
  13. if (this.props.catchTap) {
  14. this.props.catchTap(fmtEvent(this.props, e));
  15. }
  16. },
  17. },
  18. });