parent
5af08c0904
commit
67066e2fb6
|
@ -64,7 +64,7 @@ function formatTreeData(
|
||||||
|
|
||||||
function dig(dataNodes: DataNode[]) {
|
function dig(dataNodes: DataNode[]) {
|
||||||
return (dataNodes || []).map(node => {
|
return (dataNodes || []).map(node => {
|
||||||
const { key, disableCheckbox, disabled, checkable, selectable } = node;
|
const { key, disableCheckbox, disabled, checkable, selectable, isLeaf } = node;
|
||||||
|
|
||||||
const value = node[fieldValue];
|
const value = node[fieldValue];
|
||||||
const mergedValue = fieldValue in node ? value : key;
|
const mergedValue = fieldValue in node ? value : key;
|
||||||
|
@ -77,6 +77,7 @@ function formatTreeData(
|
||||||
title: getLabelProp(node),
|
title: getLabelProp(node),
|
||||||
node,
|
node,
|
||||||
selectable,
|
selectable,
|
||||||
|
isLeaf,
|
||||||
dataRef: node,
|
dataRef: node,
|
||||||
checkable,
|
checkable,
|
||||||
};
|
};
|
||||||
|
|
|
@ -37,6 +37,7 @@ export interface InternalDataEntity {
|
||||||
disableCheckbox: boolean;
|
disableCheckbox: boolean;
|
||||||
disabled: boolean;
|
disabled: boolean;
|
||||||
selectable: boolean;
|
selectable: boolean;
|
||||||
|
isLeaf: boolean;
|
||||||
children?: InternalDataEntity[];
|
children?: InternalDataEntity[];
|
||||||
|
|
||||||
/** Origin DataNode */
|
/** Origin DataNode */
|
||||||
|
|
Loading…
Reference in New Issue