diff --git a/components/_util/createRef.ts b/components/_util/createRef.ts index e64a67115..a13c5a8e1 100644 --- a/components/_util/createRef.ts +++ b/components/_util/createRef.ts @@ -2,7 +2,7 @@ export interface RefObject extends Function { current?: any; } -function createRef(): RefObject { +function createRef(): any { const func: RefObject = (node: any) => { func.current = node; }; diff --git a/components/vc-select2/Selector/MultipleSelector.tsx b/components/vc-select2/Selector/MultipleSelector.tsx index 4856c4d4f..cfbefceb8 100644 --- a/components/vc-select2/Selector/MultipleSelector.tsx +++ b/components/vc-select2/Selector/MultipleSelector.tsx @@ -237,7 +237,6 @@ const SelectSelector = defineComponent({ onInputMouseDown, onInputCompositionStart, onInputCompositionEnd, - choiceTransitionName, } = props; return ( <> diff --git a/components/vc-virtual-list/Item.tsx b/components/vc-virtual-list/Item.tsx index 76119ab80..863ac2dfe 100644 --- a/components/vc-virtual-list/Item.tsx +++ b/components/vc-virtual-list/Item.tsx @@ -9,7 +9,7 @@ const Item: FunctionalComponent = ({ setRef }, { slots }) => { return children && children.length ? cloneVNode(children[0], { - ref: setRef, + ref: setRef as any, }) : children; }; @@ -19,4 +19,5 @@ Item.props = { default: () => {}, }, }; + export default Item; diff --git a/components/vc-virtual-list/List.tsx b/components/vc-virtual-list/List.tsx index 673e2e11e..3615cc768 100644 --- a/components/vc-virtual-list/List.tsx +++ b/components/vc-virtual-list/List.tsx @@ -45,7 +45,7 @@ function renderChildren( }); const key = getKey(item); return ( - setNodeRef(item, ele)}> + setNodeRef(item, ele as HTMLElement)}> {node} ); @@ -102,7 +102,7 @@ const List = defineComponent({ mergedData: computed(() => props.data || EMPTY_DATA) as any, }); - const componentRef = ref(); + const componentRef = ref(); // =============================== Item Key =============================== const getKey = (item: Record) => { @@ -257,8 +257,8 @@ const List = defineComponent({ const removeEventListener = () => { if (componentRef.value) { componentRef.value.removeEventListener('wheel', onRawWheel); - componentRef.value.removeEventListener('DOMMouseScroll' as any, onFireFoxScroll); - componentRef.value.removeEventListener('MozMousePixelScroll', onMozMousePixelScroll); + componentRef.value.removeEventListener('DOMMouseScroll', onFireFoxScroll as any); + componentRef.value.removeEventListener('MozMousePixelScroll', onMozMousePixelScroll as any); } }; watchEffect(() => { @@ -266,8 +266,8 @@ const List = defineComponent({ if (componentRef.value) { removeEventListener(); componentRef.value.addEventListener('wheel', onRawWheel); - componentRef.value.addEventListener('DOMMouseScroll' as any, onFireFoxScroll); - componentRef.value.addEventListener('MozMousePixelScroll', onMozMousePixelScroll); + componentRef.value.addEventListener('DOMMouseScroll', onFireFoxScroll as any); + componentRef.value.addEventListener('MozMousePixelScroll', onMozMousePixelScroll as any); } }); }); diff --git a/components/vc-virtual-list/hooks/useMobileTouchMove.ts b/components/vc-virtual-list/hooks/useMobileTouchMove.ts index 7bbc76ce0..d5ff888b3 100644 --- a/components/vc-virtual-list/hooks/useMobileTouchMove.ts +++ b/components/vc-virtual-list/hooks/useMobileTouchMove.ts @@ -4,7 +4,7 @@ const SMOOTH_PTG = 14 / 15; export default function useMobileTouchMove( inVirtual: Ref, - listRef: Ref, + listRef: Ref, callback: (offsetY: number, smoothOffset?: boolean) => boolean, ) { let touched = false;