mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-14 20:19:34 +01:00
18 lines
324 B
Vue
18 lines
324 B
Vue
<script setup lang="ts">
|
|
import { ModalExampleComponent } from '#components'
|
|
|
|
const modal = useModal()
|
|
const count = ref(0)
|
|
|
|
function openModal () {
|
|
count.value += 1
|
|
modal.open(ModalExampleComponent, {
|
|
count: count.value
|
|
})
|
|
}
|
|
</script>
|
|
|
|
<template>
|
|
<UButton label="Reveal modal" @click="openModal" />
|
|
</template>
|