Support for selected base preset
parent
4f8127c719
commit
27584e7d48
|
@ -202,15 +202,16 @@ export default {
|
||||||
updatePreset(this.preset);
|
updatePreset(this.preset);
|
||||||
},
|
},
|
||||||
download() {
|
download() {
|
||||||
|
const basePreset = this.$appState.preset;
|
||||||
const theme = JSON.stringify(this.preset, null, 4).replace(/"([^"]+)":/g, '$1:');
|
const theme = JSON.stringify(this.preset, null, 4).replace(/"([^"]+)":/g, '$1:');
|
||||||
const textContent = `import { createApp } from "vue";
|
const textContent = `import { createApp } from "vue";
|
||||||
import PrimeVue from "primevue/config";
|
import PrimeVue from "primevue/config";
|
||||||
import Aura from "@primevue/themes/aura";
|
import {${basePreset}} from "@primevue/themes/${basePreset.toLowerCase()}";
|
||||||
import { definePreset } from "@primevue/themes";
|
import { definePreset } from "@primevue/themes";
|
||||||
|
|
||||||
const app = createApp(App);
|
const app = createApp(App);
|
||||||
|
|
||||||
const MyPreset = definePreset(Aura, ${theme});
|
const MyPreset = definePreset(${basePreset}, ${theme});
|
||||||
|
|
||||||
app.use(PrimeVue, {
|
app.use(PrimeVue, {
|
||||||
theme: {
|
theme: {
|
||||||
|
|
Loading…
Reference in New Issue