Skip to content

Commit

Permalink
feat(nuxt): add client-only
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoluoboding committed Nov 20, 2024
1 parent a302447 commit 8dd0b3e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,9 @@ pnpm build:dev
```html
<!-- App.vue -->
<template>
<Toaster />
<ClientOnly>
<Toaster />
</ClientOnly>
<button @click="() => toast('My first toast')">Render a toast</button>
</template>

Expand Down
4 changes: 3 additions & 1 deletion playground/app.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<template>
<div>
<Toaster position="top-center" />
<ClientOnly>
<Toaster position="top-center" />
</ClientOnly>

<button @click="$toast('Render a toast')">Render a toast</button>
</div>
Expand Down

0 comments on commit 8dd0b3e

Please sign in to comment.