forked from Mirrors/elk
18 lines
271 B
Vue
18 lines
271 B
Vue
|
<script setup lang="ts">
|
||
|
const { modelValue } = defineModel<{
|
||
|
modelValue: boolean
|
||
|
}>()
|
||
|
|
||
|
const el = ref<HTMLDivElement>()
|
||
|
|
||
|
onClickOutside(el, () => {
|
||
|
modelValue.value = false
|
||
|
})
|
||
|
</script>
|
||
|
|
||
|
<template>
|
||
|
<div ref="el" absolute bg-base>
|
||
|
<slot />
|
||
|
</div>
|
||
|
</template>
|