mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2026-04-04 07:05:07 +08:00
🩹 优化 TGameNav 组件的 mini 属性处理
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
v-for="navItem in nav"
|
||||
:key="navItem.id"
|
||||
:label="navItem.name"
|
||||
:mini="true"
|
||||
:mini
|
||||
class="tgn-nav"
|
||||
@click="toNav(navItem)"
|
||||
>
|
||||
@@ -13,7 +13,7 @@
|
||||
<TMiImg :ori="true" :size="28" :src="navItem.icon" alt="navIcon" />
|
||||
</template>
|
||||
</TGameNavItem>
|
||||
<TGameNavItem v-if="hasNav" :mini="true" class="tgn-nav" label="兑换码">
|
||||
<TGameNavItem v-if="hasNav" :mini class="tgn-nav" label="兑换码">
|
||||
<template #icon>
|
||||
<v-icon v-if="!loadCode" color="var(--tgc-od-orange)" size="28" @click="tryGetCode">
|
||||
mdi-code-tags-check
|
||||
|
||||
@@ -8,9 +8,9 @@
|
||||
<script lang="ts" setup>
|
||||
import { computed, useTemplateRef } from "vue";
|
||||
|
||||
type TGameNavItemProps = { label: string; mini: boolean };
|
||||
type TGameNavItemProps = { label: string; mini?: boolean };
|
||||
|
||||
const props = defineProps<TGameNavItemProps>();
|
||||
const props = withDefaults(defineProps<TGameNavItemProps>(), { mini: false });
|
||||
const labelEl = useTemplateRef<HTMLSpanElement>("TgniLabelRef");
|
||||
const width = computed<string>(() => {
|
||||
if (!labelEl.value || props.mini) return "38px";
|
||||
|
||||
@@ -97,7 +97,7 @@
|
||||
</v-btn>
|
||||
</div>
|
||||
<template #extension>
|
||||
<TGameNav :gid="curGid" :mini="false" style="margin-left: 8px" />
|
||||
<TGameNav :gid="curGid" style="margin-left: 8px" />
|
||||
</template>
|
||||
</v-app-bar>
|
||||
<div class="posts-grid">
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
</div>
|
||||
</template>
|
||||
<template #extension>
|
||||
<TGameNav v-if="curGid !== 0" :gid="curGid" :mini="false" style="margin-left: 8px" />
|
||||
<TGameNav v-if="curGid !== 0" :gid="curGid" style="margin-left: 8px" />
|
||||
</template>
|
||||
<div class="post-topic-switch">
|
||||
<v-select
|
||||
|
||||
Reference in New Issue
Block a user