fix click outside
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { vOnClickOutside } from '@vueuse/components';
|
||||
import { useEventListener, useVModel } from '@vueuse/core';
|
||||
import { watch } from 'vue';
|
||||
|
||||
@@ -37,7 +38,7 @@ useEventListener('keyup', e => {
|
||||
<div class="fixed inset-0">
|
||||
<div class="absolute bg-black opacity-80 inset-0 z-0" />
|
||||
<div class="absolute grid inset-0">
|
||||
<div class="justify-self-center m-auto">
|
||||
<div class="justify-self-center m-auto" v-on-click-outside="() => isOpen = false">
|
||||
<slot />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user