mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-17 02:31:34 +08:00
@ -7,7 +7,7 @@ export class OverlayBaseController<Opts, Overlay> {
|
|||||||
return proxyMethod(this.ctrl, 'create', opts);
|
return proxyMethod(this.ctrl, 'create', opts);
|
||||||
}
|
}
|
||||||
|
|
||||||
dismiss(data?: any, role?: string, id = -1): Promise<void> {
|
dismiss(data?: any, role?: string, id?: number): Promise<void> {
|
||||||
return proxyMethod(this.ctrl, 'dismiss', data, role, id);
|
return proxyMethod(this.ctrl, 'dismiss', data, role, id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
16
core/src/components.d.ts
vendored
16
core/src/components.d.ts
vendored
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
import '@stencil/core';
|
import '@stencil/core';
|
||||||
|
|
||||||
import 'ionicons'
|
import 'ionicons';
|
||||||
import {
|
import {
|
||||||
ActionSheetButton,
|
ActionSheetButton,
|
||||||
ActionSheetOptions,
|
ActionSheetOptions,
|
||||||
@ -79,7 +79,7 @@ export namespace Components {
|
|||||||
/**
|
/**
|
||||||
* Get the most recently opened action sheet overlay.
|
* Get the most recently opened action sheet overlay.
|
||||||
*/
|
*/
|
||||||
'getTop': () => Promise<HTMLIonActionSheetElement>;
|
'getTop': () => Promise<HTMLIonActionSheetElement | undefined>;
|
||||||
}
|
}
|
||||||
interface IonActionSheetControllerAttributes extends StencilHTMLAttributes {}
|
interface IonActionSheetControllerAttributes extends StencilHTMLAttributes {}
|
||||||
|
|
||||||
@ -228,7 +228,7 @@ export namespace Components {
|
|||||||
/**
|
/**
|
||||||
* Get the most recently opened alert overlay.
|
* Get the most recently opened alert overlay.
|
||||||
*/
|
*/
|
||||||
'getTop': () => Promise<HTMLIonAlertElement>;
|
'getTop': () => Promise<HTMLIonAlertElement | undefined>;
|
||||||
}
|
}
|
||||||
interface IonAlertControllerAttributes extends StencilHTMLAttributes {}
|
interface IonAlertControllerAttributes extends StencilHTMLAttributes {}
|
||||||
|
|
||||||
@ -2219,7 +2219,7 @@ export namespace Components {
|
|||||||
/**
|
/**
|
||||||
* Get the most recently opened loading overlay.
|
* Get the most recently opened loading overlay.
|
||||||
*/
|
*/
|
||||||
'getTop': () => Promise<HTMLIonLoadingElement>;
|
'getTop': () => Promise<HTMLIonLoadingElement | undefined>;
|
||||||
}
|
}
|
||||||
interface IonLoadingControllerAttributes extends StencilHTMLAttributes {}
|
interface IonLoadingControllerAttributes extends StencilHTMLAttributes {}
|
||||||
|
|
||||||
@ -2561,7 +2561,7 @@ export namespace Components {
|
|||||||
/**
|
/**
|
||||||
* Get the most recently opened modal overlay.
|
* Get the most recently opened modal overlay.
|
||||||
*/
|
*/
|
||||||
'getTop': () => Promise<HTMLIonModalElement>;
|
'getTop': () => Promise<HTMLIonModalElement | undefined>;
|
||||||
}
|
}
|
||||||
interface IonModalControllerAttributes extends StencilHTMLAttributes {}
|
interface IonModalControllerAttributes extends StencilHTMLAttributes {}
|
||||||
|
|
||||||
@ -2861,7 +2861,7 @@ export namespace Components {
|
|||||||
interface IonPickerController {
|
interface IonPickerController {
|
||||||
'create': (opts: PickerOptions) => Promise<HTMLIonPickerElement>;
|
'create': (opts: PickerOptions) => Promise<HTMLIonPickerElement>;
|
||||||
'dismiss': (data?: any, role?: string | undefined, pickerId?: number | undefined) => Promise<void>;
|
'dismiss': (data?: any, role?: string | undefined, pickerId?: number | undefined) => Promise<void>;
|
||||||
'getTop': () => Promise<HTMLIonPickerElement>;
|
'getTop': () => Promise<HTMLIonPickerElement | undefined>;
|
||||||
}
|
}
|
||||||
interface IonPickerControllerAttributes extends StencilHTMLAttributes {}
|
interface IonPickerControllerAttributes extends StencilHTMLAttributes {}
|
||||||
|
|
||||||
@ -3008,7 +3008,7 @@ export namespace Components {
|
|||||||
/**
|
/**
|
||||||
* Get the most recently opened popover overlay.
|
* Get the most recently opened popover overlay.
|
||||||
*/
|
*/
|
||||||
'getTop': () => Promise<HTMLIonPopoverElement>;
|
'getTop': () => Promise<HTMLIonPopoverElement | undefined>;
|
||||||
}
|
}
|
||||||
interface IonPopoverControllerAttributes extends StencilHTMLAttributes {}
|
interface IonPopoverControllerAttributes extends StencilHTMLAttributes {}
|
||||||
|
|
||||||
@ -4828,7 +4828,7 @@ export namespace Components {
|
|||||||
/**
|
/**
|
||||||
* Get the most recently opened toast overlay.
|
* Get the most recently opened toast overlay.
|
||||||
*/
|
*/
|
||||||
'getTop': () => Promise<HTMLIonToastElement>;
|
'getTop': () => Promise<HTMLIonToastElement | undefined>;
|
||||||
}
|
}
|
||||||
interface IonToastControllerAttributes extends StencilHTMLAttributes {}
|
interface IonToastControllerAttributes extends StencilHTMLAttributes {}
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ export class ActionSheetController implements OverlayController {
|
|||||||
* Get the most recently opened action sheet overlay.
|
* Get the most recently opened action sheet overlay.
|
||||||
*/
|
*/
|
||||||
@Method()
|
@Method()
|
||||||
async getTop(): Promise<HTMLIonActionSheetElement> {
|
async getTop(): Promise<HTMLIonActionSheetElement | undefined> {
|
||||||
return getOverlay(this.doc, 'ion-action-sheet') as HTMLIonActionSheetElement;
|
return getOverlay(this.doc, 'ion-action-sheet') as HTMLIonActionSheetElement;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,7 @@ export class AlertController implements OverlayController {
|
|||||||
* Get the most recently opened alert overlay.
|
* Get the most recently opened alert overlay.
|
||||||
*/
|
*/
|
||||||
@Method()
|
@Method()
|
||||||
async getTop(): Promise<HTMLIonAlertElement> {
|
async getTop(): Promise<HTMLIonAlertElement | undefined> {
|
||||||
return getOverlay(this.doc, 'ion-alert') as HTMLIonAlertElement;
|
return getOverlay(this.doc, 'ion-alert') as HTMLIonAlertElement;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,7 @@ export class LoadingController implements OverlayController {
|
|||||||
* Get the most recently opened loading overlay.
|
* Get the most recently opened loading overlay.
|
||||||
*/
|
*/
|
||||||
@Method()
|
@Method()
|
||||||
async getTop(): Promise<HTMLIonLoadingElement> {
|
async getTop(): Promise<HTMLIonLoadingElement | undefined> {
|
||||||
return getOverlay(this.doc, 'ion-loading') as HTMLIonLoadingElement;
|
return getOverlay(this.doc, 'ion-loading') as HTMLIonLoadingElement;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,7 @@ export class ModalController implements OverlayController {
|
|||||||
* Get the most recently opened modal overlay.
|
* Get the most recently opened modal overlay.
|
||||||
*/
|
*/
|
||||||
@Method()
|
@Method()
|
||||||
async getTop(): Promise<HTMLIonModalElement> {
|
async getTop(): Promise<HTMLIonModalElement | undefined> {
|
||||||
return getOverlay(this.doc, 'ion-modal') as HTMLIonModalElement;
|
return getOverlay(this.doc, 'ion-modal') as HTMLIonModalElement;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -31,7 +31,7 @@ export class PickerController implements OverlayController {
|
|||||||
* Get the most recently opened picker overlay.
|
* Get the most recently opened picker overlay.
|
||||||
*/
|
*/
|
||||||
@Method()
|
@Method()
|
||||||
async getTop(): Promise<HTMLIonPickerElement> {
|
async getTop(): Promise<HTMLIonPickerElement | undefined> {
|
||||||
return getOverlay(this.doc, 'ion-picker') as HTMLIonPickerElement;
|
return getOverlay(this.doc, 'ion-picker') as HTMLIonPickerElement;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,7 @@ export class PopoverController implements OverlayController {
|
|||||||
* Get the most recently opened popover overlay.
|
* Get the most recently opened popover overlay.
|
||||||
*/
|
*/
|
||||||
@Method()
|
@Method()
|
||||||
async getTop(): Promise<HTMLIonPopoverElement> {
|
async getTop(): Promise<HTMLIonPopoverElement | undefined> {
|
||||||
return getOverlay(this.doc, 'ion-popover') as HTMLIonPopoverElement;
|
return getOverlay(this.doc, 'ion-popover') as HTMLIonPopoverElement;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,7 @@ export class ToastController implements OverlayController {
|
|||||||
* Get the most recently opened toast overlay.
|
* Get the most recently opened toast overlay.
|
||||||
*/
|
*/
|
||||||
@Method()
|
@Method()
|
||||||
async getTop(): Promise<HTMLIonToastElement> {
|
async getTop(): Promise<HTMLIonToastElement | undefined> {
|
||||||
return getOverlay(this.doc, 'ion-toast') as HTMLIonToastElement;
|
return getOverlay(this.doc, 'ion-toast') as HTMLIonToastElement;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -33,7 +33,7 @@ export interface OverlayInterface {
|
|||||||
export interface OverlayController {
|
export interface OverlayController {
|
||||||
create(opts?: any): Promise<HTMLElement>;
|
create(opts?: any): Promise<HTMLElement>;
|
||||||
dismiss(data?: any, role?: string, alertId?: number): Promise<void>;
|
dismiss(data?: any, role?: string, alertId?: number): Promise<void>;
|
||||||
getTop(): Promise<HTMLElement>;
|
getTop(): Promise<HTMLIonOverlayElement | undefined>;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface HTMLIonOverlayElement extends HTMLStencilElement {
|
export interface HTMLIonOverlayElement extends HTMLStencilElement {
|
||||||
|
Reference in New Issue
Block a user