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

Co-authored-by: Eugen Istoc <eugenistoc@gmail.com>
This commit is contained in:
Hugo Richard
2025-07-21 19:07:55 +02:00
committed by GitHub
parent b22891abe6
commit 9f60443731
2 changed files with 8 additions and 12 deletions

View File

@@ -6,14 +6,12 @@ const count = ref(0)
const toast = useToast()
const overlay = useOverlay()
const modal = overlay.create(LazyModalExample, {
props: {
count: count.value
}
})
const modal = overlay.create(LazyModalExample)
async function open() {
const instance = modal.open()
const instance = modal.open({
count: count.value
})
const shouldIncrement = await instance.result

View File

@@ -6,14 +6,12 @@ const count = ref(0)
const toast = useToast()
const overlay = useOverlay()
const slideover = overlay.create(LazySlideoverExample, {
props: {
count: count.value
}
})
const slideover = overlay.create(LazySlideoverExample)
async function open() {
const instance = slideover.open()
const instance = slideover.open({
count: count.value
})
const shouldIncrement = await instance.result