Tree: make el-tree generic (#15934)

This commit is contained in:
jeremywu 2019-07-02 17:04:42 +08:00 committed by hetech
parent d983bc6674
commit 8a42dd1fcc
2 changed files with 3 additions and 3 deletions

View File

@ -67,7 +67,7 @@ import { ElTimePicker } from './time-picker'
import { ElTimeSelect } from './time-select'
import { ElTooltip } from './tooltip'
import { ElTransfer } from './transfer'
import { ElTree } from './tree'
import { ElTree, TreeData } from './tree'
import { ElUpload } from './upload'
import { ElLink } from './link'
import { ElDivider } from './divider'
@ -305,7 +305,7 @@ export class Tooltip extends ElTooltip {}
export class Transfer extends ElTransfer {}
/** Tree Component */
export class Tree extends ElTree {}
export class Tree<K = any, D = TreeData> extends ElTree<K, D> {}
/** Upload Component */
export class Upload extends ElUpload {}

2
types/tree.d.ts vendored
View File

@ -45,7 +45,7 @@ export interface TreeStore<K, D> {
}
/** Tree Component */
export declare class ElTree<K = any, D = TreeData> extends ElementUIComponent {
export declare class ElTree<K, D extends TreeData> extends ElementUIComponent {
/** TreeStore */
store: TreeStore<K, D>;