docs(modal/slideover): improve programmatic examples (#3131)

This commit is contained in:
Hugo Richard
2025-01-17 17:43:40 +01:00
committed by GitHub
parent 64421a190f
commit f0297e02d0
4 changed files with 36 additions and 4 deletions

View File

@@ -3,6 +3,7 @@ import { LazyModalExample } from '#components'
const count = ref(0)
const toast = useToast()
const modal = useModal()
function open() {
@@ -10,7 +11,13 @@ function open() {
modal.open(LazyModalExample, {
description: 'And you can even provide a description!',
count: count.value
count: count.value,
onSuccess() {
toast.add({
title: 'Success !',
id: 'modal-success'
})
}
})
}
</script>