element/types/transfer.d.ts

74 lines
1.7 KiB
TypeScript
Raw Normal View History

2017-10-18 18:31:03 +08:00
import { CreateElement, VNode } from 'vue'
import { ElementUIComponent } from './component'
export type TransferPanelPosition = 'left' | 'right'
2017-10-18 18:31:03 +08:00
export interface TransferData {
key: any,
label: string,
disabled: boolean
}
export interface TransferFormat {
noChecked: string,
hasChecked: string,
}
export interface TransferProps {
key: string,
label: string,
disabled: string
}
export interface TransferRenderContent {
/**
* Render function for a specific option
*
* @param h The render function
* @param option The option data object
*/
(h: CreateElement, option: TransferData): VNode
}
/** Transfer Component */
export declare class ElTransfer extends ElementUIComponent {
/** Data source */
data: TransferData[]
/** Whether Transfer is filterable */
filterable: boolean
/** Placeholder for the filter input */
filterPlaceholder: string
/** Custom filter method */
filterMethod: (query: string, item: TransferData) => boolean
2018-03-02 14:43:10 +08:00
/** Order strategy for elements in the target list */
targetOrder: string
2017-10-18 18:31:03 +08:00
/** Custom list titles */
titles: string[]
/** Custom button texts */
buttonTexts: string[]
/** Custom render function for data items */
renderContent: TransferRenderContent
/** Texts for checking status in list header */
format: TransferFormat
/** Prop aliases for data source */
props: TransferProps
/** Key array of initially checked data items of the left list */
leftDefaultChecked: any[]
/** Key array of initially checked data items of the right list */
rightDefaultChecked: any[]
/** Clear the query text in specified panel */
clearQuery (which: TransferPanelPosition): void
2017-10-18 18:31:03 +08:00
}