Refactor #4149 - For Tree
parent
fd8ec80581
commit
4532253422
|
@ -212,6 +212,10 @@ export interface TreeState {
|
||||||
* Defines current options in Tree component.
|
* Defines current options in Tree component.
|
||||||
*/
|
*/
|
||||||
export interface TreeContext {
|
export interface TreeContext {
|
||||||
|
/**
|
||||||
|
* Index of the node.
|
||||||
|
*/
|
||||||
|
index: number;
|
||||||
/**
|
/**
|
||||||
* Current expanded state of the node as a boolean.
|
* Current expanded state of the node as a boolean.
|
||||||
* @defaultValue false
|
* @defaultValue false
|
||||||
|
@ -227,6 +231,11 @@ export interface TreeContext {
|
||||||
* @defaultValue false
|
* @defaultValue false
|
||||||
*/
|
*/
|
||||||
checked: boolean;
|
checked: boolean;
|
||||||
|
/**
|
||||||
|
* Current leaf state of the node as a boolean.
|
||||||
|
* @defaultValue false
|
||||||
|
*/
|
||||||
|
leaf: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -114,9 +114,11 @@ export default {
|
||||||
getPTOptions(key) {
|
getPTOptions(key) {
|
||||||
return this.ptm(key, {
|
return this.ptm(key, {
|
||||||
context: {
|
context: {
|
||||||
|
index: this.index,
|
||||||
expanded: this.expanded,
|
expanded: this.expanded,
|
||||||
selected: this.selected,
|
selected: this.selected,
|
||||||
checked: this.checked
|
checked: this.checked,
|
||||||
|
leaf: this.leaf
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue