index.js 926 B

1234567891011121314151617181920212223242526272829
  1. import { FormStepperDefaultProps } from './props';
  2. import createComponent from '../createComponent';
  3. import fmtEvent from '../../_util/fmtEvent';
  4. createComponent({
  5. props: FormStepperDefaultProps,
  6. methods: {
  7. onChange: function (value, e) {
  8. this.emit('onChange', value);
  9. if (this.props.onChange) {
  10. this.props.onChange(value, fmtEvent(this.props, e));
  11. }
  12. },
  13. onBlur: function (e) {
  14. if (this.props.onBlur) {
  15. this.props.onBlur(fmtEvent(this.props, e));
  16. }
  17. },
  18. onFocus: function (e) {
  19. if (this.props.onChange) {
  20. this.props.onFocus(fmtEvent(this.props, e));
  21. }
  22. },
  23. onConfirm: function (value, e) {
  24. if (this.props.onConfirm) {
  25. this.props.onConfirm(value, fmtEvent(this.props, e));
  26. }
  27. },
  28. }
  29. });