app').If you acquire an error with TS, make an effort use( Vue3Spline, label: "Vue3Spline" ).To define worldwide components for Volar type-checking you are going to need to incorporate:.// components.d.ts.declare module '@vue/ runtime-core' export interface GlobalComponents SplineAnimation: typeof bring in(' vue3-spline') [' Vue3Spline']export {-String.Split-|-}If needed rename element to use:.app.use( Vue3Spline, label: 'SplineAnimation')// use in design template.title string (nonpayment: 'Vue3Spline') - set customized component label.Alternatively you can additionally import the component in your area.import Vue3Spline from 'vue3-spline'.export nonpayment parts: Vue3Spline,.,.You can easily at that point make use of the component in your layout.
Nuxt 3.This is actually still experimental. Will be updated quickly.You may set up vue3-spline over yarn or npm. spline-runtime is a dependency of vue3-spline and need to be actually instantly put up when you put in vue3-spline.If you are actually using npm:.npm put up vue3-spline@latest-- conserve.If you are utilizing yarn:.yarn include vue3-spline@latest.Create a file gotten in touch with plugins at the root of your project.Develop a report named Vue3Spline.client.ts inside the plugins listing.Add the complying with code to the Vue3Spline.client.ts report.import Vue3Spline from 'vue3-spline'.export default defineNuxtPlugin(( nuxtApp) => nuxtApp.vueApp.use( Vue3Spline). ).If you receive an error with TS, make an effort usage( Vue3Spline, name: "Vue3Spline" ).This should register as a worldwide component that you can easily name anywhere in your application under the tag.I would highly recommend making use of a moms and dad tag to guarantee that the animation only lots know the client edge.
Github.