export type tableColumn = Record<string, string>;
|
export interface State {
|
/** 组件实例 */
|
transferRef: any;
|
/** 显示在右侧框数据的 key 集合 */
|
targetKeys: string[];
|
originTargetKeys: string[];
|
/** 数据源,其中的数据将会被渲染到左边一栏 */
|
dataSource: TransferData[];
|
/** 往父级组件传递的数据 */
|
emitKeys: string[];
|
leftColumns: TableColumns[];
|
rightColumns: TableColumns[];
|
/** 编辑 key */
|
editKey: string[];
|
titles: string[];
|
}
|
|
export interface TransferData {
|
key: string;
|
title: string;
|
description: string;
|
disabled: boolean;
|
}
|
|
export interface UseTreeTransfer {
|
state: State;
|
/** 穿梭更改 */
|
onChange: (targetKeys: string[], direction: string) => void;
|
seDatas: (
|
titles: string[],
|
dataSource: TransferData[],
|
targetKeys: string[],
|
rightColumns: [],
|
leftColumns: [],
|
) => void;
|
}
|
|
export interface TransferProps {
|
/** 组件实例 */
|
transferRef: any;
|
dataSource: TransferData[];
|
/** 编辑 key */
|
editKey: string[];
|
leftColumns: TableColumns[];
|
rightColumns: TableColumns[];
|
titles: string[];
|
}
|
|
export interface TableColumns {
|
dataIndex: string;
|
title: string;
|
}
|