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 |