vue3+ts获取子组件的ref类型 vue3+ts获取子组件的ref类型如果有其他方法欢迎补充 vue3+ts获取子组件的ref类型 import Child from './child.vue' setup() { ... const child1 = ref<InstanceType<typeof Child>>() // const child1 = ref() as Ref<InstanceType<typeof Child>> const child2 = ref<NonNullable<Child>>(null!) // 在使用child.value.xxx 的时候就会有代码提示 ... } 如果有其他方法欢迎补充