@@ -453,7 +401,7 @@
loading="lazy"
@load="($event.target as HTMLElement).parentElement?.querySelector('.skeleton')?.classList.add('hidden')"
/>
-
@@ -611,7 +559,6 @@ import {
Minimize2,
X,
Tag,
- Mic,
Link2,
GitBranch,
Globe,
@@ -687,7 +634,6 @@ const screenshotsReady = ref(false)
// 展开/收起状态
const expandedSections = ref({
names: false,
- va: false,
relations: false,
characters: false,
quotes: false,
@@ -756,7 +702,6 @@ watch(() => searchStore.vndbInfo, async (newInfo) => {
// 重置展开状态
expandedSections.value = {
names: false,
- va: false,
relations: false,
characters: false,
quotes: false,
@@ -772,11 +717,15 @@ watch(() => searchStore.vndbInfo, async (newInfo) => {
nextTick(() => {
// 延迟一帧确保 DOM 已渲染
requestAnimationFrame(() => {
- const vndbContent = document.querySelector('.vndb-content')
- if (vndbContent) {
- const firstScreenshot = vndbContent.querySelector('img[loading="lazy"]') as HTMLImageElement
- if (firstScreenshot?.complete && firstScreenshot.naturalHeight > 0) {
- screenshotsReady.value = true
+ // 在当前面板内查找截图图片
+ const screenshotImgs = modalRef.value?.querySelectorAll('img[alt*="截图"]')
+ if (screenshotImgs) {
+ for (let i = 0; i < screenshotImgs.length; i++) {
+ const img = screenshotImgs[i] as HTMLImageElement
+ if (img.complete && img.naturalHeight > 0) {
+ screenshotsReady.value = true
+ break
+ }
}
}
})
@@ -1028,15 +977,6 @@ function openGallery(startIndex: number) {
}
}
-// 根据角色ID获取角色图片
-function getCharacterImage(characterId: string | undefined): string | undefined {
- if (!characterId) {
- return undefined
- }
- const char = characters.value.find(c => c.id === characterId)
- return char?.image
-}
-
// 格式化性别
function formatSex(sex: string): string {
const sexMap: Record
= {