0👍
If you would like to provide a helper on the NuxtApp instance, return it from the plugin under a provide key.
export default defineNuxtPlugin((nuxtApp) => {
return {
provide: {
register: register
}
}
})
In another file you can use this:
<template>
<div>
</div>
</template>
<script setup lang="ts">
const { $register } = useNuxtApp()
</script>
For more details: nuxt3 plugins docs.
- [Vuejs]-I want to show the total number of catalogues available for each stores on the side of the store name using vue js using an array
- [Vuejs]-Vuejs 3.2 Dynamic Component KO
Source:stackexchange.com