app').If you receive a mistake along with TS, make an effort usage( Vue3Spline, name: "Vue3Spline" ).To describe global elements for Volar type-checking you will certainly need to add:.// components.d.ts.declare element '@vue/ runtime-core' export interface GlobalComponents SplineAnimation: typeof bring in(' vue3-spline') [' Vue3Spline']export {-String.Split-|-}If needed rename component to utilize:.app.use( Vue3Spline, label: 'SplineAnimation')// usage in layout.label strand (nonpayment: 'Vue3Spline') - set customized component label.Conversely you can also import the part regionally.import Vue3Spline from 'vue3-spline'.export default elements: Vue3Spline,.,.You may at that point use the part in your layout.
Nuxt 3.This is actually still experimental. Are going to be actually upgraded soon.You may put in vue3-spline over anecdote or even npm. spline-runtime is actually a dependence of vue3-spline and must be immediately set up when you mount vue3-spline.If you are actually making use of npm:.npm put in vue3-spline@latest-- save.If you are actually using anecdote:.yarn incorporate vue3-spline@latest.Develop a directory contacted plugins at the root of your task.Develop a file called Vue3Spline.client.ts inside the plugins directory site.Add the observing code to the Vue3Spline.client.ts data.import Vue3Spline from 'vue3-spline'.export default defineNuxtPlugin(( nuxtApp) => nuxtApp.vueApp.use( Vue3Spline). ).If you get a mistake with TS, make an effort use( Vue3Spline, title: "Vue3Spline" ).This need to register as a global element that you can easily name anywhere in your app under the tag.I would certainly encourage making use of a parent tag to ensure that the computer animation just loads with it the customer edge.
Github.