fix: can't click dropdown options in visibility selector (#312)

zio/stable
Ayaka Rizumu 2022-12-03 13:18:24 +08:00 committed by GitHub
parent 399712c0c7
commit 3952dd6cd6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 9 deletions

View File

@ -1,5 +1,4 @@
<script lang="ts" setup> <script lang="ts" setup>
import { useFocusTrap } from '@vueuse/integrations/useFocusTrap'
import { useDeactivated } from '~/composables/lifecycle' import { useDeactivated } from '~/composables/lifecycle'
export interface Props { export interface Props {
@ -108,14 +107,6 @@ const isVShow = computed(() => {
const bindTypeToAny = ($attrs: any) => $attrs as any const bindTypeToAny = ($attrs: any) => $attrs as any
const { activate, deactivate } = useFocusTrap(elDialogRoot)
watch(visible, async (value) => {
await nextTick()
if (value)
activate()
else
deactivate()
})
useEventListener('keydown', (e: KeyboardEvent) => { useEventListener('keydown', (e: KeyboardEvent) => {
if (!visible.value) if (!visible.value)
return return