import { IBaseForm } from '../baseForm' import { ObjectInterface, paramsInterfaceValidKey } from '../../../script/index' interface Button { show?: boolean disabled?: Function tip?: string, methods?: Function name?: string } interface Select { slot?: string, model: string, clearable?: boolean disabled?: Function options: Function optionI18n?: boolean, placeholder?: Function, methods?: Function style?: ObjectInterface } // @ts-ignore export interface InputInterface extends IBaseForm { name?: string autofocus?: boolean clearable?: boolean maxlength?: number minRow?: number noTrim?: boolean prefixIcon?: string button?: Button keyEvent?: boolean prepend?: Select select?: Select inputType?: string showPassword?: boolean showLimit?: boolean filters?: Function | boolean filterOptions?: Function | boolean filterMethod?: Function filterInput?: Function | boolean blurMethod?: Function inputMethod?: Function i18nParams?: ObjectInterface } export class InputConfig implements InputInterface { model = '' type = 'infoInput' label = '' name = '' autofocus = false clearable = false maxlength = 2000 minRow = 3 size = '' noTrim = false prefixIcon = '' button: Button = {} inputType = 'text' constructor (params: InputInterface) { paramsInterfaceValidKey(this, params) } placeholder = (): string => 'pleaseInput' methods = (): void => { } disabled = (): boolean => false }