mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-10 09:22:34 +00:00
Some ssr issue solved
This commit is contained in:
parent
699a2d7398
commit
148a17057f
9 changed files with 44 additions and 16 deletions
19
app.vue
19
app.vue
|
@ -1,8 +1,7 @@
|
|||
<template>
|
||||
<NuxtLayout v-if="$route.name !== 'index'">
|
||||
<NuxtLayout :name="layout">
|
||||
<NuxtPage />
|
||||
</NuxtLayout>
|
||||
<NuxtPage v-else />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
@ -15,7 +14,21 @@ export default {
|
|||
newsService: null,
|
||||
data() {
|
||||
return {
|
||||
storageKey: 'primevue'
|
||||
storageKey: 'primevue',
|
||||
layout: 'custom',
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
$route: {
|
||||
immediate: true,
|
||||
handler(to) {
|
||||
if (to.name === 'index') {
|
||||
this.layout = 'custom';
|
||||
}
|
||||
else {
|
||||
this.layout = 'default';
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue