[筆記] Property 'xxx' does not exist on type 'Vue' while using $refs in typescript
```typescript
(this.$refs.spy as ScrollSpy).initObserver();
// or if you are using `vue-property-decorator`
@Ref('spy') readonly scrollspy!: ScrollSpy;
scrollspy.initObserver();
```
Reference:
- https://stackoverflow.com/a/60681114
- https://github.com/kaorun343/vue-property-decorator#Ref
2021-01-22 01:15:26
留言
Last fetch: --:--
現在還沒有留言!