This commit is contained in:
2025-08-01 01:17:33 +08:00
parent 4c5bd97883
commit b7bc6d2e7b
5 changed files with 20 additions and 4 deletions
+1
View File
@@ -106,6 +106,7 @@ export interface ISuit {
SkillAttack: number
Buffer: number
value: string
bufferValue: string
}
export interface IEnchantingInfo {
@@ -33,11 +33,17 @@
</div>
<!-- 装备属性 -->
<div class="divide"></div>
<div
class="flex flex-col items-start my-1px whitespace-pre-wrap leading-15px"
>
<div class="flex flex-col items-start my-1px whitespace-pre-wrap leading-15px">
<div class="text-#DED29A py-4px whitespace-pre-wrap" v-html="detail"></div>
</div>
<template v-if="bufferDetail">
<div class="divide"></div>
<div class="flex flex-col items-start my-1px whitespace-pre-wrap leading-15px">
<div class="text-#A48B2E mb-10px pt-4px">辅助职业专属属性</div>
<div class="text-#DED29A pb-10px whitespace-pre-wrap" v-html="bufferDetail"></div>
</div>
</template>
</div>
</div>
@@ -70,6 +76,14 @@ const mainAttr = computed(() => {
const detail = computed(() =>
props.suit?.value.replace(/\[([^\[\]技能]+?)\]/g, '<span style="color:#3d9147">[$1]</span>'),
)
const bufferDetail = computed(() => {
const detail = props.suit?.bufferValue
if (!detail || detail == '-') return undefined
return props.suit?.bufferValue.replace(
/\[(?![^\]]*技能)[^\[\]]+\]/g, match => `<span style="color:#3d9147">${match}</span>`
)
})
</script>
<style lang="scss" scoped>
+1 -1
View File
@@ -320,7 +320,7 @@ export function formatAttr(type: string, value: number) {
case 'AtkI':
return `独立攻击力 ${value}`
case 'SkillAttack':
return `技能伤害 +${(value * 100).toFixed(2)}%`
return `技能伤害 增加 ${(value * 100).toFixed(2)}%`
case 'Attack':
return `攻击强化 +${value.toFixed(1)}%`
case 'Buffer':