mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2025-12-13 09:28:14 +08:00
⚡️ 一些优化
*修正琳妮特unread链接 *修复数据概览高度溢出 *调整生日组件样式
This commit is contained in:
@@ -38,7 +38,7 @@
|
|||||||
<v-tab value="5">5☆</v-tab>
|
<v-tab value="5">5☆</v-tab>
|
||||||
<v-tab value="4">4☆</v-tab>
|
<v-tab value="4">4☆</v-tab>
|
||||||
</v-tabs>
|
</v-tabs>
|
||||||
<v-window v-model="tab">
|
<v-window v-model="tab" class="gro-bottom-window">
|
||||||
<v-window-item value="5" class="gro-b-window-item">
|
<v-window-item value="5" class="gro-b-window-item">
|
||||||
<div v-for="(item, index) in star5List" :key="index" class="gro-bwi-item">
|
<div v-for="(item, index) in star5List" :key="index" class="gro-bwi-item">
|
||||||
<div class="gro-bwi-icon">
|
<div class="gro-bwi-icon">
|
||||||
@@ -249,9 +249,12 @@ watch(
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.gro-bottom-window {
|
||||||
|
height: calc(100vh - 440px);
|
||||||
|
}
|
||||||
|
|
||||||
.gro-b-window-item {
|
.gro-b-window-item {
|
||||||
display: flex;
|
display: flex;
|
||||||
max-height: calc(100vh - 420px);
|
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
gap: 5px;
|
gap: 5px;
|
||||||
@@ -262,7 +265,7 @@ watch(
|
|||||||
display: flex;
|
display: flex;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 30px;
|
height: 30px;
|
||||||
gap: 10px;
|
gap: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.gro-bwi-icon {
|
.gro-bwi-icon {
|
||||||
|
|||||||
@@ -50,9 +50,8 @@ watch(
|
|||||||
<style lang="css" scoped>
|
<style lang="css" scoped>
|
||||||
.gro-o-container {
|
.gro-o-container {
|
||||||
display: grid;
|
display: grid;
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
height: 100%;
|
||||||
grid-gap: 10px;
|
grid-column-gap: 10px;
|
||||||
grid-template-columns: v-bind(cnCols);
|
grid-template-columns: v-bind(cnCols);
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -9,11 +9,11 @@
|
|||||||
<span>今天是{{ cur.map((i) => i.name).join("、") }}的生日哦~</span>
|
<span>今天是{{ cur.map((i) => i.name).join("、") }}的生日哦~</span>
|
||||||
</div>
|
</div>
|
||||||
<div>即将到来:{{ next[0].role_birthday }}</div>
|
<div>即将到来:{{ next[0].role_birthday }}</div>
|
||||||
<div v-for="i in next" :key="i.role_id" class="tcb-item" @click="toBirth(i)">
|
<div v-for="i in next" :key="i.role_id" class="tcb-item">
|
||||||
<img :src="i.head_icon" :alt="i.introduce" />
|
<img :src="i.head_icon" :alt="i.name" @click="toBirth(i)" />
|
||||||
<div class="tcb-item-info">
|
<div class="tcb-item-info">
|
||||||
<span>{{ i.name }} 所属:{{ i.belong }}</span>
|
<span>{{ i.name }} 所属:{{ i.belong }}</span>
|
||||||
<span>{{ i.text }}</span>
|
<span>{{ i.introduce }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
<div class="tc-content">
|
<div class="tc-content">
|
||||||
<TCalendarBirth />
|
<TCalendarBirth />
|
||||||
<div class="calendar-grid">
|
<div class="calendar-grid">
|
||||||
<div v-for="item in getGrid()" :key="item.id" @click="selectItem(item)">
|
<div v-for="item in renderItems" :key="item.id" @click="selectItem(item)">
|
||||||
<TibCalendarItem
|
<TibCalendarItem
|
||||||
:data="<TGApp.App.Calendar.Item>item"
|
:data="<TGApp.App.Calendar.Item>item"
|
||||||
:model="switchType"
|
:model="switchType"
|
||||||
@@ -43,7 +43,7 @@
|
|||||||
<ToCalendar v-model="showItem" :data-type="selectedType" :data-val="selectedItem" />
|
<ToCalendar v-model="showItem" :data-type="selectedType" :data-val="selectedItem" />
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onMounted, ref } from "vue";
|
import { onMounted, ref, watch } from "vue";
|
||||||
|
|
||||||
import TCalendarBirth from "./t-calendar-birth.vue";
|
import TCalendarBirth from "./t-calendar-birth.vue";
|
||||||
import THomeCard from "./t-homecard.vue";
|
import THomeCard from "./t-homecard.vue";
|
||||||
@@ -70,6 +70,7 @@ const showItem = ref<boolean>(false);
|
|||||||
const switchType = ref<"avatar" | "weapon">("avatar");
|
const switchType = ref<"avatar" | "weapon">("avatar");
|
||||||
const selectedItem = ref<TGApp.App.Calendar.Item>(<TGApp.App.Calendar.Item>{});
|
const selectedItem = ref<TGApp.App.Calendar.Item>(<TGApp.App.Calendar.Item>{});
|
||||||
const selectedType = ref<"avatar" | "weapon">("avatar");
|
const selectedType = ref<"avatar" | "weapon">("avatar");
|
||||||
|
const renderItems = ref<TGApp.App.Calendar.Item[]>([]);
|
||||||
|
|
||||||
const btnText = [
|
const btnText = [
|
||||||
{
|
{
|
||||||
@@ -126,9 +127,28 @@ onMounted(async () => {
|
|||||||
calendarNow.value = getCalendar(dayNow);
|
calendarNow.value = getCalendar(dayNow);
|
||||||
characterCards.value = calendarNow.value.filter((item) => item.itemType === "character");
|
characterCards.value = calendarNow.value.filter((item) => item.itemType === "character");
|
||||||
weaponCards.value = calendarNow.value.filter((item) => item.itemType === "weapon");
|
weaponCards.value = calendarNow.value.filter((item) => item.itemType === "weapon");
|
||||||
|
renderItems.value = getGrid();
|
||||||
emits("success");
|
emits("success");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => page.value,
|
||||||
|
() => {
|
||||||
|
renderItems.value = getGrid();
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => switchType.value,
|
||||||
|
() => {
|
||||||
|
if (page.value !== 1) {
|
||||||
|
page.value = 1;
|
||||||
|
} else {
|
||||||
|
renderItems.value = getGrid();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
// 获取当前日历
|
// 获取当前日历
|
||||||
function getCalendar(day: number): TGApp.App.Calendar.Item[] {
|
function getCalendar(day: number): TGApp.App.Calendar.Item[] {
|
||||||
return AppCalendarData.filter((item) => item.dropDays.includes(day));
|
return AppCalendarData.filter((item) => item.dropDays.includes(day));
|
||||||
|
|||||||
@@ -2169,7 +2169,7 @@
|
|||||||
"https://fastcdn.mihoyo.com/static-resource-v2/2024/02/01/9f90aaad53164068e4c0878c965777da_2356917839627108903.png"
|
"https://fastcdn.mihoyo.com/static-resource-v2/2024/02/01/9f90aaad53164068e4c0878c965777da_2356917839627108903.png"
|
||||||
],
|
],
|
||||||
"unread_picture": [
|
"unread_picture": [
|
||||||
"https://fastcdn.mihoyo.com/static-resource-v2/2024/02/01/68e8bd6516ffb87487e662f28abd4c3a_2511231940973070575.png",
|
"https://fastcdn.mihoyo.com/static-resource-v2/2024/02/01/46323d143cbd7dc98a2ef141e54e854f_7185611319555503479.png",
|
||||||
"https://fastcdn.mihoyo.com/static-resource-v2/2024/02/01/68e8bd6516ffb87487e662f28abd4c3a_8392123412912288278.png"
|
"https://fastcdn.mihoyo.com/static-resource-v2/2024/02/01/68e8bd6516ffb87487e662f28abd4c3a_8392123412912288278.png"
|
||||||
],
|
],
|
||||||
"word_text": "「这是秘密,不告诉哥哥。」",
|
"word_text": "「这是秘密,不告诉哥哥。」",
|
||||||
|
|||||||
Reference in New Issue
Block a user