mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2025-12-12 09:18:14 +08:00
♻️ 剔除名片JSON冗余数据
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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
24
src/types/App/NameCard.d.ts
vendored
24
src/types/App/NameCard.d.ts
vendored
@@ -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 };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user