@Component
export default class MyComponent extends Vue {
$refs!: {
hoge: HTMLCanvasElement,
fuga: MySubComponent,
}
action1 () {
// ↓補完が効く
this.$refs.hoge.width
}
...
}
More than 3 years have passed since last update.
@Component で $refs の補完が効くようにする方法 (Vue.JS 2.0)
Last updated at Posted at 2019-10-29
Register as a new user and use Qiita more conveniently
- You get articles that match your needs
- You can efficiently read back useful information
- You can use dark theme
List of users who liked
43