Update app-state.js
parent
4f3c43ec2c
commit
42b887ae85
|
@ -1,5 +1,3 @@
|
|||
import Material from '@primevue/themes/material';
|
||||
import PrimeVue from 'primevue/config';
|
||||
import { reactive } from 'vue';
|
||||
|
||||
const $appState = {
|
||||
|
@ -18,17 +16,22 @@ const $appState = {
|
|||
}
|
||||
};
|
||||
|
||||
export default defineNuxtPlugin((nuxtApp) => {
|
||||
export default defineNuxtPlugin(async (nuxtApp) => {
|
||||
const runtimeConfig = useRuntimeConfig();
|
||||
|
||||
nuxtApp.vueApp.use($appState);
|
||||
|
||||
if (runtimeConfig.public.DEV_ENV === 'hot') {
|
||||
const { default: PrimeVue } = await import('primevue/config');
|
||||
const { default: Material } = await import('@primevue/themes/material');
|
||||
|
||||
nuxtApp.vueApp.use(PrimeVue, {
|
||||
theme: Material,
|
||||
theme: {
|
||||
preset: Material,
|
||||
options: {
|
||||
darkModeSelector: '.p-dark'
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue