index.js 557 B

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