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

View File

@@ -1,7 +1,12 @@
import { ref, PropType, CSSProperties } from 'vue';
// Utils
import { pick, createNamespace, preventDefault } from '../utils';
import {
pick,
createNamespace,
preventDefault,
ComponentInstance,
} from '../utils';
// Composition
import { useExpose } from '../composables/use-expose';
@@ -44,7 +49,7 @@ export default createComponent({
emits: ['update:modelValue', 'search', 'cancel'],
setup(props, { emit, slots, attrs }) {
const filedRef = ref();
const filedRef = ref<ComponentInstance>();
const onCancel = () => {
if (!slots.action) {