mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-09 16:16:41 +08:00
style(lint): fix lint errors
This commit is contained in:
@ -12,20 +12,20 @@ export class ActionSheetController {
|
||||
}
|
||||
}
|
||||
|
||||
export function getActionSheetProxy(opts: ActionSheetOptions){
|
||||
export function getActionSheetProxy(opts: ActionSheetOptions) {
|
||||
return {
|
||||
id: actionSheetId++,
|
||||
state: PRESENTING,
|
||||
opts: opts,
|
||||
present: function() { return present(this)},
|
||||
dismiss: function() { return dismiss(this)},
|
||||
present: function() { return present(this); },
|
||||
dismiss: function() { return dismiss(this); },
|
||||
onDidDismiss: function(callback: (data: any, role: string) => void) {
|
||||
(this as ActionSheetProxyInternal).onDidDismissHandler = callback;
|
||||
},
|
||||
onWillDismiss: function(callback: (data: any, role: string) => void) {
|
||||
(this as ActionSheetProxyInternal).onWillDismissHandler = callback;
|
||||
},
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
export function present(actionSheetProxy: ActionSheetProxyInternal): Promise<any> {
|
||||
@ -82,8 +82,8 @@ export function loadOverlay(opts: ActionSheetOptions): Promise<HTMLIonActionShee
|
||||
}
|
||||
|
||||
export interface ActionSheetProxy {
|
||||
present(): Promise<void>
|
||||
dismiss(): Promise<void>
|
||||
present(): Promise<void>;
|
||||
dismiss(): Promise<void>;
|
||||
onDidDismiss(callback: (data: any, role: string) => void): void;
|
||||
onWillDismiss(callback: (data: any, role: string) => void): void;
|
||||
}
|
||||
@ -101,4 +101,4 @@ export const PRESENTING = 1;
|
||||
export const DISMISSING = 2;
|
||||
|
||||
const ION_ACTION_SHEET_DID_DISMISS_EVENT = 'ionActionSheetDidDismiss';
|
||||
const ION_ACTION_SHEET_WILL_DISMISS_EVENT = 'ionActionSheetWillDismiss';
|
||||
const ION_ACTION_SHEET_WILL_DISMISS_EVENT = 'ionActionSheetWillDismiss';
|
||||
|
||||
@ -12,20 +12,20 @@ export class AlertController {
|
||||
}
|
||||
}
|
||||
|
||||
export function getAlertProxy(opts: AlertOptions){
|
||||
export function getAlertProxy(opts: AlertOptions) {
|
||||
return {
|
||||
id: alertId++,
|
||||
state: PRESENTING,
|
||||
opts: opts,
|
||||
present: function() { return present(this)},
|
||||
dismiss: function() { return dismiss(this)},
|
||||
present: function() { return present(this); },
|
||||
dismiss: function() { return dismiss(this); },
|
||||
onDidDismiss: function(callback: (data: any, role: string) => void) {
|
||||
(this as AlertProxyInternal).onDidDismissHandler = callback;
|
||||
},
|
||||
onWillDismiss: function(callback: (data: any, role: string) => void) {
|
||||
(this as AlertProxyInternal).onWillDismissHandler = callback;
|
||||
},
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
export function present(alertProxy: AlertProxyInternal): Promise<any> {
|
||||
@ -82,8 +82,8 @@ export function loadOverlay(opts: AlertOptions): Promise<HTMLIonAlertElement> {
|
||||
}
|
||||
|
||||
export interface AlertProxy {
|
||||
present(): Promise<void>
|
||||
dismiss(): Promise<void>
|
||||
present(): Promise<void>;
|
||||
dismiss(): Promise<void>;
|
||||
onDidDismiss(callback: (data: any, role: string) => void): void;
|
||||
onWillDismiss(callback: (data: any, role: string) => void): void;
|
||||
}
|
||||
@ -101,4 +101,4 @@ export const PRESENTING = 1;
|
||||
export const DISMISSING = 2;
|
||||
|
||||
const ION_ALERT_DID_DISMISS_EVENT = 'ionAlertDidDismiss';
|
||||
const ION_ALERT_WILL_DISMISS_EVENT = 'ionAlertWillDismiss';
|
||||
const ION_ALERT_WILL_DISMISS_EVENT = 'ionAlertWillDismiss';
|
||||
|
||||
@ -90,4 +90,4 @@ export function getNavByIdOrNameAsyncImpl(app: App, nameOrId: number | string):
|
||||
return app._element.componentOnReady().then(() => {
|
||||
return app._element.getNavByIdOrName(nameOrId);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@ -30,4 +30,4 @@ function getElement(): Promise<HTMLIonEventsElement> {
|
||||
});
|
||||
}
|
||||
|
||||
const ELEMENT_NAME = 'ion-events';
|
||||
const ELEMENT_NAME = 'ion-events';
|
||||
|
||||
@ -12,20 +12,20 @@ export class LoadingController {
|
||||
}
|
||||
}
|
||||
|
||||
export function getLoadingProxy(opts: LoadingOptions){
|
||||
export function getLoadingProxy(opts: LoadingOptions) {
|
||||
return {
|
||||
id: loadingId++,
|
||||
state: PRESENTING,
|
||||
opts: opts,
|
||||
present: function() { return present(this)},
|
||||
dismiss: function() { return dismiss(this)},
|
||||
present: function() { return present(this); },
|
||||
dismiss: function() { return dismiss(this); },
|
||||
onDidDismiss: function(callback: (data: any, role: string) => void) {
|
||||
(this as LoadingProxyInternal).onDidDismissHandler = callback;
|
||||
},
|
||||
onWillDismiss: function(callback: (data: any, role: string) => void) {
|
||||
(this as LoadingProxyInternal).onWillDismissHandler = callback;
|
||||
},
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
export function present(loadingProxy: LoadingProxyInternal): Promise<any> {
|
||||
@ -82,8 +82,8 @@ export function loadOverlay(opts: LoadingOptions): Promise<HTMLIonLoadingElement
|
||||
}
|
||||
|
||||
export interface LoadingProxy {
|
||||
present(): Promise<void>
|
||||
dismiss(): Promise<void>
|
||||
present(): Promise<void>;
|
||||
dismiss(): Promise<void>;
|
||||
onDidDismiss(callback: (data: any, role: string) => void): void;
|
||||
onWillDismiss(callback: (data: any, role: string) => void): void;
|
||||
}
|
||||
@ -101,4 +101,4 @@ export const PRESENTING = 1;
|
||||
export const DISMISSING = 2;
|
||||
|
||||
const ION_LOADING_DID_DISMISS_EVENT = 'ionLoadingDidDismiss';
|
||||
const ION_LOADING_WILL_DISMISS_EVENT = 'ionLoadingWillDismiss';
|
||||
const ION_LOADING_WILL_DISMISS_EVENT = 'ionLoadingWillDismiss';
|
||||
|
||||
@ -93,7 +93,7 @@ export class MenuController {
|
||||
return false;
|
||||
}
|
||||
|
||||
isOpenAsync(menuId?: string): Promise<boolean>{
|
||||
isOpenAsync(menuId?: string): Promise<boolean> {
|
||||
return element.componentOnReady().then(() => {
|
||||
return element.isOpen(menuId);
|
||||
});
|
||||
@ -124,4 +124,4 @@ export class MenuController {
|
||||
return element.toggle(menuId);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -120,4 +120,4 @@ export class NavController implements PublicNav {
|
||||
}
|
||||
return [];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -5,7 +5,7 @@ export type DocumentDirection = 'ltr' | 'rtl';
|
||||
|
||||
let dir: DocumentDirection = 'ltr';
|
||||
let isRtl = false;
|
||||
let lang: string = '';
|
||||
let lang = '';
|
||||
|
||||
export class Platform {
|
||||
|
||||
@ -225,4 +225,4 @@ export function getHydratedPlatform(platform: Platform): Promise<HTMLIonPlatform
|
||||
});
|
||||
}
|
||||
return platform._element.componentOnReady();
|
||||
}
|
||||
}
|
||||
|
||||
@ -12,20 +12,20 @@ export class ToastController {
|
||||
}
|
||||
}
|
||||
|
||||
export function getToastProxy(opts: ToastOptions){
|
||||
export function getToastProxy(opts: ToastOptions) {
|
||||
return {
|
||||
id: toastId++,
|
||||
state: PRESENTING,
|
||||
opts: opts,
|
||||
present: function() { return present(this)},
|
||||
dismiss: function() { return dismiss(this)},
|
||||
present: function() { return present(this); },
|
||||
dismiss: function() { return dismiss(this); },
|
||||
onDidDismiss: function(callback: (data: any, role: string) => void) {
|
||||
(this as ToastProxyInternal).onDidDismissHandler = callback;
|
||||
},
|
||||
onWillDismiss: function(callback: (data: any, role: string) => void) {
|
||||
(this as ToastProxyInternal).onWillDismissHandler = callback;
|
||||
},
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
export function present(toastProxy: ToastProxyInternal): Promise<any> {
|
||||
@ -82,8 +82,8 @@ export function loadOverlay(opts: ToastOptions): Promise<HTMLIonToastElement> {
|
||||
}
|
||||
|
||||
export interface ToastProxy {
|
||||
present(): Promise<void>
|
||||
dismiss(): Promise<void>
|
||||
present(): Promise<void>;
|
||||
dismiss(): Promise<void>;
|
||||
onDidDismiss(callback: (data: any, role: string) => void): void;
|
||||
onWillDismiss(callback: (data: any, role: string) => void): void;
|
||||
}
|
||||
@ -101,4 +101,4 @@ export const PRESENTING = 1;
|
||||
export const DISMISSING = 2;
|
||||
|
||||
const ION_TOAST_DID_DISMISS_EVENT = 'ionToastDidDismiss';
|
||||
const ION_TOAST_WILL_DISMISS_EVENT = 'ionToastWillDismiss';
|
||||
const ION_TOAST_WILL_DISMISS_EVENT = 'ionToastWillDismiss';
|
||||
|
||||
Reference in New Issue
Block a user