@fesjs/fes-design
Version:
fes-design for PC
24 lines (23 loc) • 1.03 kB
TypeScript
import type { CSSProperties, Ref, VNodeChild } from 'vue';
import type { TreeOption } from '../tree/interface';
import type { TreeProps } from '../tree/props';
import type { RequiredByKeys } from '../_util/types';
import type { TransferInnerProps } from './props';
export type TreeFilter = TreeProps['filterMethod'];
export type TransferOption = RequiredByKeys<Pick<TreeOption, 'value' | 'disabled' | 'checkable'>, 'value'> & {
label: string;
children?: TransferOption[];
};
export type TransferOptionValue = NonNullable<TransferOption['value']>;
export type TransferFilter = (filterText: string, option: TransferOption) => ReturnType<TreeFilter>;
export interface TransferInjection {
rootProps: TransferInnerProps;
rootStyle: Ref<CSSProperties>;
modelValue: Ref<TransferOptionValue[]>;
filter: Ref<TransferFilter>;
scrollContentHeight: Ref<number | null>;
renderLabel: (option: TransferOption) => VNodeChild;
handleChange: (data: {
nextValue: TransferOptionValue[];
}) => void;
}