zjk
2026-09-29 54dcf0a82e7490fa58b1c056d5c0b9cb739c2931
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import type { ExtractPropTypes, PropType } from 'vue';
 
type LoadingMode = 'circle' | 'flower';
 
/**
 * u-loading 组件 props 类型定义
 * @description 加载动画,支持多种模式
 */
export const LoadingProps = {
    /** 动画的类型 */
    mode: {
        type: String as PropType<LoadingMode>,
        default: 'circle'
    },
    /** 动画的颜色 */
    color: {
        type: String,
        default: 'var(--u-light-color)'
    },
    /** 加载图标的大小,单位rpx */
    size: {
        type: [String, Number] as PropType<string | number>,
        default: '34'
    },
    /** 是否显示动画 */
    show: {
        type: Boolean,
        default: true
    }
};
 
/**
 * u-loading 组件 props 类型
 */
export type LoadingProps = ExtractPropTypes<typeof LoadingProps>;