️ 一些优化

*修正琳妮特unread链接
*修复数据概览高度溢出
*调整生日组件样式
This commit is contained in:
目棃
2024-04-05 14:04:01 +08:00
parent 914cddafc1
commit 36c9cd69e6
5 changed files with 33 additions and 11 deletions

View File

@@ -38,7 +38,7 @@
<v-tab value="5">5</v-tab>
<v-tab value="4">4</v-tab>
</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">
<div v-for="(item, index) in star5List" :key="index" class="gro-bwi-item">
<div class="gro-bwi-icon">
@@ -249,9 +249,12 @@ watch(
width: 100%;
}
.gro-bottom-window {
height: calc(100vh - 440px);
}
.gro-b-window-item {
display: flex;
max-height: calc(100vh - 420px);
flex-direction: column;
margin-top: 10px;
gap: 5px;
@@ -262,7 +265,7 @@ watch(
display: flex;
width: 100%;
height: 30px;
gap: 10px;
gap: 5px;
}
.gro-bwi-icon {

View File

@@ -50,9 +50,8 @@ watch(
<style lang="css" scoped>
.gro-o-container {
display: grid;
width: 100%;
height: 100%;
grid-gap: 10px;
grid-column-gap: 10px;
grid-template-columns: v-bind(cnCols);
}
</style>

View File

@@ -9,11 +9,11 @@
<span>今天是{{ cur.map((i) => i.name).join("、") }}的生日哦~</span>
</div>
<div>即将到来{{ next[0].role_birthday }}</div>
<div v-for="i in next" :key="i.role_id" class="tcb-item" @click="toBirth(i)">
<img :src="i.head_icon" :alt="i.introduce" />
<div v-for="i in next" :key="i.role_id" class="tcb-item">
<img :src="i.head_icon" :alt="i.name" @click="toBirth(i)" />
<div class="tcb-item-info">
<span>{{ i.name }} 所属{{ i.belong }}</span>
<span>{{ i.text }}</span>
<span>{{ i.introduce }}</span>
</div>
</div>
</div>

View File

@@ -29,7 +29,7 @@
<div class="tc-content">
<TCalendarBirth />
<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
:data="<TGApp.App.Calendar.Item>item"
:model="switchType"
@@ -43,7 +43,7 @@
<ToCalendar v-model="showItem" :data-type="selectedType" :data-val="selectedItem" />
</template>
<script lang="ts" setup>
import { onMounted, ref } from "vue";
import { onMounted, ref, watch } from "vue";
import TCalendarBirth from "./t-calendar-birth.vue";
import THomeCard from "./t-homecard.vue";
@@ -70,6 +70,7 @@ const showItem = ref<boolean>(false);
const switchType = ref<"avatar" | "weapon">("avatar");
const selectedItem = ref<TGApp.App.Calendar.Item>(<TGApp.App.Calendar.Item>{});
const selectedType = ref<"avatar" | "weapon">("avatar");
const renderItems = ref<TGApp.App.Calendar.Item[]>([]);
const btnText = [
{
@@ -126,9 +127,28 @@ onMounted(async () => {
calendarNow.value = getCalendar(dayNow);
characterCards.value = calendarNow.value.filter((item) => item.itemType === "character");
weaponCards.value = calendarNow.value.filter((item) => item.itemType === "weapon");
renderItems.value = getGrid();
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[] {
return AppCalendarData.filter((item) => item.dropDays.includes(day));

View File

@@ -2169,7 +2169,7 @@
"https://fastcdn.mihoyo.com/static-resource-v2/2024/02/01/9f90aaad53164068e4c0878c965777da_2356917839627108903.png"
],
"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"
],
"word_text": "「这是秘密,不告诉哥哥。」",