ion-spinner

概要(CONTENTS)

Ionic4项目中我们可以使用Ionic4进度指示组件ion-spinner对项目进行布局。ion-spinner中有ionic ion-spinner 用法(Usage) ,ionic ion-spinner 属性(Properties) ,ionic ion-spinner 中的CSS 自定义属性等

The Spinner component provides a variety of animated SVG spinners. Spinners are visual indicators that the app is loading content or performing another process that the user needs to wait on.

The default spinner to use is based on the platform. The default spinner for ios is "lines", and the default for android is "crescent". If the platform is not ios or android, the spinner will default to crescent. If the name property is set, then that spinner will be used instead of the platform specific spinner.

ion-spinner 用法(Usage)

angular javascript

<ion-spinner>ion-spinner>


<ion-spinner name="lines">ion-spinner>


<ion-spinner name="lines-small">ion-spinner>


<ion-spinner name="dots">ion-spinner>


<ion-spinner name="bubbles">ion-spinner>


<ion-spinner name="circles">ion-spinner>


<ion-spinner name="crescent">ion-spinner>


<ion-spinner paused>ion-spinner>

<ion-spinner>ion-spinner>


<ion-spinner name="lines">ion-spinner>


<ion-spinner name="lines-small">ion-spinner>


<ion-spinner name="dots">ion-spinner>


<ion-spinner name="bubbles">ion-spinner>


<ion-spinner name="circles">ion-spinner>


<ion-spinner name="crescent">ion-spinner>


<ion-spinner paused>ion-spinner>

ion-spinner 属性(Properties)

color

Description

The color to use from your application's color palette. Default options are: "primary", "secondary", "tertiary", "success", "warning", "danger", "light", "medium", and "dark". For more information on colors, see theming.

Attribute color
Type string | undefined

duration

Description

Duration of the spinner animation in milliseconds. The default varies based on the spinner.

Attribute duration
Type number | undefined

name

Description

The name of the SVG spinner to use. If a name is not provided, the platform's default spinner will be used.

Attribute name
Type "bubbles" | "circles" | "crescent" | "dots" | "lines" | "lines-small" | undefined

paused

Description

If true, the spinner's animation will be paused.

Attribute paused
Type boolean

ion-spinner中的CSS 自定义属性

Name Description
--color Color of the spinner