mirror of https://github.com/ElemeFE/element
Types: complete method declarations in the documentation (#10233)
* Chore: complete the method declarations specified in the document * Fix: fix a misspell mistakepull/10236/head
parent
441669f081
commit
d0809e4915
|
@ -37,4 +37,10 @@ export declare class ElMenu extends ElementUIComponent {
|
||||||
|
|
||||||
/** Whether the menu collapse transition is active */
|
/** Whether the menu collapse transition is active */
|
||||||
collapseTransition: boolean
|
collapseTransition: boolean
|
||||||
|
|
||||||
|
/** Open the specified sub-menu */
|
||||||
|
open (index: string): void
|
||||||
|
|
||||||
|
/** Close the specified sub-menu */
|
||||||
|
close (index: string): void
|
||||||
}
|
}
|
||||||
|
|
|
@ -99,4 +99,21 @@ export declare class ElTable extends ElementUIComponent {
|
||||||
* @param row The row that is going to set as selected
|
* @param row The row that is going to set as selected
|
||||||
*/
|
*/
|
||||||
setCurrentRow (row?: object): void
|
setCurrentRow (row?: object): void
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Toggle or set if a certain row is expanded
|
||||||
|
*
|
||||||
|
* @param row The row that is going to set its expanded state
|
||||||
|
* @param expanded Whether the row is expanded. The expanded state will be toggled if not set
|
||||||
|
*/
|
||||||
|
toggleRowExpansion (row: object, expanded?: boolean): void
|
||||||
|
|
||||||
|
/** Clear sort status, reset the table to unsorted */
|
||||||
|
clearSort (): void
|
||||||
|
|
||||||
|
/** Clear filter, reset the table to unfiltered */
|
||||||
|
clearFilter (): void
|
||||||
|
|
||||||
|
/** Relayout the table, maybe needed when change the table or it's ancestors visibility */
|
||||||
|
doLayout (): void
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
import { CreateElement, VNode } from 'vue'
|
import { CreateElement, VNode } from 'vue'
|
||||||
import { ElementUIComponent } from './component'
|
import { ElementUIComponent } from './component'
|
||||||
|
|
||||||
|
export type TransferPanelPosition = 'left' | 'right'
|
||||||
|
|
||||||
export interface TransferData {
|
export interface TransferData {
|
||||||
key: any,
|
key: any,
|
||||||
label: string,
|
label: string,
|
||||||
|
@ -65,4 +67,7 @@ export declare class ElTransfer extends ElementUIComponent {
|
||||||
|
|
||||||
/** Key array of initially checked data items of the right list */
|
/** Key array of initially checked data items of the right list */
|
||||||
rightDefaultChecked: any[]
|
rightDefaultChecked: any[]
|
||||||
|
|
||||||
|
/** Clear the query text in specified panel */
|
||||||
|
clearQuery (which: TransferPanelPosition): void
|
||||||
}
|
}
|
||||||
|
|
|
@ -84,12 +84,20 @@ export declare class ElTree extends ElementUIComponent {
|
||||||
indent: number
|
indent: number
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filter all tree nodes.Ffiltered nodes will be hidden
|
* Filter all tree nodes. Filtered nodes will be hidden
|
||||||
*
|
*
|
||||||
* @param value The value to be used as first parameter for `filter-node-method`
|
* @param value The value to be used as first parameter for `filter-node-method`
|
||||||
*/
|
*/
|
||||||
filter (value: any): void
|
filter (value: any): void
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update the children of the node which specified by the key
|
||||||
|
*
|
||||||
|
* @param key the key of the node which children will be updated
|
||||||
|
* @param data the children data
|
||||||
|
*/
|
||||||
|
updateKeyChildren (key: any, data: TreeNode[]): void
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* If the node can be selected (`show-checkbox` is `true`), it returns the currently selected array of nodes
|
* If the node can be selected (`show-checkbox` is `true`), it returns the currently selected array of nodes
|
||||||
*
|
*
|
||||||
|
@ -129,6 +137,16 @@ export declare class ElTree extends ElementUIComponent {
|
||||||
*/
|
*/
|
||||||
setChecked (data: TreeNode | any, checked: boolean, deep: boolean): void
|
setChecked (data: TreeNode | any, checked: boolean, deep: boolean): void
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If the node can be selected (`show-checkbox` is `true`), it returns the currently half selected array of nodes
|
||||||
|
*/
|
||||||
|
getHalfCheckedNodes (): void
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If the node can be selected (`show-checkbox` is `true`), it returns the currently half selected array of nodes' keys
|
||||||
|
*/
|
||||||
|
getHalfCheckedKeys (): void;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the highlight node's key (null if no node is highlighted)
|
* Return the highlight node's key (null if no node is highlighted)
|
||||||
*/
|
*/
|
||||||
|
@ -152,4 +170,42 @@ export declare class ElTree extends ElementUIComponent {
|
||||||
* @param node The node to be highlighted
|
* @param node The node to be highlighted
|
||||||
*/
|
*/
|
||||||
setCurrentNode (node: TreeNode): void
|
setCurrentNode (node: TreeNode): void
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get node by node key or node data
|
||||||
|
*
|
||||||
|
* @param by node key or node data
|
||||||
|
*/
|
||||||
|
getNode (by: TreeNode | any): TreeNode
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove node by key or node data or node instance
|
||||||
|
*
|
||||||
|
* @param by key or node data or node instance
|
||||||
|
*/
|
||||||
|
remove (by: TreeNode | any): void
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Append a child node to specified node
|
||||||
|
*
|
||||||
|
* @param childData the data of appended node
|
||||||
|
* @param parent key or node data or node instance of the parent node
|
||||||
|
*/
|
||||||
|
append (childData: TreeNode, parent: TreeNode | any): void
|
||||||
|
|
||||||
|
/**
|
||||||
|
* insert a node before specified node
|
||||||
|
*
|
||||||
|
* @param data the data of inserted node
|
||||||
|
* @param ref key or node data or node instance of the reference node
|
||||||
|
*/
|
||||||
|
insertBefore (data: TreeNode, ref: TreeNode | any): void
|
||||||
|
|
||||||
|
/**
|
||||||
|
* insert a node after specified node
|
||||||
|
*
|
||||||
|
* @param data the data of inserted node
|
||||||
|
* @param ref key or node data or node instance of the reference node
|
||||||
|
*/
|
||||||
|
insertAfter (data: TreeNode, ref: TreeNode | any): void
|
||||||
}
|
}
|
||||||
|
|
|
@ -108,4 +108,10 @@ export declare class ElUpload extends ElementUIComponent {
|
||||||
|
|
||||||
/** Hook function when limit is exceeded */
|
/** Hook function when limit is exceeded */
|
||||||
onExceed: (file: ElUploadInternalFileDetail, fileList: ElUploadInternalFileDetail[]) => void
|
onExceed: (file: ElUploadInternalFileDetail, fileList: ElUploadInternalFileDetail[]) => void
|
||||||
|
|
||||||
|
/** Clear the upload file list */
|
||||||
|
clearFiles (): void;
|
||||||
|
|
||||||
|
/** Abort specified file */
|
||||||
|
abort (file: ElUploadInternalFileDetail): void
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue