jamis
Version:
一种支持通过JSON配置方式生成页面的组件库
57 lines (56 loc) • 1.86 kB
TypeScript
import type { SchemaClassName } from 'jamis-core';
import type { ButtonGroupSchema, FormOptionsControl, FormOptionsSchema, OptionsControlProps, SchemaCollection, TransferControlSchema } from '../types';
export * from './components/types';
export * from './NestedSelect.types';
export * from './SelectTypes';
export * from './UserSelect.types';
/**
* 按钮组控件。
*
*/
export interface ButtonGroupControlSchema extends Omit<ButtonGroupSchema, 'type'>, Omit<FormOptionsControl, 'size' | 'options'> {
type: 'button-group-select';
}
/**
* 链式下拉框
*
*/
export interface ChainedSelectControlSchema extends FormOptionsSchema {
type: 'chained-select';
}
export interface ChainedSelectProps extends OptionsControlProps, Omit<ChainedSelectControlSchema, 'options' | 'type' | 'source' | 'className' | 'descriptionClassName' | 'inputClassName'> {
}
/**
* List 复选框
*
*/
export interface ListControlSchema extends FormOptionsSchema {
type: 'list-select';
/**
* 开启双击点选并提交。
*/
submitOnDBClick?: boolean;
/**
* 图片div类名
* @deprecated 使用`slots.className`替代
*/
imageClassName?: string;
/**
* 可以自定义展示模板。
*/
itemSchema?: SchemaCollection;
/**
* 支持配置 list div 的 css 类名。
* 比如:flex justify-between
* @deprecated 使用`slots.className`替代
*/
listClassName?: SchemaClassName;
}
export interface TransferDropdownRendererProps extends OptionsControlProps, Omit<TransferControlSchema, 'type' | 'options' | 'inputClassName' | 'className' | 'descriptionClassName'> {
borderMode?: 'full' | 'half' | 'none';
hasError?: boolean;
/** 是否平铺 */
tiled?: boolean;
/** 多选时, 选中一项后是否自动清空搜索条件 */
autoClearSearchValue?: boolean;
}