index.js 562 B

1234567891011121314
  1. import { Component, triggerEventOnly, triggerEventValues } from '../_util/simply';
  2. import { ActionSheetDefaultProps } from './props';
  3. Component(ActionSheetDefaultProps, {
  4. onAction: function (e) {
  5. var _a = e.currentTarget.dataset, item = _a.item, index = _a.index;
  6. if (item === null || item === void 0 ? void 0 : item.disabled)
  7. return;
  8. triggerEventOnly(this, 'close', e);
  9. triggerEventValues(this, 'action', [item, index], e);
  10. },
  11. onClose: function (e) {
  12. triggerEventOnly(this, 'close', e);
  13. }
  14. });