import type { OptionItem, DateItem } from '../../types' import type { DefineComponent } from 'vue' export type FormItem = { id: string | number name: string type?: 'text' | 'number' | 'password' | 'radio' | 'checkbox' | 'textarea' | 'date' /** 值(仅 type 为 checkbox 时为 string[]) */ value: string | string[] placeholder?: string disabled?: boolean readonly?: boolean width?: string height?: string options?: OptionItem[] /** 是否启用选项过滤 (仅 type 为 radio 时有效) */ filter?: boolean /** 格式化 (仅 type 为 date 时有效) */ format?: (date: DateItem) => string /** 是否启用校验(仅 type 为 radio 或 date 时有效) */ verify?: boolean /** 弹窗 z-index(仅 type 为 radio 或 date 时有效)*/ zIndex?: number /** 是否警告 */ warning?: boolean } interface Props { /** 表单项默认宽 */ itemWidth?: string /** 标单项默认高 */ itemHeight?: string items: FormItem[] } type Exposed = { /** 校验结果(key 为表单项 id,textarea 和 checkbox 不参与校验) */ verifications: Record } type Emits = { 'update:items': (value: FormItem[]) => any } declare const _default: DefineComponent & { new (): Exposed } export default _default