跳到主要内容
版本:v8

动态旋转图标组件与属性

shadow

Spinner 组件提供多种动态 SVG 旋转图标。旋转图是视觉指示器,表示应用正在加载内容或执行其他需要用户等待的进程。

基本用法

默认的旋转图标基于当前模式(mode)而定。当模式为 ios 时,旋转图标为 "lines";当模式为 md 时,旋转图标为 "circular"。如果设置了 name 属性,则会使用指定的旋转图标,而非模式对应的默认图标。

主题定制

颜色

样式设计

你可以使用自定义 CSS 来设置旋转图标的样式。例如,可以通过设置宽度和高度来调整旋转图标的大小。

CSS 自定义属性

属性

color

DescriptionThe 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.
Attributecolor
Type"danger" | "dark" | "light" | "medium" | "primary" | "secondary" | "success" | "tertiary" | "warning" | string | undefined
Defaultundefined

duration

DescriptionDuration of the spinner animation in milliseconds. The default varies based on the spinner.
Attributeduration
Typenumber | undefined
Defaultundefined

name

DescriptionThe name of the SVG spinner to use. If a name is not provided, the platform's default spinner will be used.
Attributename
Type"bubbles" | "circles" | "circular" | "crescent" | "dots" | "lines" | "lines-sharp" | "lines-sharp-small" | "lines-small" | undefined
Defaultundefined

paused

DescriptionIf true, the spinner's animation will be paused.
Attributepaused
Typeboolean
Defaultfalse

事件

No events available for this component.

方法

No public methods available for this component.

CSS 影子部件

No CSS shadow parts available for this component.

CSS 自定义属性

NameDescription
--colorColor of the spinner

插槽

No slots available for this component.