You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
FYI, for folks who wanna use it with Nuxt + TS + Vue Composition API /plugins/scroll-to.ts:
import{getCurrentInstance}from'@vue/composition-api';exportfunctionuseScrollTo(){const{ $scrollTo }=getCurrentInstance();if(!$scrollTo){// throw error, no store providedthrownewError('Nuxt $scrollTo is not defined!');}return$scrollTo;}
There's an issue when using with nuxt (2.13.3) / typescript (@nuxt/types => 2.13.3)
If i don't import
vue-scrollto
inside my global.d.ts file:Then using
this.$scrollTo
inside a component would complain about:"Property '$scrollTo' does not exist on type 'CombinedVueInstance<Vue, Data, { setActive(index: number, id: number): void; findArticles: ((this: any, val: string) => Promise) & Cancelable; hideResults(): void; showArticle(articleId: number, categoryId: number): Promise<...>; }, unknown, Readonly<...>>'.Vetur(2339)"
The text was updated successfully, but these errors were encountered: