♻️ 剔除名片JSON冗余数据

This commit is contained in:
目棃
2024-12-31 10:34:12 +08:00
parent 02049dbdd6
commit 7c0ad79f67
670 changed files with 285 additions and 908 deletions

View File

@@ -3,7 +3,12 @@
<div v-if="props.data" class="ton-container">
<slot name="left"></slot>
<div class="ton-box">
<img alt="bg" class="ton-bg" v-if="props.data" :src="props.data.profile" />
<img
alt="bg"
class="ton-bg"
v-if="props.data"
:src="`/WIKI/nameCard/profile/${props.data.name}.webp`"
/>
<div class="ton-content">
<span>{{ props.data.name }}</span>
<span>{{ parseNameCard(props.data.desc) }}</span>

View File

@@ -5,7 +5,11 @@
<span :title="props.data.desc">{{ props.data.desc }}</span>
</template>
<template #prepend>
<v-img width="80px" style="margin-right: 10px" :src="props.data.icon" />
<v-img
width="80px"
style="margin-right: 10px"
:src="`/WIKI/nameCard/icon/${props.data.name}.webp`"
/>
</template>
</v-list-item>
</v-list>
@@ -21,7 +25,7 @@ const emit = defineEmits<TopNameCardEmits>();
const bgImage = computed<string>(() => {
if (props.data.name === "原神·印象") return "none;";
return `url("${props.data.bg}")`;
return `url("/WIKI/nameCard/bg/${props.data.name}.webp")`;
});
</script>
<style lang="css" scoped>

File diff suppressed because it is too large Load Diff

View File

@@ -1,39 +1,21 @@
/**
* @file types/App/NameCard.d.ts
* @description 本应用的名片类型定义
* @since Beta v0.3.9
* @since Beta v0.6.7
*/
/**
* @description 名片数据
* @since Beta v0.3.9
* @namespace TGApp.App.NameCard
* @memberof TGApp.App
*/
declare namespace TGApp.App.NameCard {
/**
* @description 名片数据
* @since Beta v0.3.9
* @since Beta v0.6.7
* @interface Item
* @property {string} name - 名片名称
* @property {number} index - 名片索引
* @property {string} desc - 名片描述
* @property {string} icon - 名片图标
* @property {string} bg - 名片背景图
* @property {string} profile - 名片 Profile 图
* @description 0: 其他1: 成就2角色3纪行4活动
* @property {number} type - 名片类型
* @property {string} source - 名片来源
* @return Item
*/
interface Item {
name: string;
index: number;
desc: string;
icon: string;
bg: string;
profile: string;
type: number;
source: string;
}
type Item = { name: string; index: number; desc: string; type: number; source: string };
}