Would it be possible to access this.$refs.label
? I am using the package vue-property-decorator
.
Below is the content of the component:
<template>
<div>
<label ref="label">asd</label>
</div>
</template>
<script lang="ts">
class Someclass extends Vue {
public $refs!: {
label: HTMLElement
}
private mounted(): void {
console.log(this.$refs.label) // returns a Vue component, instead of just html
}
}
</script>
I believe that the issue lies in this
pointing to the class itself. How can I successfully access this.$refs.label
?