From 87e328748d19d5ca30979ca1bb648b431da68e48 Mon Sep 17 00:00:00 2001 From: AdingApkgg Date: Fri, 26 Dec 2025 14:52:59 +0800 Subject: [PATCH] Update VndbPanel.vue to enhance voice actor display and improve UI MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Changed section title from "声优" to "角色配音" for better clarity. - Adjusted the layout to display voice actors in a more responsive grid format. - Updated the logic to limit displayed voice actors to 8 when collapsed. - Improved image handling for voice actors, including a fallback for missing images. - Enhanced button text for toggling voice actor visibility to reflect character count. --- src/components/VndbPanel.vue | 50 ++++++++++++++++++++++++------------ 1 file changed, 34 insertions(+), 16 deletions(-) diff --git a/src/components/VndbPanel.vue b/src/components/VndbPanel.vue index 0a1f63f..4a4dab3 100644 --- a/src/components/VndbPanel.vue +++ b/src/components/VndbPanel.vue @@ -319,39 +319,48 @@ - +
-

声优

+

角色配音

({{ searchStore.vndbInfo.va.length }})
-
+
-
@@ -975,6 +984,15 @@ 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 = {