This commit is contained in:
2025-05-15 23:15:57 +08:00
parent 723ceb5f6f
commit 900d8e8560
86 changed files with 2350 additions and 1905 deletions
@@ -33,7 +33,9 @@
</div>
<div>{{ skill.name }}</div>
</div>
<div class="w-50px flex items-center justify-center">{{ typeof skill.cd === 'number' ? `${skill.cd.toFixed(1)}s` : '-' }}</div>
<div class="w-50px flex items-center justify-center">
{{ typeof skill.cd === 'number' ? `${skill.cd.toFixed(1)}s` : '-' }}
</div>
<component :is="formatDamage(skill)"></component>
</div>
</div>
@@ -82,7 +84,7 @@ const data = computed(() => {
// @ts-ignore
bValue = b[sort.value]
}
const key = ['MAIN', 'ATK','STRINT', 'ratio'].findIndex((a) => sort.value == a)
const key = ['MAIN', 'ATK', 'STRINT', 'ratio'].findIndex((a) => sort.value == a)
aValue = a.buff?.[key]
bValue = b.buff?.[key]
@@ -149,46 +151,52 @@ const formatDamage = (skill: IResultSkill) => {
'div',
{
class: 'flex items-center justify-center',
},[0, 1, 2, 3].map((index) => {
const value = skill.buff?.[index] - standardSkill.buff?.[index]
return h(
'div',
{
style: {
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
width: '80px',
color: value >= 0 ? '#37fa38' : '#ff0000',
},
[0, 1, 2, 3].map((index) => {
const value = skill.buff?.[index] - standardSkill.buff?.[index]
return h(
'div',
{
style: {
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
width: '80px',
color: value >= 0 ? '#37fa38' : '#ff0000',
},
},
},
`${value >= 0 ? '+':''}${index == 3
? `${Math.round(value).toLocaleString()}%`
: Math.round(value).toLocaleString()}`
)
}))
`${value >= 0 ? '+' : ''}${
index == 3
? `${Math.round(value).toLocaleString()}%`
: Math.round(value).toLocaleString()
}`,
)
}),
)
} else {
return h(
'div',
{
class: 'flex items-center justify-center',
},[0, 1, 2, 3].map((index) => {
const value = skill.buff?.[index]
return h(
'div',
{
style: {
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
width: '80px',
},
[0, 1, 2, 3].map((index) => {
const value = skill.buff?.[index]
return h(
'div',
{
style: {
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
width: '80px',
},
},
},
index == 3
? `${Math.round(value).toLocaleString()}%`
: Math.round(value).toLocaleString(),
)
}))
index == 3
? `${Math.round(value).toLocaleString()}%`
: Math.round(value).toLocaleString(),
)
}),
)
}
}
</script>
@@ -3,7 +3,7 @@
<div class="h-177px">
<EquList
:detail="props.equs"
:with-sub-weapon="(infoStore.infos?.subweapons?.length ?? 0)> 0"
:with-sub-weapon="(infoStore.infos?.subweapons?.length ?? 0) > 0"
></EquList>
</div>
<div class="flex flex-wrap border-y-1px my-1px border-y-solid border-#FFFF/10 gap-1% px-1%">
@@ -12,7 +12,7 @@
]"
:key="key"
class="item-head"
:style="{width: `${header.width}px`}"
:style="{ width: `${header.width}px` }"
@click="header.sortKey && sortValue(header.sortKey)"
>
{{ header.label }}
@@ -44,13 +44,18 @@
<component :is="formatDamage(skill)"></component>
</div>
</div>
<div v-if="!totalStandard" class="h-40px flex items-center justify-center text-18px border-t-1px border-t-solid border-t-#FFFF/15">{{showTotal.toFixed(0)}}</div>
<div
v-if="!totalStandard"
class="h-40px flex items-center justify-center text-18px border-t-1px border-t-solid border-t-#FFFF/15"
>
{{ showTotal.toFixed(0) }}
</div>
<div
v-else
class="h-40px flex items-center justify-center text-18px border-t-1px border-t-solid border-t-#FFFF/15"
:style="{color:showTotal >= 0 ? '#37fa38' : '#ff0000'}"
>
{{showTotal.toFixed(2)}}%
:style="{ color: showTotal >= 0 ? '#37fa38' : '#ff0000' }"
>
{{ showTotal.toFixed(2) }}%
</div>
</div>
</div>
@@ -84,11 +89,11 @@ const data = computed(() => {
// @ts-ignore
bValue = b[sort.value]
}
if( sort.value == 'total'){
if (sort.value == 'total') {
aValue = a.damage * skillCount(a).value
bValue = b.damage * skillCount(b).value
}
if(sort.value == 'dps'){
if (sort.value == 'dps') {
aValue = a.damage / a.cd
bValue = b.damage / b.cd
}
@@ -152,7 +157,7 @@ const totalStandard = computed(() => {
const showTotal = computed(() => {
if (!totalStandard.value || totalStandard.value == 0) return totalDamage.value
return (totalDamage.value - totalStandard.value) / totalStandard.value * 100
return ((totalDamage.value - totalStandard.value) / totalStandard.value) * 100
})
const formatDamage = (skill: IResultSkill) => {