Browse Source

fix: 泛型非必传 (#40960)

pull/41286/head
叶枫 2 years ago
committed by GitHub
parent
commit
476b70fcf2
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      components/cascader/index.tsx

4
components/cascader/index.tsx

@ -101,7 +101,7 @@ type MultipleCascaderProps = Omit<RcMultipleCascaderProps, 'checkable' | 'option
type UnionCascaderProps = SingleCascaderProps | MultipleCascaderProps;
export type CascaderProps<DataNodeType> = UnionCascaderProps & {
export type CascaderProps<DataNodeType = any> = UnionCascaderProps & {
multiple?: boolean;
size?: SizeType;
disabled?: boolean;
@ -122,7 +122,7 @@ export interface CascaderRef {
blur: () => void;
}
const Cascader = React.forwardRef((props: CascaderProps<any>, ref: React.Ref<CascaderRef>) => {
const Cascader = React.forwardRef((props: CascaderProps, ref: React.Ref<CascaderRef>) => {
const {
prefixCls: customizePrefixCls,
size: customizeSize,

Loading…
Cancel
Save