uview-pro
Version:
uView Pro,是全面支持Vue3的uni-app生态框架,70+精选组件已使用TypeScript重构,已全面支持uni-app Vue3.0
36 lines (32 loc) • 790 B
text/typescript
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: '#c7c7c7'
},
/** 加载图标的大小,单位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>;