Skip to content

Commit

Permalink
fix(EquipList): mismatched field names with cargo table (#165)
Browse files Browse the repository at this point in the history
  • Loading branch information
ZSLNAAKII authored Nov 4, 2024
1 parent 2ba8104 commit 4302205
Show file tree
Hide file tree
Showing 5 changed files with 62 additions and 240 deletions.
82 changes: 35 additions & 47 deletions src/widgets/EquipList/equip-conponents/ETag.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
<script setup lang="ts">
import { NTooltip } from "naive-ui";
import { getImagePath } from "@/utils/utils";
defineProps<{
Expand All @@ -10,50 +8,40 @@ defineProps<{
</script>

<template>
<NTooltip>
<template #trigger>
<div
v-if="type === 'lv' || type === 'favor'"
class="pos-relative inline-block"
>
<span
class="pointer-events-none absolute top-[25px] w-[50px] transform-translate-y-[-50%] whitespace-nowrap text-center font-size-[20px] font-bold color-white!"
style="
text-shadow:
0 0 5px black,
0 0 5px black,
0 0 5px black,
0 0 5px black;
"
>
{{ value }}
</span>
<img
:src="
getImagePath(
`图标_模组需求_${type === 'favor' ? '信赖' : '精英2等级'}.png`,
)
"
width="50"
loading="lazy"
/>
</div>
<div
v-else
class="pos-relative mx-2px inline-block h-[40px] w-[40px] transform-translate-y-[10%] border-[2px] border-[#00b1ff] border-rd-[50%] border-solid bg-[#2f2f2f]"
style="box-shadow: 0 2px 4px 0px #00000099"
>
<div class="h-[43px] flex items-center justify-center">
<span class="mdi mdi-clipboard-check font-size-[24px] color-white">
</span>
</div>
</div>
</template>
<span v-if="type === 'lv'">
需要达到等级<br />(精英<span class="font-bold">2</span>阶段)
</span>
<span v-if="type === 'favor'">
需要信赖值(<span class="font-bold">%</span>)
<div
v-if="type === 'lv' || type === 'favor'"
class="pos-relative inline-block"
>
<span
class="pointer-events-none absolute top-[25px] w-[50px] transform-translate-y-[-50%] whitespace-nowrap text-center font-size-[20px] font-bold color-white!"
style="
text-shadow:
0 0 5px black,
0 0 5px black,
0 0 5px black,
0 0 5px black;
"
>
{{ value }}
</span>
</NTooltip>
<img
:src="
getImagePath(
`图标_模组需求_${type === 'favor' ? '信赖' : '精英2等级'}.png`,
)
"
width="50"
loading="lazy"
/>
</div>
<div
v-else
class="pos-relative mx-2px inline-block h-[40px] w-[40px] transform-translate-y-[10%] border-[2px] border-[#00b1ff] border-rd-[50%] border-solid bg-[#2f2f2f]"
style="box-shadow: 0 2px 4px 0px #00000099"
>
<div class="h-[43px] flex items-center justify-center">
<span class="mdi mdi-clipboard-check font-size-[24px] color-white">
</span>
</div>
</div>
</template>
7 changes: 3 additions & 4 deletions src/widgets/EquipList/equip-conponents/Equip.vue
Original file line number Diff line number Diff line change
Expand Up @@ -222,8 +222,7 @@ const locale = getLanguage();
<div class="talent">
<span class="font=bold">
<span class="mdi mdi-asterisk"></span>
&nbsp;
<span v-html="e.talent2"></span>
<span v-html="` ${e.talent2}`"></span>
</span>
</div>
</div>
Expand Down Expand Up @@ -264,8 +263,7 @@ const locale = getLanguage();
<div class="talent">
<span class="font=bold">
<span class="mdi mdi-asterisk"></span>
&nbsp;
<span v-html="e[`talent${3}`]"></span>
<span v-html="` ${e.talent3}`"></span>
</span>
</div>
</div>
Expand All @@ -287,6 +285,7 @@ const locale = getLanguage();
<span v-html="e.mission2"></span>
</span>
<span v-if="!e.mission1 && !e.mission2">
<span class="mdi mdi-clipboard-off-outline"></span>
{{ customLabel[locale].equipString.nomission }}
</span>
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/widgets/EquipList/equipData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,13 @@ export async function getEquipDataAll(): Promise<
other: other[0] ?? "",
other2: other[1] ?? "",
other3: other[2] ?? "",
add: e.add,
add: e.traitadd,
trait: recoverHTML(e.trait ?? ""),
talent2: recoverHTML(e.talent2 ?? ""),
talent3: recoverHTML(e.talent3 ?? ""),
mission1: recoverHTML(e.mission1 ?? ""),
mission2: recoverHTML(e.mission2 ?? ""),
mission2opt: e.mission2opt ?? "",
mission2opt: e.mission2Operation ?? "",
mat: recoverHTML(e.mat ?? ""),
mat2: recoverHTML(e.mat2 ?? ""),
mat3: recoverHTML(e.mat3 ?? ""),
Expand Down
Loading

0 comments on commit 4302205

Please sign in to comment.