index.js 725 B

12345678910111213141516171819
  1. import { Component, triggerEvent, triggerEventOnly } from '../../_util/simply';
  2. import { resolveEventValue } from '../../_util/platform';
  3. import { FormStepperDefaultProps } from './props';
  4. import { createForm } from '../form';
  5. Component(FormStepperDefaultProps, {
  6. onChange: function (value, e) {
  7. this.emit('onChange', resolveEventValue(value));
  8. triggerEvent(this, 'change', resolveEventValue(value), e);
  9. },
  10. onBlur: function (e) {
  11. triggerEventOnly(this, 'blur', e);
  12. },
  13. onFocus: function (e) {
  14. triggerEventOnly(this, 'focus', e);
  15. },
  16. onConfirm: function (value, e) {
  17. triggerEvent(this, 'confirm', resolveEventValue(value), e);
  18. },
  19. }, null, [createForm()]);