From a871208475917a742aac8b2dea44e557c027a9a8 Mon Sep 17 00:00:00 2001 From: Spmario233 Date: Sun, 5 May 2024 11:07:28 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=BC=E5=BC=8F=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- noname/ui/click/index.js | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/noname/ui/click/index.js b/noname/ui/click/index.js index 894037813..fec5835d3 100644 --- a/noname/ui/click/index.js +++ b/noname/ui/click/index.js @@ -3639,16 +3639,17 @@ export class Click { const voiceMap = game.parseSkillText(skill, name, null, true); if(voiceMap.length) skillAudioMap.set(skill, voiceMap); }); - if (dieAudios.length || skillAudioMap.size > 0){ + if (dieAudios.length || skillAudioMap.size > 0) { introduction.appendChild(document.createElement("hr")); - if(skillAudioMap.size > 0){ + if (skillAudioMap.size > 0) { const skillNameSpan = document.createElement("span"); skillNameSpan.innerHTML = `技能台词
`; introduction.appendChild(skillNameSpan); skillAudioMap.forEach((texts, skill) => { - const skillNameSpan = document.createElement("span"), skillNameSpanStyle = skillNameSpan.style; + const skillNameSpan = document.createElement("span"), + skillNameSpanStyle = skillNameSpan.style; skillNameSpanStyle.fontWeight = "bold"; skillNameSpan.innerHTML = `
${get.translation(skill)}
`; introduction.appendChild(skillNameSpan); @@ -3656,21 +3657,22 @@ export class Click { const skillTextSpan = document.createElement("span"); skillTextSpan.innerHTML = `${index + 1}. ${text}
`; introduction.appendChild(skillTextSpan); - }) + }); }); } - if(dieAudios.length > 0){ - const skillNameSpan = document.createElement("span"), skillNameSpanStyle = skillNameSpan.style; + if (dieAudios.length > 0) { + const skillNameSpan = document.createElement("span"), + skillNameSpanStyle = skillNameSpan.style; skillNameSpanStyle.fontWeight = "bold"; skillNameSpan.innerHTML = `
阵亡台词`; introduction.appendChild(skillNameSpan); dieAudios.forEach((item, index) => { const dieTextSpan = document.createElement("span"); - dieTextSpan.innerHTML = `
${dieAudios.length > 1 ? `${index + 1}. ` : ''}${item.text}`; + dieTextSpan.innerHTML = `
${dieAudios.length > 1 ? `${index + 1}. ` : ""}${item.text}`; introduction.appendChild(dieTextSpan); - }) + }); } } const introduction2 = ui.create.div(".characterintro.intro2", uiintro);