UNPKG

hero-admin-ui

Version:
62 lines (61 loc) 1.45 kB
export declare enum PropItemTypes { STRING = "string", NUMBER = "number", ARRAY = "array", BOOLEAN = "boolean" } export interface OfItem { const: string; title: string; } export interface PropItem { type: PropItemTypes | string; title?: string; oneOf?: OfItem[]; anyOf?: OfItem[]; maxLength?: number; precision?: string; scale?: string; format?: string; updatable?: boolean; } export interface Schema { required?: string[]; properties: { [key: string]: PropItem; }; } export declare const UI_HIDDEN = "ui:hidden"; export declare const UI_DISABLED = "ui:disabled"; export declare const UI_WIDTH = "ui:width"; export declare const UI_OPTIONS = "ui:options"; export declare const UI_WIDGET = "ui:widget"; export declare const UI_COLUMN = "ui:column"; export declare enum UiWidgets { SELECT = "select", RADIO = "radio", CHECKBOX = "checkbox", SWITCH = "switch", INPUT = "input", TEXTAREA = "textarea" } export declare type UiSchemaItem = { [UI_HIDDEN]?: boolean; [UI_DISABLED]?: boolean; [UI_WIDTH]?: number; [UI_OPTIONS]?: { [key: string]: string | number | boolean | undefined; }; [UI_WIDGET]?: UiWidgets | string; [UI_COLUMN]?: number; }; export declare type UiSchema = { [key: string]: UiSchemaItem; }; /** * 页面页签Item类型 */ export declare type TabItem = { path: string; title: string; };