jamis
Version:
一种支持通过JSON配置方式生成页面的组件库
39 lines (38 loc) • 987 B
TypeScript
import type { BaseSchema, SchemaClassName, SchemaIcon, SchemaObject, SchemaTpl } from '../../types';
/**
* 提示组件,默认会显示个小图标,鼠标放上来的时候显示配置的内容。
*/
export interface RemarkSchema extends BaseSchema {
/**
* 指定为提示类型
*/
type: 'remark';
label?: string;
labelClassName?: SchemaClassName;
icon?: SchemaIcon;
iconClassName?: SchemaClassName;
tooltipClassName?: SchemaClassName;
/**
* 触发规则
*/
trigger?: Array<'click' | 'hover' | 'focus'>;
/**
* 提示标题
*/
title?: string;
/**
* 提示内容
*/
content: SchemaTpl | SchemaObject;
/**
* 显示位置
*/
placement?: 'top' | 'right' | 'bottom' | 'left';
/**
* 点击其他内容时是否关闭弹框信息
*/
rootClose?: boolean;
}
export type SchemaRemark = string | (Omit<RemarkSchema, 'type'> & {
type?: RemarkSchema['type'];
});