Skip to content

LoadingIcon 加载动画

加载状态动画图标,支持 spinner / circular / dots / pulse 四种动画类型。

平台兼容

平台支持情况
H5支持
微信小程序支持
支付宝小程序支持
APP支持

基础用法

默认使用 spinner 类型的加载动画。

vue
<template>
  <SeeLoadingIcon />
</template>

动画类型

通过 type 属性设置动画类型,支持 spinnercirculardotspulse 四种类型。

vue
<template>
  <SeeLoadingIcon type="spinner" />
  <SeeLoadingIcon type="circular" />
  <SeeLoadingIcon type="dots" />
  <SeeLoadingIcon type="pulse" />
</template>

自定义颜色

通过 color 属性设置加载动画的颜色。

vue
<template>
  <SeeLoadingIcon color="#07c160" />
  <SeeLoadingIcon color="#ee0a24" />
  <SeeLoadingIcon color="#1989fa" />
</template>

自定义尺寸

通过 size 属性设置加载动画的尺寸。

vue
<template>
  <SeeLoadingIcon size="32rpx" />
  <SeeLoadingIcon size="64rpx" />
  <SeeLoadingIcon size="96rpx" />
</template>

自定义速度

通过 speed 属性设置动画速度,单位为秒。

vue
<template>
  <SeeLoadingIcon :speed="0.4" />
  <SeeLoadingIcon :speed="0.8" />
  <SeeLoadingIcon :speed="1.2" />
</template>

Props

属性说明类型默认值
type动画类型'spinner' | 'circular' | 'dots' | 'pulse''spinner'
size尺寸string'60rpx'
color颜色string'var(--see-primary)'
speed动画速度(秒)number0.8

类型定义

typescript
type LoadingIconType = 'spinner' | 'circular' | 'dots' | 'pulse'

interface SeeLoadingIconProps {
  type?: LoadingIconType
  size?: string
  color?: string
  speed?: number
}

辽 ICP 备 2025070134 号