mirror of
https://github.com/elk-zone/elk.git
synced 2024-09-06 20:29:08 +01:00
27 lines
386 B
Vue
27 lines
386 B
Vue
<script setup lang="ts">
|
|
const { modelValue } = defineModel<{
|
|
modelValue: boolean
|
|
}>()
|
|
|
|
const el = ref<HTMLDivElement>()
|
|
|
|
onClickOutside(el, () => {
|
|
if (modelValue)
|
|
modelValue.value = false
|
|
})
|
|
</script>
|
|
|
|
<template>
|
|
<div
|
|
v-show="modelValue"
|
|
ref="el"
|
|
absolute
|
|
bg-base
|
|
rounded
|
|
shadow-xl
|
|
dark="border border-base"
|
|
>
|
|
<slot />
|
|
</div>
|
|
</template>
|