types: improve ref typing (#8182)

This commit is contained in:
neverland
2021-02-19 20:58:02 +08:00
committed by GitHub
parent 7daca89102
commit 9ad0eafae0
9 changed files with 31 additions and 20 deletions
+2 -2
View File
@@ -1,5 +1,5 @@
import { ref, watch, onMounted } from 'vue';
import { createNamespace } from '../utils';
import { ComponentInstance, createNamespace } from '../utils';
import Swipe from '../swipe';
const [createComponent, bem] = createNamespace('tabs');
@@ -27,7 +27,7 @@ export default createComponent({
emits: ['change'],
setup(props, { emit, slots }) {
const swipeRef = ref();
const swipeRef = ref<ComponentInstance>();
const onChange = (index: number) => {
emit('change', index);