jamis
Version:
一种支持通过JSON配置方式生成页面的组件库
83 lines (82 loc) • 1.93 kB
TypeScript
import type { ThemeProps } from 'jamis-core';
import type { BaseSchema, SchemaClassName, SchemaCollection, SchemaExpression } from '../types';
export interface SpinnerProps extends ThemeProps {
show?: boolean;
className?: SchemaClassName;
spinnerClassName?: SchemaClassName;
/**
* @deprecated 已废弃,没有作用
*/
mode?: string;
size?: 'sm' | 'lg' | '';
icon?: string | React.ReactNode;
tip?: string;
tipPlacement?: 'top' | 'right' | 'bottom' | 'left';
/** 延迟显示 */
delay?: number;
/** 是否显示遮罩层,有children属性才生效 */
overlay?: boolean;
/** 多少毫秒后自动关闭 */
closeAfter?: number;
/** 是否是全局性的spin */
asGlobalSpin?: boolean;
}
export interface SpinnerSchema extends BaseSchema {
/**
* 组件类型
*/
type: 'spinner';
/**
* 控制Spinner显示与隐藏
*/
show?: boolean;
/**
* 控制Spinner显示与隐藏
*/
showOn?: SchemaExpression;
/**
* 自定义spinner的class
*/
className?: SchemaClassName;
/**
* spin图标位置包裹元素的自定义class
*/
spinnerClassName?: SchemaClassName;
/**
* 作为容器使用时最外层元素的class
*/
spinnerWrapClassName?: SchemaClassName;
/**
* @deprecated 已废弃,没有作用
*/
mode?: string;
/**
* spinner Icon 大小
*/
size?: 'sm' | 'lg' | '';
/**
* 自定义icon
*/
icon?: string;
/**
* spinner文案
*/
tip?: string;
tipExpr?: SchemaExpression;
/**
* spinner文案位置
*/
tipPlacement?: 'top' | 'right' | 'bottom' | 'left';
/**
* 延迟显示
*/
delay?: number;
/**
* 是否显示遮罩层
*/
overlay?: boolean;
/**
* 作为容器使用时内容
*/
body?: SchemaCollection;
}