Skip to content

Commit 3b2f69d

Browse files
committed
修复 FaImagePreview 预览时警告
1 parent cf41d7c commit 3b2f69d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/ui/components/FaImagePreview/preview.vue

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<script setup lang="ts">
2-
import { Dialog, DialogContent } from './dialog'
2+
import { VisuallyHidden } from 'reka-ui'
3+
import { Dialog, DialogContent, DialogDescription, DialogTitle } from './dialog'
34
45
const props = defineProps<{
56
src: string | string[]
@@ -122,6 +123,10 @@ function handleAnimationEnd() {
122123
<template>
123124
<Dialog v-model:open="isOpen">
124125
<DialogContent class="size-full" @animation-end="handleAnimationEnd">
126+
<VisuallyHidden>
127+
<DialogTitle />
128+
<DialogDescription />
129+
</VisuallyHidden>
125130
<div class="relative size-full flex-center" @wheel="handleWheel">
126131
<img
127132
:src="srcList[index]"

0 commit comments

Comments
 (0)