app').If you acquire a mistake with TS, make an effort use( Vue3Spline, name: "Vue3Spline" ).To describe international components for Volar type-checking you will certainly need to have to include:.// components.d.ts.state module '@vue/ runtime-core' export user interface GlobalComponents SplineAnimation: typeof import(' vue3-spline') [' Vue3Spline']export {-String.Split-|-}If needed rename component to utilize:.app.use( Vue3Spline, label: 'SplineAnimation')// make use of in design template.title strand (nonpayment: 'Vue3Spline') - prepared custom-made part title.Conversely you may likewise import the component regionally.bring in Vue3Spline coming from 'vue3-spline'.export default parts: Vue3Spline,.,.You can easily then utilize the component in your layout.
Nuxt 3.This is still speculative. Are going to be updated very soon.You may mount vue3-spline over yarn or npm. spline-runtime is actually a reliance of vue3-spline as well as must be automatically set up when you put up vue3-spline.If you are using npm:.npm put up vue3-spline@latest-- save.If you are using anecdote:.yarn include vue3-spline@latest.Create a file gotten in touch with plugins at the origin of your task.Develop a data named Vue3Spline.client.ts inside the plugins listing.Include the complying with code to the Vue3Spline.client.ts file.import Vue3Spline coming from 'vue3-spline'.export nonpayment defineNuxtPlugin(( nuxtApp) => nuxtApp.vueApp.use( Vue3Spline). ).If you get an error with TS, try usage( Vue3Spline, name: "Vue3Spline" ).This ought to enroll as an international part that you can easily refer to as throughout your application under the tag.I would certainly advise making use of a parent tag to guarantee that the animation just tons in on the client edge.
Github.