Skip to content

Commit

Permalink
fix(Cascader): tree-store children type add boolean (#1615)
Browse files Browse the repository at this point in the history
Co-authored-by: Heising <[email protected]>
  • Loading branch information
HaixingOoO and Heising authored Oct 8, 2023
1 parent f6d0610 commit 185c6c1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion js/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export type OptionData = {
} & PlainObject;

export type TreeOptionData<T = string | number> = {
children?: Array<TreeOptionData<T>>;
children?: Array<TreeOptionData<T>> | boolean;
/** option label content */
label?: any;
/** option search text */
Expand Down
8 changes: 4 additions & 4 deletions js/tree/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,9 @@ export interface TreeNodeModel<
* 移除当前节点或当前节点的子节点,值为空则移除当前节点,值存在则移除当前节点的子节点
*/
remove: (value?: TreeNodeValue) => void;
/**
* 设置当前节点数据,数据变化可自动刷新页面,泛型 `T` 表示树节点 TS 类型
*/
/**
* 设置当前节点数据,数据变化可自动刷新页面,泛型 `T` 表示树节点 TS 类型
*/
setData: (data: T) => void;
}

Expand Down Expand Up @@ -210,7 +210,7 @@ export interface TypeTreeFilterOptions {
}

export interface TypeTreeNodeData extends TreeNodeState {
children?: TypeTreeNodeData[];
children?: TypeTreeNodeData[] | boolean;
[key: string]: any;
}

Expand Down

0 comments on commit 185c6c1

Please sign in to comment.