🐛 解决控制台报错

This commit is contained in:
BTMuli
2023-06-26 23:12:16 +08:00
parent 691108333a
commit 7fa5a279de
4 changed files with 12 additions and 10 deletions

View File

@@ -1,6 +1,10 @@
<template> <template>
<div class="tud-dl-divider" /> <div class="tud-dl-divider" />
<TuaDetailTitle :val="props.modelValue.winStar" :name="`第${props.modelValue.id}间`" /> <TuaDetailTitle
:val="props.modelValue.winStar"
:name="`第${props.modelValue.id}间`"
mode="level"
/>
<TuaDetailBattle :model-value="props.modelValue.upBattle" /> <TuaDetailBattle :model-value="props.modelValue.upBattle" />
<TuaDetailBattle :model-value="props.modelValue.downBattle" /> <TuaDetailBattle :model-value="props.modelValue.downBattle" />
</template> </template>

View File

@@ -23,9 +23,7 @@ interface TuaDetailTitleProps {
mode: "floor" | "level"; mode: "floor" | "level";
} }
const props = withDefaults(defineProps<TuaDetailTitleProps>(), { const props = defineProps<TuaDetailTitleProps>();
mode: "level",
});
const getFont: ComputedRef<string> = computed(() => { const getFont: ComputedRef<string> = computed(() => {
return props.mode === "level" ? "var(--font-text)" : "var(--font-title)"; return props.mode === "level" ? "var(--font-text)" : "var(--font-title)";

View File

@@ -23,18 +23,18 @@
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
// vue // vue
import { computed } from "vue";
import TibAbyssOverview from "../itembox/tib-abyss-overview.vue"; import TibAbyssOverview from "../itembox/tib-abyss-overview.vue";
interface TAOProps { interface TAOProps {
title: string; title: string;
valText?: string | number; valText?: string | number;
valIcons?: string; valIcons?: string;
iconNum: number; multi4?: boolean;
} }
const props = withDefaults(defineProps<TAOProps>(), { const props = defineProps<TAOProps>();
iconNum: 1, const getIconNum = computed(() => (props.multi4 ? 4 : 1));
});
</script> </script>
<style lang="css" scoped> <style lang="css" scoped>
.tuao-box { .tuao-box {
@@ -70,6 +70,6 @@ const props = withDefaults(defineProps<TAOProps>(), {
.tuao-val-icons { .tuao-val-icons {
display: grid; display: grid;
column-gap: 10px; column-gap: 10px;
grid-template-columns: repeat(v-bind(iconNum), 1fr); grid-template-columns: repeat(v-bind(getIconNum), 1fr);
} }
</style> </style>

View File

@@ -41,7 +41,7 @@
<TuaOverview title="最多承伤" :val-icons="item.takeDamageRank" /> <TuaOverview title="最多承伤" :val-icons="item.takeDamageRank" />
<TuaOverview title="最强一击" :val-icons="item.damageRank" /> <TuaOverview title="最强一击" :val-icons="item.damageRank" />
<TuaOverview title="元素战技" :val-icons="item.normalSkillRank" /> <TuaOverview title="元素战技" :val-icons="item.normalSkillRank" />
<TuaOverview title="出战次数" :val-icons="item.revealRank" :icon-num="4" /> <TuaOverview title="出战次数" :val-icons="item.revealRank" :multi4="true" />
<TuaOverview title="元素爆发" :val-icons="item.energySkillRank" /> <TuaOverview title="元素爆发" :val-icons="item.energySkillRank" />
</div> </div>
<TSubLine>详情</TSubLine> <TSubLine>详情</TSubLine>