Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
Element
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
CI / CD Analytics
Repository Analytics
Value Stream Analytics
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
林焕东
Element
Commits
7e29e1c6
Commit
7e29e1c6
authored
Sep 30, 2018
by
ZSkycat
Committed by
hetech
Sep 30, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tree: fix type definition (#12941)
parent
74827513
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
types/tree.d.ts
types/tree.d.ts
+11
-2
No files found.
types/tree.d.ts
View file @
7e29e1c6
...
...
@@ -4,10 +4,18 @@ import { ElementUIComponent } from './component';
export
interface
TreeData
{
id
?:
any
;
label
?:
string
;
disabled
?:
boolean
;
isLeaf
?:
boolean
;
children
?:
TreeData
[];
}
export
interface
TreeProps
{
label
:
string
;
disabled
:
string
;
isLeaf
:
string
;
children
:
string
;
}
export
interface
TreeNode
<
K
,
D
>
{
checked
:
boolean
;
childNodes
:
TreeNode
<
K
,
D
>
[];
...
...
@@ -25,6 +33,7 @@ export interface TreeNode<K, D> {
disabled
:
boolean
;
icon
:
string
;
key
:
K
;
label
:
string
;
nextSibling
:
TreeNode
<
K
,
D
>
|
null
;
previousSibling
:
TreeNode
<
K
,
D
>
|
null
;
}
...
...
@@ -49,7 +58,7 @@ export declare class ElTree<K = any, D = TreeData> extends ElementUIComponent {
nodeKey
:
string
;
/** Configuration options, see the following table */
props
:
object
;
props
:
TreeProps
;
/** Method for loading subtree data */
load
:
(
data
:
D
,
resolve
:
Function
)
=>
void
;
...
...
@@ -216,7 +225,7 @@ export declare class ElTree<K = any, D = TreeData> extends ElementUIComponent {
*
* @param by node key or node data
*/
getNode
(
by
:
D
|
K
):
D
;
getNode
(
by
:
D
|
K
):
TreeNode
<
K
,
D
>
;
/**
* Remove node by key or node data or node instance
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment