mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-11-30 19:19:26 +08:00
fix: type incompatibility in strict mode (#36189)
* fix: type incompatibility * fix: type
This commit is contained in:
parent
88415f45e1
commit
3ea2817549
@ -44,6 +44,7 @@ export interface TreeSelectProps<
|
||||
| 'getInputElement'
|
||||
| 'backfill'
|
||||
| 'treeLine'
|
||||
| 'switcherIcon'
|
||||
> {
|
||||
suffixIcon?: React.ReactNode;
|
||||
size?: SizeType;
|
||||
@ -52,7 +53,7 @@ export interface TreeSelectProps<
|
||||
bordered?: boolean;
|
||||
treeLine?: TreeProps['showLine'];
|
||||
status?: InputStatus;
|
||||
switcherIcon?: SwitcherIcon;
|
||||
switcherIcon?: SwitcherIcon | RcTreeSelectProps<ValueType, OptionType>['switcherIcon'];
|
||||
}
|
||||
|
||||
const InternalTreeSelect = <OptionType extends BaseOptionType | DefaultOptionType = BaseOptionType>(
|
||||
|
@ -102,7 +102,10 @@ interface DraggableConfig {
|
||||
}
|
||||
|
||||
export interface TreeProps<T extends BasicDataNode = DataNode>
|
||||
extends Omit<RcTreeProps<T>, 'prefixCls' | 'showLine' | 'direction' | 'draggable'> {
|
||||
extends Omit<
|
||||
RcTreeProps<T>,
|
||||
'prefixCls' | 'showLine' | 'direction' | 'draggable' | 'icon' | 'switcherIcon'
|
||||
> {
|
||||
showLine?: boolean | { showLeafIcon: boolean };
|
||||
className?: string;
|
||||
/** 是否支持多选 */
|
||||
@ -139,8 +142,11 @@ export interface TreeProps<T extends BasicDataNode = DataNode>
|
||||
draggable?: DraggableFn | boolean | DraggableConfig;
|
||||
style?: React.CSSProperties;
|
||||
showIcon?: boolean;
|
||||
icon?: ((nodeProps: AntdTreeNodeAttribute) => React.ReactNode) | React.ReactNode;
|
||||
switcherIcon?: SwitcherIcon;
|
||||
icon?:
|
||||
| ((nodeProps: AntdTreeNodeAttribute) => React.ReactNode)
|
||||
| React.ReactNode
|
||||
| RcTreeProps<T>['icon'];
|
||||
switcherIcon?: SwitcherIcon | RcTreeProps<T>['switcherIcon'];
|
||||
prefixCls?: string;
|
||||
children?: React.ReactNode;
|
||||
blockNode?: boolean;
|
||||
|
Loading…
Reference in New Issue
Block a user