Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tree 组件的类型定义为泛类型 #15934

Merged
merged 1 commit into from
Jul 2, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions types/element-ui.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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 {}
Expand Down
2 changes: 1 addition & 1 deletion types/tree.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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>;

Expand Down