mirror of
https://github.com/youzan/vant.git
synced 2026-04-06 02:00:43 +08:00
types(SwitchCell): fix SwitchEvents
This commit is contained in:
@@ -4,7 +4,7 @@ import { inherit } from '../utils/functional';
|
||||
|
||||
// Components
|
||||
import Cell from '../cell';
|
||||
import Switch, { SwitchEvents } from '../switch';
|
||||
import Switch from '../switch';
|
||||
import { switchProps, SharedSwitchProps } from '../switch/shared';
|
||||
|
||||
// Types
|
||||
@@ -18,6 +18,10 @@ export type SwitchCellProps = SharedSwitchProps & {
|
||||
cellSize?: string;
|
||||
};
|
||||
|
||||
export type SwitchCellEvents = {
|
||||
onChange?(checked: boolean): void;
|
||||
};
|
||||
|
||||
const [createComponent, bem] = createNamespace('switch-cell');
|
||||
|
||||
function SwitchCell(
|
||||
@@ -54,4 +58,4 @@ SwitchCell.props = {
|
||||
},
|
||||
};
|
||||
|
||||
export default createComponent<SwitchCellProps, SwitchEvents>(SwitchCell);
|
||||
export default createComponent<SwitchCellProps, SwitchCellEvents>(SwitchCell);
|
||||
|
||||
Reference in New Issue
Block a user