feat: support vue 3.3 slot type

pull/6588/head
tangjinzhou 2 years ago
parent 03760e3e3d
commit c9f0841628

@ -11,7 +11,7 @@ import { getSize, getSuccessPercent, validProgress } from './utils';
import useConfigInject from '../config-provider/hooks/useConfigInject';
import devWarning from '../vc-util/devWarning';
import { progressProps, progressStatuses } from './props';
import type { VueNode, CustomSlotsType, VueNode } from '../_util/type';
import type { VueNode, CustomSlotsType } from '../_util/type';
import useStyle from './style';
export default defineComponent({

@ -4,7 +4,7 @@ import classNames from '../../_util/classNames';
import useConfigInject from '../../config-provider/hooks/useConfigInject';
import { initDefaultProps } from '../../_util/props-util';
import useStyle from '../style';
import type { VueNode } from '../../_util/type';
import type { CustomSlotsType, VueNode } from '../../_util/type';
import { functionType, someType, arrayType, booleanType, stringType } from '../../_util/type';
import type { ChangeEvent } from '../../_util/EventInterface';
import MotionThumb from './MotionThumb';
@ -115,7 +115,9 @@ export default defineComponent({
options: [],
motionName: 'thumb-motion',
}),
slots: ['label'],
slots: Object as CustomSlotsType<{
label: SegmentedBaseOption;
}>,
setup(props, { emit, slots, attrs }) {
const { prefixCls, direction, size } = useConfigInject('segmented', props);
const [wrapSSR, hashId] = useStyle(prefixCls);

Loading…
Cancel
Save