Vuejs typescript this.$refs..value does not exist

前端 未结 7 1452
野的像风
野的像风 2020-11-30 13:33

While rewriting my VueJs project in typescript, I came across a TypeScript error.

This is a part of the component that has a custom v-model.

An input field i

7条回答
  •  一整个雨季
    2020-11-30 14:03

    This worked for me: use (this.$refs. as any).value or (this.$refs.['refField'] as any).value

提交回复
热议问题