feat: support vue 3.3 slot type
parent
03760e3e3d
commit
c9f0841628
|
@ -11,7 +11,7 @@ import { getSize, getSuccessPercent, validProgress } from './utils';
|
||||||
import useConfigInject from '../config-provider/hooks/useConfigInject';
|
import useConfigInject from '../config-provider/hooks/useConfigInject';
|
||||||
import devWarning from '../vc-util/devWarning';
|
import devWarning from '../vc-util/devWarning';
|
||||||
import { progressProps, progressStatuses } from './props';
|
import { progressProps, progressStatuses } from './props';
|
||||||
import type { VueNode, CustomSlotsType, VueNode } from '../_util/type';
|
import type { VueNode, CustomSlotsType } from '../_util/type';
|
||||||
import useStyle from './style';
|
import useStyle from './style';
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
|
|
|
@ -4,7 +4,7 @@ import classNames from '../../_util/classNames';
|
||||||
import useConfigInject from '../../config-provider/hooks/useConfigInject';
|
import useConfigInject from '../../config-provider/hooks/useConfigInject';
|
||||||
import { initDefaultProps } from '../../_util/props-util';
|
import { initDefaultProps } from '../../_util/props-util';
|
||||||
import useStyle from '../style';
|
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 { functionType, someType, arrayType, booleanType, stringType } from '../../_util/type';
|
||||||
import type { ChangeEvent } from '../../_util/EventInterface';
|
import type { ChangeEvent } from '../../_util/EventInterface';
|
||||||
import MotionThumb from './MotionThumb';
|
import MotionThumb from './MotionThumb';
|
||||||
|
@ -115,7 +115,9 @@ export default defineComponent({
|
||||||
options: [],
|
options: [],
|
||||||
motionName: 'thumb-motion',
|
motionName: 'thumb-motion',
|
||||||
}),
|
}),
|
||||||
slots: ['label'],
|
slots: Object as CustomSlotsType<{
|
||||||
|
label: SegmentedBaseOption;
|
||||||
|
}>,
|
||||||
setup(props, { emit, slots, attrs }) {
|
setup(props, { emit, slots, attrs }) {
|
||||||
const { prefixCls, direction, size } = useConfigInject('segmented', props);
|
const { prefixCls, direction, size } = useConfigInject('segmented', props);
|
||||||
const [wrapSSR, hashId] = useStyle(prefixCls);
|
const [wrapSSR, hashId] = useStyle(prefixCls);
|
||||||
|
|
Loading…
Reference in New Issue