UNPKG

@aplus-frontend/ui

Version:

57 lines (56 loc) 1.6 kB
import { ApFieldTextAreaProps, ApFieldTextProps } from '../../ap-field/interface'; import { ApFormItemProps } from '../../ap-form'; import { DefaultOptionType } from '@aplus-frontend/antdv/es/select'; import { StyleValue } from 'vue'; export type BatchInputGroupValueType = { key: any[]; value: string[]; }; export interface BatchInputGroupProps extends Omit<ApFieldTextProps, 'value' | 'onUpdate:value' | 'style'> { /** * 下拉框自定义样式 */ style?: StyleValue; /** * 输入框样式 */ inputStyle?: StyleValue; /** * 下拉框可选项列表 */ options?: DefaultOptionType[]; /** * 是否为下拉框添加全选选项 */ hasAll?: boolean; /** * v-model */ value?: BatchInputGroupValueType; 'onUpdate:value'?: (nextValue: BatchInputGroupValueType) => void; /** * 设置弹出层弹出的位置,默认为`left` */ popoverPlacement?: 'left' | 'right' | number; /** * 最大输入条数,默认为200 */ maxNum?: number; } export interface BatchInputGroupPopoverInputProps extends Pick<ApFieldTextAreaProps, 'value' | 'onUpdate:value'> { _parent?: HTMLElement; onClose?: () => void; disabled?: boolean; maxNum?: number; } export type ApFormItemBatchInputProps = ApFormItemProps & { field?: Omit<BatchInputGroupProps, 'value' | 'onUpdate:value'>; disabled?: boolean; placeholer?: string; trim?: boolean; /** * 是否默认选择所有的key * @default true */ defaultSelectedAllKey?: boolean; };