index.js 437 B

12345678910
  1. import { Component, triggerEvent } from '../../_util/simply';
  2. import { resolveEventValue } from '../../_util/platform';
  3. import { FormSwitchDefaultProps } from './props';
  4. import { createForm } from '../form';
  5. Component(FormSwitchDefaultProps, {
  6. onChange: function (value, e) {
  7. this.emit('onChange', resolveEventValue(value));
  8. triggerEvent(this, 'change', resolveEventValue(value), e);
  9. },
  10. }, null, [createForm()]);