Merge branch 'master' into wuxh/fix-51166

This commit is contained in:
𝑾𝒖𝒙𝒉 2024-10-12 11:32:16 +08:00 committed by GitHub
commit 598ccfb558
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 8 deletions

View File

@ -1,7 +1,6 @@
---
order: 6
title: Changelog
toc: false
timeline: true
tag: vVERSION
---

View File

@ -2,6 +2,7 @@ import * as React from 'react';
import LoadingOutlined from '@ant-design/icons/LoadingOutlined';
import classNames from 'classnames';
import RcSwitch from 'rc-switch';
import type { SwitchChangeEventHandler, SwitchClickEventHandler } from 'rc-switch';
import useMergedState from 'rc-util/lib/hooks/useMergedState';
import Wave from '../_util/wave';
@ -11,11 +12,7 @@ import useSize from '../config-provider/hooks/useSize';
import useStyle from './style';
export type SwitchSize = 'small' | 'default';
export type SwitchChangeEventHandler = (
checked: boolean,
event: React.MouseEvent<HTMLButtonElement>,
) => void;
export type SwitchClickEventHandler = SwitchChangeEventHandler;
export type { SwitchChangeEventHandler, SwitchClickEventHandler };
export interface SwitchProps {
prefixCls?: string;
@ -110,11 +107,10 @@ const InternalSwitch = React.forwardRef<HTMLButtonElement, SwitchProps>((props,
return wrapCSSVar(
<Wave component="Switch">
{/* @ts-ignore */}
<RcSwitch
{...restProps}
checked={checked}
onChange={changeHandler as any}
onChange={changeHandler}
prefixCls={prefixCls}
className={classes}
style={mergedStyle}