Closed dev-idsys-mi closed 7 months ago
Hi,
Please see; https://primevue.org/theming/#switchthemes
Could you please try with;
<script ...>
import { usePrimeVue } from 'primevue/config';
const $primeVue = usePrimeVue();
const themeChange = () => {
$primeVue.changeTheme('md-dark-indigo', 'md-light-indigo', 'theme-link', () => {});
}
</script>
Best Regards,
Hi @mertsincan Thanks a lot for your quick response, this has finally worked. :)
I'm using the PrimeVue Nuxt plugin for Nuxt 3 and used the official guide to install it in my app.
I'm using the usePrimeVue property and set it to true in my
nuxt.conf.json
like following:I'm trying to change the theme, like explained here using Composition API:
Whenever I call that function, I get following console error and nothing else happens:
I have also tried the alternate route and created a primevue.js plugin file with following content:
Unfortunately, it does not help. Did I forget or overlook something? Any input is appreciated. :)