import {IBaseForm} from '../baseForm' import {paramsInterfaceValidKey} from '../../../script/index' interface IProps { children: string label: string value: string nodeKey: string } export interface TreeSelectInterface extends IBaseForm { filterable?: boolean multiple?: boolean clearable?: boolean | Function collapseTags?: boolean popperClass?: string loading?: Function options: Function visibleChanges?: Function teleported?: boolean showCheckbox?: boolean checkStrictly?: boolean props?: Partial } export class TreeSelectConfig implements TreeSelectInterface { type = 'infoTreeSelect' label = '' model = '' multiple = false popperClass = '' props = { children: 'children', label: 'name', value: 'id', nodeKey: 'id' } constructor (params: TreeSelectInterface) { paramsInterfaceValidKey(this, params) } defaultVal = () => '' placeholder = (): string => (window as any).$t('pleaseSelect') disabled = (): boolean => false loading = (): boolean => false options = () => [] }