Skip to content

Commit 0dcf905

Browse files
committed
docs: <ClientOnly> is required when globally registered in Nuxt 2
1 parent b8ccac4 commit 0dcf905

14 files changed

+29446
-9154
lines changed

README.md

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -636,10 +636,12 @@ const value = ref()
636636
</script>
637637
638638
<template>
639-
<JsonEditorVue
640-
v-model="value"
641-
v-bind="{/* local props & attrs */}"
642-
/>
639+
<ClientOnly>
640+
<JsonEditorVue
641+
v-model="value"
642+
v-bind="{/* local props & attrs */}"
643+
/>
644+
</ClientOnly>
643645
</template>
644646
```
645647

@@ -750,10 +752,12 @@ export default {
750752
</script>
751753
752754
<template>
753-
<JsonEditorVue
754-
v-model="value"
755-
v-bind="{/* local props & attrs */}"
756-
/>
755+
<ClientOnly>
756+
<JsonEditorVue
757+
v-model="value"
758+
v-bind="{/* local props & attrs */}"
759+
/>
760+
</ClientOnly>
757761
</template>
758762
```
759763

demo/nuxt2+vue2.6/.node-version

Lines changed: 0 additions & 1 deletion
This file was deleted.

demo/nuxt2+vue2.6/nuxt.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
export default {
22
// Global page headers: https://go.nuxtjs.dev/config-head
33
head: {
4-
title: 'nuxt2',
4+
title: 'nuxt2 + vue2.6',
55
htmlAttrs: {
66
lang: 'en',
77
},

0 commit comments

Comments
 (0)