Update toast.md
When I tried to pop up a Toast based on the document's content, it failed. So I ran it on Stackblitz, but it still failed. After my investigation, I found that I just needed to add the 'Toaster' tag within the 'template' tag.
This commit is contained in:
parent
e36402491b
commit
3ec6134c99
|
|
@ -45,11 +45,13 @@ import { useToast } from '@/components/ui/toast/use-toast'
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { Button } from '@/components/ui/button'
|
import { Button } from '@/components/ui/button'
|
||||||
import { useToast } from '@/components/ui/toast/use-toast'
|
import { useToast } from '@/components/ui/toast/use-toast'
|
||||||
|
import Toaster from "@/components/ui/toast/Toaster.vue"
|
||||||
|
|
||||||
const { toast } = useToast()
|
const { toast } = useToast()
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
<Toaster />
|
||||||
<Button
|
<Button
|
||||||
@click="() => {
|
@click="() => {
|
||||||
toast({
|
toast({
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user