feat(vue): add ionic vue beta (#22062)

This commit is contained in:
Liam DeBeasi
2020-09-10 15:20:49 -04:00
committed by GitHub
parent 74af3cb50b
commit 5ffa65f84a
48 changed files with 3949 additions and 26 deletions

View File

@ -3,7 +3,7 @@ import { getIonMode } from '../global/ionic-global';
import { ActionSheetOptions, AlertOptions, Animation, AnimationBuilder, BackButtonEvent, HTMLIonOverlayElement, IonicConfig, LoadingOptions, ModalOptions, OverlayInterface, PickerOptions, PopoverOptions, ToastOptions } from '../interface';
import { OVERLAY_BACK_BUTTON_PRIORITY } from './hardware-back-button';
import { getElementRoot } from './helpers';
import { addEventListener, getElementRoot, removeEventListener } from './helpers';
let lastId = 0;
@ -352,10 +352,10 @@ export const eventMethod = <T>(element: HTMLElement, eventName: string): Promise
export const onceEvent = (element: HTMLElement, eventName: string, callback: (ev: Event) => void) => {
const handler = (ev: Event) => {
element.removeEventListener(eventName, handler);
removeEventListener(element, eventName, handler);
callback(ev);
};
element.addEventListener(eventName, handler);
addEventListener(element, eventName, handler);
};
export const isCancel = (role: string | undefined): boolean => {