💄 调整UI

This commit is contained in:
目棃
2024-12-26 19:54:37 +08:00
parent 3bc70bbf46
commit c9aafac5d9
3 changed files with 21 additions and 19 deletions

View File

@@ -98,13 +98,12 @@
<img src="/source/UI/wikiWeapon.webp" alt="weaponIcon" class="side-icon-menu" />
</template>
</v-list-item>
<v-list-item
class="side-item-menu"
:link="true"
href="/wiki/nameCard"
prepend-icon="mdi-credit-card-outline"
title="名片图鉴"
/>
<v-list-item class="side-item-menu" :link="true" href="/wiki/nameCard">
<template #default>
<v-icon size="20" color="var(--tgc-yellow-2)">mdi-credit-card-outline</v-icon>
<span style="margin-left: 10px; font-size: 0.8125rem">名片图鉴</span>
</template>
</v-list-item>
<v-list-item class="side-item-menu" title="材料图鉴" :link="true" href="/wiki/material">
<template #prepend>
<img src="/source/UI/wikiGCG.webp" alt="gcgIcon" class="side-icon-menu" />

View File

@@ -1,21 +1,16 @@
<template>
<div class="tuca-box">
<div class="tuca-box" :class="{ grid: props.detail }">
<TItemBox v-for="(item, idx) in props.modelValue" :key="idx" :model-value="getItemBox(item)" />
</div>
</template>
<script lang="ts" setup>
import TItemBox, { type TItemBoxData } from "@comp/app/t-itemBox.vue";
import { computed } from "vue";
import { getZhElement } from "@/utils/toolFunc.js";
type TucAvatarsProps = { modelValue: Array<TGApp.Game.Combat.Avatar> };
type TucAvatarsProps = { modelValue: Array<TGApp.Game.Combat.Avatar>; detail: boolean };
const props = defineProps<TucAvatarsProps>();
const columnCnt = computed<number>(() => {
if (props.modelValue.length % 2 === 1) return (props.modelValue.length + 1) / 2;
return props.modelValue.length / 2;
});
function getItemBox(item: TGApp.Game.Combat.Avatar): TItemBoxData {
return {
@@ -37,9 +32,17 @@ function getItemBox(item: TGApp.Game.Combat.Avatar): TItemBoxData {
</script>
<style lang="css" scoped>
.tuca-box {
display: grid;
width: 100%;
grid-gap: 10px;
grid-template-columns: repeat(v-bind(columnCnt), 1fr);
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: flex-start;
gap: 10px;
&.grid {
display: grid;
width: 100%;
grid-gap: 10px;
grid-template-columns: repeat(2, 1fr);
}
}
</style>

View File

@@ -7,7 +7,7 @@
</div>
<div class="tucr-content">
<TucSub title="出演角色" class="main">
<TucAvatars :model-value="modelValue.avatars" />
<TucAvatars :model-value="modelValue.avatars" :detail="true" />
</TucSub>
<TucSub title="辉彩祝福" class="main">
<TucBuffs :model-value="modelValue.splendour_buff" />