Skip to content

Commit c9f0841

Browse files
committed
feat: support vue 3.3 slot type
1 parent 03760e3 commit c9f0841

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

components/progress/progress.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { getSize, getSuccessPercent, validProgress } from './utils';
1111
import useConfigInject from '../config-provider/hooks/useConfigInject';
1212
import devWarning from '../vc-util/devWarning';
1313
import { progressProps, progressStatuses } from './props';
14-
import type { VueNode, CustomSlotsType, VueNode } from '../_util/type';
14+
import type { VueNode, CustomSlotsType } from '../_util/type';
1515
import useStyle from './style';
1616

1717
export default defineComponent({

components/segmented/src/segmented.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import classNames from '../../_util/classNames';
44
import useConfigInject from '../../config-provider/hooks/useConfigInject';
55
import { initDefaultProps } from '../../_util/props-util';
66
import useStyle from '../style';
7-
import type { VueNode } from '../../_util/type';
7+
import type { CustomSlotsType, VueNode } from '../../_util/type';
88
import { functionType, someType, arrayType, booleanType, stringType } from '../../_util/type';
99
import type { ChangeEvent } from '../../_util/EventInterface';
1010
import MotionThumb from './MotionThumb';
@@ -115,7 +115,9 @@ export default defineComponent({
115115
options: [],
116116
motionName: 'thumb-motion',
117117
}),
118-
slots: ['label'],
118+
slots: Object as CustomSlotsType<{
119+
label: SegmentedBaseOption;
120+
}>,
119121
setup(props, { emit, slots, attrs }) {
120122
const { prefixCls, direction, size } = useConfigInject('segmented', props);
121123
const [wrapSSR, hashId] = useStyle(prefixCls);

0 commit comments

Comments
 (0)