xiaoluoboding / vue-sonner

🔔 An opinionated toast component for Vue.
https://vue-sonner.vercel.app
MIT License
803 stars 41 forks source link

fix: title type changed,render error #77

Closed CandyACE closed 1 month ago

CandyACE commented 1 month ago
toast.promise(
  () =>
    new Promise((resolve) => {
      setTimeout(() => {
        resolve({ name: 'Vue Sonner' })
      }, 2000)
    }),
  {
    loading: () => h('div', { innerHTML: 'Loading...' }),
    success: (data: any) => {
      return `${data.name} toast has been added`
    },
    error: (data: any) => 'Error',
    duration: 10000000
  }
)

Fix the issue that Success cannot be displayed correctly when the Promise is successful

vercel[bot] commented 1 month ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
vue-sonner ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 24, 2024 6:44am