pull/5756/head
tugcekucukoglu 2024-05-15 14:56:56 +03:00
commit 14ef7f8acf
3 changed files with 10 additions and 15 deletions

View File

@ -132,16 +132,15 @@ export default {
return ''; return '';
}, },
getCommonStyleSheet({ name = '', theme = {}, params, props = {}, set, defaults }) { getCommonStyleSheet({ name = '', theme = {}, params, props = {}, set, defaults }) {
const { primitive, semantic } = this.getCommon({ name, theme, params, set, defaults }); const common = this.getCommon({ name, theme, params, set, defaults });
const common_css = `${primitive.css}${semantic.css}`;
const _props = Object.entries(props) const _props = Object.entries(props)
.reduce((acc, [k, v]) => acc.push(`${k}="${v}"`) && acc, []) .reduce((acc, [k, v]) => acc.push(`${k}="${v}"`) && acc, [])
.join(' '); .join(' ');
return Object.entries(common_css || {}) return Object.entries(common || {})
.reduce((acc, [key, value]) => { .reduce((acc, [key, value]) => {
if (value) { if (value?.css) {
const _css = SharedUtils.object.minifyCSS(value); const _css = SharedUtils.object.minifyCSS(value?.css);
const id = `${key}-variables`; const id = `${key}-variables`;
acc.push(`<style type="text/css" data-primevue-style-id="${id}" ${_props}>${_css}</style>`); acc.push(`<style type="text/css" data-primevue-style-id="${id}" ${_props}>${_css}</style>`);

View File

@ -22,11 +22,8 @@ export default defineNuxtConfig({
'/installation': { redirect: { to: '/vite', statusCode: 301 } } '/installation': { redirect: { to: '/vite', statusCode: 301 } }
}, },
primevue: { primevue: {
usePrimeVue: false, usePrimeVue: true,
options: { importTheme: { from: '@/themes/app-theme.js' },
ripple: true
},
//importTheme: { from: '@/themes/app-theme.js' },
resolvePath: function ({ as, from, type }) { resolvePath: function ({ as, from, type }) {
const resolvedPath = from.replace('primevue', '@/components/lib'); const resolvedPath = from.replace('primevue', '@/components/lib');

View File

@ -1,5 +1,5 @@
import Noir from '@/themes/app-theme'; //import Noir from '@/themes/app-theme';
import PrimeVue from 'primevue/config'; //import PrimeVue from 'primevue/config';
import { reactive } from 'vue'; import { reactive } from 'vue';
const $appState = { const $appState = {
@ -18,8 +18,7 @@ const $appState = {
export default defineNuxtPlugin((nuxtApp) => { export default defineNuxtPlugin((nuxtApp) => {
nuxtApp.vueApp.use($appState); nuxtApp.vueApp.use($appState);
nuxtApp.vueApp.use(PrimeVue, { /*nuxtApp.vueApp.use(PrimeVue, {
theme: Noir theme: Noir
}); });*/
}); });