ion-spinner
旋转器(Spinner)组件提供各种动画 SVG 旋转器。旋转器是视觉指示器,表示应用正在加载内容或执行其他需要用户等待的进程。
基本用法
默认旋转器基于模式。当模式为 ios 时,旋转器为 "lines";当模式为 md 时,旋转器为 "circular"。如果设置了 name 属性,将使用该旋转器而不是特定于模式的旋转器。
主题
颜色
样式
你可以使用自定义 CSS 来设置旋转器的样式。例如,你可以通过设置宽度和高度来调整旋转器大小。
CSS 自定义属性
属性
color
| 说明 | 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. |
| 属性 | color |
| 类型 | "danger" | "dark" | "light" | "medium" | "primary" | "secondary" | "success" | "tertiary" | "warning" | string | undefined |
| 默认值 | undefined |
duration
| 说明 | Duration of the spinner animation in milliseconds. The default varies based on the spinner. |
| 属性 | duration |
| 类型 | number | undefined |
| 默认值 | undefined |
name
| 说明 | The name of the SVG spinner to use. If a name is not provided, the platform's default spinner will be used. |
| 属性 | name |
| 类型 | "bubbles" | "circles" | "circular" | "crescent" | "dots" | "lines" | "lines-sharp" | "lines-sharp-small" | "lines-small" | undefined |
| 默认值 | undefined |
paused
| 说明 | If true, the spinner's animation will be paused. |
| 属性 | paused |
| 类型 | boolean |
| 默认值 | false |
事件
该组件没有可用的事件。
方法
该组件没有可用的公共方法。
CSS 阴影部分
该组件没有可用的 CSS 阴影部分。
CSS 自定义属性
| Name | 说明 |
|---|---|
--color | Color of the spinner |
插槽
该组件没有可用的插槽。