feat(SelectTree): 更新 onGetLabel 类型定义支持字符串数组
- 修改 onGetLabel 回调函数参数类型为 string | string[] - 允许获取标签值时支持单个字符串或字符串数组返回值 - 提升组件在多选场景下的类型安全性和灵活性master
parent
25d7a374e8
commit
248e60c77a
|
|
@ -22,7 +22,7 @@ export interface BasicSelectTreeProps extends Omit<TreeSelectProps, "fieldNames"
|
|||
/** 控制只能选择到第几级 */
|
||||
level?: number;
|
||||
/** 获取 label */
|
||||
onGetLabel?: (label: string) => void;
|
||||
onGetLabel?: (label: string | string[]) => void;
|
||||
/** 获取数据 */
|
||||
onGetData?: (data: Record<string, any>[], processedData: Record<string, any>[]) => void;
|
||||
/** 是否只允许选择最后一级,默认 false */
|
||||
|
|
|
|||
Loading…
Reference in New Issue