mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-10 00:27:41 +08:00
@ -8,4 +8,8 @@ export interface LoadingOptions {
|
||||
duration?: number;
|
||||
translucent?: boolean;
|
||||
animated?: boolean;
|
||||
|
||||
mode?: string;
|
||||
keyboardClose?: boolean;
|
||||
id?: string;
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import { Component, Element, Event, EventEmitter, Listen, Method, Prop } from '@stencil/core';
|
||||
|
||||
import { Animation, AnimationBuilder, Color, Config, Mode, OverlayEventDetail, OverlayInterface } from '../../interface';
|
||||
import { Animation, AnimationBuilder, Config, Mode, OverlayEventDetail, OverlayInterface } from '../../interface';
|
||||
import { BACKDROP, dismiss, eventMethod, present } from '../../utils/overlays';
|
||||
import { createThemedClasses, getClassMap } from '../../utils/theme';
|
||||
|
||||
@ -21,16 +21,22 @@ export class Loading implements OverlayInterface {
|
||||
|
||||
presented = false;
|
||||
animation?: Animation;
|
||||
color?: Color;
|
||||
mode!: Mode;
|
||||
|
||||
@Element() el!: HTMLElement;
|
||||
|
||||
@Prop({ connect: 'ion-animation-controller' }) animationCtrl!: HTMLIonAnimationControllerElement;
|
||||
@Prop({ context: 'config' }) config!: Config;
|
||||
@Prop() overlayId!: number;
|
||||
@Prop() overlayIndex!: number;
|
||||
|
||||
/** If true, the loading will blur any inputs and hide the keyboard */
|
||||
/**
|
||||
* The mode determines which platform styles to use.
|
||||
* Possible values are: `"ios"` or `"md"`.
|
||||
*/
|
||||
@Prop() mode!: Mode;
|
||||
|
||||
/**
|
||||
* If true, the keyboard will be automatically dismissed when the overlay is presented.
|
||||
*/
|
||||
@Prop() keyboardClose = true;
|
||||
|
||||
/**
|
||||
@ -185,7 +191,7 @@ export class Loading implements OverlayInterface {
|
||||
|
||||
return {
|
||||
style: {
|
||||
zIndex: 20000 + this.overlayId
|
||||
zIndex: 20000 + this.overlayIndex
|
||||
},
|
||||
class: {
|
||||
...createThemedClasses(this.mode, 'loading'),
|
||||
|
||||
@ -25,10 +25,11 @@ The loading indicator can be dismissed automatically after a specific amount of
|
||||
| `cssClass` | `css-class` | Additional classes to apply for custom CSS. If multiple classes are provided they should be separated by spaces. | `string`, `string[]` |
|
||||
| `duration` | `duration` | Number of milliseconds to wait before dismissing the loading indicator. | `number` |
|
||||
| `enterAnimation` | -- | Animation to use when the loading indicator is presented. | `AnimationBuilder` |
|
||||
| `keyboardClose` | `keyboard-close` | If true, the loading will blur any inputs and hide the keyboard | `boolean` |
|
||||
| `keyboardClose` | `keyboard-close` | If true, the keyboard will be automatically dismissed when the overlay is presented. | `boolean` |
|
||||
| `leaveAnimation` | -- | Animation to use when the loading indicator is dismissed. | `AnimationBuilder` |
|
||||
| `message` | `message` | Optional text content to display in the loading indicator. | `string` |
|
||||
| `overlayId` | `overlay-id` | | `number` |
|
||||
| `mode` | `mode` | The mode determines which platform styles to use. Possible values are: `"ios"` or `"md"`. | `Mode` |
|
||||
| `overlayIndex` | `overlay-index` | | `number` |
|
||||
| `showBackdrop` | `show-backdrop` | If true, a backdrop will be displayed behind the loading indicator. Defaults to `true`. | `boolean` |
|
||||
| `spinner` | `spinner` | The name of the spinner to display. Possible values are: `"lines"`, `"lines-small"`, `"dots"`, `"bubbles"`, `"circles"`, `"crescent"`. | `string` |
|
||||
| `translucent` | `translucent` | If true, the loading indicator will be translucent. Defaults to `false`. | `boolean` |
|
||||
|
||||
Reference in New Issue
Block a user