From 6dfdd7ae43fda462f02f3774d1085d523c91e60f Mon Sep 17 00:00:00 2001 From: Cagatay Civici Date: Mon, 25 Oct 2021 13:03:24 +0300 Subject: [PATCH] Fixed #1660 - Nuxt docs --- src/views/setup/Setup.vue | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/src/views/setup/Setup.vue b/src/views/setup/Setup.vue index 4892390c7..034d4b3c3 100755 --- a/src/views/setup/Setup.vue +++ b/src/views/setup/Setup.vue @@ -212,6 +212,40 @@ primevue/resources/themes/luna-green/theme.css primevue/resources/themes/luna-pink/theme.css primevue/resources/themes/rhea/theme.css + + +
Nuxt Integration
+

Nuxt 3 is currently in beta and an official module is planned after the final release. At the moment, PrimeVue can easily be used with Nuxt 3 using a custom plugin.

+ + nuxt.config.js +

Open the nuxt configuration file and add the css dependencies.

+

+import { defineNuxtConfig } from 'nuxt3'
+
+export default defineNuxtConfig({
+    css: [
+        'primevue/resources/themes/saga-blue/theme.css',
+        'primevue/resources/primevue.css',
+        'primeicons/primeicons.css'
+    ]
+})
+
+
+ + primevue.js +

Create a file like primevue.js under the plugins directory for the configuration.

+ +

+import { defineNuxtPlugin } from "#app";
+import PrimeVue from "primevue/config";
+import Button from "primevue/button";
+
+export default defineNuxtPlugin((nuxtApp) => {
+    nuxtApp.vueApp.use(PrimeVue, {ripple: true});
+    nuxtApp.vueApp.component('Button', Button);
+    //other components that you need
+});
+
 
PrimeFlex