types: ComponentInstance (#8154)

This commit is contained in:
neverland
2021-02-14 17:07:26 +08:00
committed by GitHub
parent 0fb0186fad
commit 4cb974ab02
8 changed files with 40 additions and 41 deletions
+11 -7
View File
@@ -6,14 +6,19 @@ import {
onMounted,
ComputedRef,
onActivated,
CSSProperties,
onDeactivated,
onBeforeUnmount,
CSSProperties,
ComponentPublicInstance,
} from 'vue';
// Utils
import { range, isHidden, preventDefault, createNamespace } from '../utils';
import {
range,
isHidden,
preventDefault,
createNamespace,
ComponentInstance,
} from '../utils';
// Composition
import {
@@ -97,10 +102,9 @@ export default createComponent({
const touch = useTouch();
const windowSize = useWindowSize();
const { children, linkChildren } = useChildren<
// eslint-disable-next-line
ComponentPublicInstance<{}, any>
>(SWIPE_KEY);
const { children, linkChildren } = useChildren<ComponentInstance>(
SWIPE_KEY
);
const count = computed(() => children.length);