From 97444190ab1fdd23351243a402752929c1885f29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=9B=AE=E6=A3=83?= Date: Thu, 17 Oct 2024 11:51:41 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=84=E6=B7=B1=E6=B8=8A=E5=88=86?= =?UTF-8?q?=E4=BA=AB=E6=98=BE=E7=A4=BA=E5=BA=94=E7=94=A8=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=EF=BC=8C=E5=9C=A3=E9=81=97=E7=89=A9=E8=AF=A6=E6=83=85=E6=8E=A8?= =?UTF-8?q?=E8=8D=90=E5=B1=9E=E6=80=A7=E9=AB=98=E4=BA=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/userAvatar/tua-dc-relic.vue | 49 +++++++++++++++++-- src/components/userAvatar/tua-detail-card.vue | 30 ++++++++++-- .../userAvatar/tua-detail-overlay.vue | 20 ++++---- src/pages/User/Abyss.vue | 33 ++++++++++--- 4 files changed, 107 insertions(+), 25 deletions(-) diff --git a/src/components/userAvatar/tua-dc-relic.vue b/src/components/userAvatar/tua-dc-relic.vue index 45676c78..9771e6e6 100644 --- a/src/components/userAvatar/tua-dc-relic.vue +++ b/src/components/userAvatar/tua-dc-relic.vue @@ -35,14 +35,18 @@ :src="propMain.icon" alt="propMain" /> - {{ propMain !== false ? propMain.name : "未知属性" }} + + {{ propMain !== false ? propMain.name : "未知属性" }} + {{ props.modelValue.main_property.value }}
propSub - {{ prop !== false ? prop.name : "未知属性" }} + + {{ prop !== false ? prop.name : "未知属性" }} + {{ props.modelValue.sub_property_list[index].times }} @@ -60,6 +64,7 @@ import { useUserStore } from "../../store/modules/user.js"; interface TuaDcRelicProps { modelValue: TGApp.Game.Avatar.Relic | false; pos: "1" | "2" | "3" | "4" | "5"; + recommend: TGApp.Game.Avatar.PropRecommend; } const props = defineProps(); @@ -85,6 +90,45 @@ function getRelicTitle(): string { if (props.modelValue === false) return getRelicPos(); return props.modelValue.name; } + +function getPropMainStyle(): string { + if (props.modelValue === false) return ""; + if (props.pos === "3") { + if ( + props.recommend.sand_main_property_list.includes(props.modelValue.main_property.property_type) + ) { + return "color: var(--tgc-yellow-1);"; + } + } + if (props.pos === "4") { + if ( + props.recommend.goblet_main_property_list.includes( + props.modelValue.main_property.property_type, + ) + ) { + return "color: var(--tgc-yellow-1);"; + } + } + if (props.pos === "5") { + if ( + props.recommend.circlet_main_property_list.includes( + props.modelValue.main_property.property_type, + ) + ) { + return "color: var(--tgc-yellow-1);"; + } + } + return ""; +} + +function getPropSubStyle( + propItem: TGApp.Game.Avatar.PropMapItem | false, + propsR: number[], +): string { + if (propItem === false) return ""; + if (propsR.includes(propItem.property_type)) return "color: var(--tgc-yellow-1);"; + return ""; +}