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:
LeeChan 2024-04-11 19:07:32 +08:00 committed by GitHub
parent e36402491b
commit 3ec6134c99
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -45,11 +45,13 @@ import { useToast } from '@/components/ui/toast/use-toast'
<script setup lang="ts">
import { Button } from '@/components/ui/button'
import { useToast } from '@/components/ui/toast/use-toast'
import Toaster from "@/components/ui/toast/Toaster.vue"
const { toast } = useToast()
</script>
<template>
<Toaster />
<Button
@click="() => {
toast({