Skip to content

Commit 2681fe2

Browse files
committed
refactor(playground): deal with primevue delayed css loading issue when ssr is set to true
1 parent 75e6999 commit 2681fe2

File tree

3 files changed

+37
-24
lines changed

3 files changed

+37
-24
lines changed

playground/app/app.vue

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<script setup lang='ts'>
2+
import FormkitComponent from '~/components/FormkitComponent.vue'
3+
</script>
4+
5+
<template>
6+
<div style="padding: 1rem">
7+
<div class="">
8+
<h2>Formkit-PrimeVue</h2>
9+
<div>
10+
<h4>GitHub</h4>
11+
<a href="https://github.com/sfxcode/formkit-primevue">formkit-primevue</a>
12+
<h4>More examples</h4>
13+
<a href="https://formkit-primevue.netlify.app/">Formkit PrimeVue Demo</a>
14+
</div>
15+
</div>
16+
<FormkitComponent />
17+
</div>
18+
</template>
19+
20+
<style lang='scss' scoped>
21+
</style>

playground/app.vue renamed to playground/app/components/FormkitComponent.vue

Lines changed: 12 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -127,29 +127,18 @@ async function submitHandler() {
127127
</script>
128128

129129
<template>
130-
<div style="padding: 1rem">
131-
<div>
132-
<h2>FormKit PrimeVue Nuxt Playground</h2>
133-
<div v-if="data">
134-
<FormKitDataEdit
135-
v-bind="data"
136-
:schema="schema"
137-
:show-reset="true"
138-
:debug-schema="false"
139-
:debug-data="true"
140-
:submit-label="t('save')"
141-
@data-saved="submitHandler"
142-
/>
143-
</div>
144-
</div>
145-
<div class="">
146-
<h2>Formkit-PrimeVue</h2>
147-
<div>
148-
<h4>GitHub</h4>
149-
<a href="https://github.com/sfxcode/formkit-primevue">formkit-primevue</a>
150-
<h4>More examples</h4>
151-
<a href="https://formkit-primevue.netlify.app/">Formkit PrimeVue Demo</a>
152-
</div>
130+
<div>
131+
<h2>FormKit PrimeVue Nuxt Playground</h2>
132+
<div v-if="data">
133+
<FormKitDataEdit
134+
v-bind="data"
135+
:schema="schema"
136+
:show-reset="true"
137+
:debug-schema="false"
138+
:debug-data="true"
139+
:submit-label="t('save')"
140+
@data-saved="submitHandler"
141+
/>
153142
</div>
154143
</div>
155144
</template>

playground/nuxt.config.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ export default defineNuxtConfig({
66
modules: ['../src/module'],
77
ssr: true,
88
devtools: { enabled: true },
9+
future: {
10+
compatibilityVersion: 4,
11+
},
912
compatibilityDate: '2024-11-03',
1013
formkit: {
1114
configFile: '../src/runtime/formkit.config.ts',
@@ -31,7 +34,7 @@ export default defineNuxtConfig({
3134
},
3235
},
3336
primevue: {
34-
autoImport: true,
37+
autoImport: false,
3538
options: {
3639
theme: {
3740
preset: Aura,

0 commit comments

Comments
 (0)