ion-spinner
Spinner 组件提供多种动画 SVG 加载图标。旋转加载图标是视觉指示器,用于表示应用正在加载内容或执行其他需要用户等待的处理过程。
基本用法
默认的旋转加载图标基于应用模式 (mode) 决定。当模式为 ios 时,加载图标为 "lines";当模式为 md 时,加载图标为 "circular"。如果设置了 name 属性,则会使用该属性指定的加载图标,而非模式特定的加载图标。
主题定制
颜色
样式调整
您可以使用自定义 CSS 来设置加载图标的样式。例如,可以通过设置宽度和高度来调整加载图标的大小。
CSS 自定义属性
属性
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 | "danger" | "dark" | "light" | "medium" | "primary" | "secondary" | "success" | "tertiary" | "warning" | string | undefined |
| Default | undefined |
duration
| Description | Duration of the spinner animation in milliseconds. The default varies based on the spinner. |
| Attribute | duration |
| Type | number | undefined |
| Default | 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" | "circular" | "crescent" | "dots" | "lines" | "lines-sharp" | "lines-sharp-small" | "lines-small" | undefined |
| Default | undefined |
paused
| Description | If true, the spinner's animation will be paused. |
| Attribute | paused |
| Type | boolean |
| Default | false |
事件
No events available for this component.
方法
No public methods available for this component.
CSS Shadow Parts
No CSS shadow parts available for this component.
CSS 自定义属性
| Name | Description |
|---|---|
--color | Color of the spinner |
插槽
No slots available for this component.