mirror of
https://github.com/elk-zone/elk.git
synced 2024-11-02 23:19:57 +00: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>
|