jamis
Version:
一种支持通过JSON配置方式生成页面的组件库
57 lines (56 loc) • 1.01 kB
TypeScript
import type { BaseSchema, SchemaCollection } from '../types';
/**
* Carousel 轮播图组件。
*
*/
export interface CarouselSchema extends BaseSchema {
/**
* 指定为轮播图类型
*/
type: 'carousel';
/**
* 是否自动播放
*/
auto?: boolean;
/**
* 轮播间隔时间
*/
interval?: number | string;
/**
* 动画时长
*/
duration?: number;
/**
* 设置宽度
*/
width?: number;
/**
* 设置高度
*/
height?: number;
controlsTheme?: 'light' | 'dark';
/**
* 占位
*/
placeholder?: string;
/**
* 配置控件内容
*/
controls?: Array<'dots' | 'arrows'>;
/**
* 动画类型
*/
animation?: 'fade' | 'slide';
/**
* 配置单条呈现模板
*/
itemSchema?: SchemaCollection;
/**
* 预览图模式
*/
thumbMode?: 'contain' | 'cover';
/**
* 配置固定值
*/
options?: Array<any>;
}