typescript里怎么拿组件的方法类型啊?通过ref调用方法没有类型提示的 #6117
Unanswered
zz541843
asked this question in
Help/Questions
Replies: 1 comment 1 reply
-
try this: const listComp = this.$refs.list as InstanceType<typeof ListComp>; |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
InstanceType拿不到,用的是element plus
Beta Was this translation helpful? Give feedback.
All reactions