mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2025-12-10 08:58:15 +08:00
🌱 荧/空 版本切换
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -1,12 +1,14 @@
|
||||
<template>
|
||||
<div class="ab-container">
|
||||
<div class="ab-draw-top">
|
||||
<v-switch v-model="isLumine" :label="isLumine ? '荧' : '空'" />
|
||||
</div>
|
||||
<div class="ab-draw-grid">
|
||||
<div
|
||||
v-for="item in selectedItem"
|
||||
:key="`${item.birthday}_${item.role_id}`"
|
||||
class="ab-draw-item"
|
||||
>
|
||||
<v-img :src="item.take_picture" :lazy-src="item.unread_picture" />
|
||||
<div v-for="item in selectedItem" :key="item.op_id" class="ab-draw-item">
|
||||
<v-img
|
||||
:src="item.take_picture[isLumine ? 0 : 1]"
|
||||
:lazy-src="item.unread_picture[isLumine ? 0 : 1]"
|
||||
/>
|
||||
<span>{{ item.year }} {{ item.birthday }} {{ item.role_name }}</span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -21,6 +23,7 @@ import { ArcBirDraw } from "../../data";
|
||||
const page = ref(1);
|
||||
const length = ref(0);
|
||||
const selectedItem = ref<TGApp.Archive.Birth.DrawItem[]>(ArcBirDraw);
|
||||
const isLumine = ref<boolean>(true);
|
||||
|
||||
watch(page, (val) => {
|
||||
const start = (val - 1) * 12;
|
||||
@@ -45,6 +48,12 @@ onMounted(() => {
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.ab-draw-top {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.ab-draw-grid {
|
||||
position: relative;
|
||||
display: grid;
|
||||
|
||||
20
src/types/Archive/Birth.d.ts
vendored
20
src/types/Archive/Birth.d.ts
vendored
@@ -42,37 +42,29 @@ declare namespace TGApp.Archive.Birth {
|
||||
* @description 卡片数据条目
|
||||
* @since Beta v0.4.4
|
||||
* @interface DrawItem
|
||||
* @property {string} draw_status - 画片状态
|
||||
* @property {string} take_picture - 画片地址
|
||||
* @property {string} unread_picture - 未读画片地址
|
||||
* @property {string} word_text - 留言
|
||||
* @property {number} year - 年份
|
||||
* @property {string} birthday - 生日 m/d
|
||||
* @property {boolean} is_new - 是否新画片
|
||||
* @property {number} role_id - 角色 id
|
||||
* @property {string} role_name - 角色名
|
||||
* @property {string[]} take_picture - 画片地址 [荧,空]
|
||||
* @property {string[]} unread_picture - 未读画片地址 [荧,空]
|
||||
* @property {string} gal_xml - 画片 xml
|
||||
* @property {string} gal_resource - 画片资源
|
||||
* @property {boolean} is_collected - 是否收藏
|
||||
* @property {number} op_id - 操作 id
|
||||
* @property {boolean} is_compensate - 是否补偿
|
||||
* @property {string} role_name - 角色名
|
||||
* @returns DrawItem
|
||||
*/
|
||||
interface DrawItem {
|
||||
draw_status: string;
|
||||
take_picture: string;
|
||||
unread_picture: string;
|
||||
word_text: string;
|
||||
year: number;
|
||||
birthday: string;
|
||||
is_new: boolean;
|
||||
role_id: number;
|
||||
role_name: string;
|
||||
take_picture: string[];
|
||||
unread_picture: string[];
|
||||
gal_xml: string;
|
||||
gal_resource: string;
|
||||
is_collected: boolean;
|
||||
op_id: number;
|
||||
is_compensate: boolean;
|
||||
role_name: string;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user