mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2025-12-12 09:18:14 +08:00
💄 调整UID卡片样式
This commit is contained in:
@@ -1,9 +1,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="tpu-box">
|
<div class="tpu-box">
|
||||||
<div class="tpu-main">
|
<div class="tpu-top">
|
||||||
<span>UID {{ props.data.insert.game_user_info.game_uid }}</span>
|
|
||||||
<span @click="copyUid()" data-html2canvas-ignore><v-icon>mdi-content-copy</v-icon>复制</span>
|
<span @click="copyUid()" data-html2canvas-ignore><v-icon>mdi-content-copy</v-icon>复制</span>
|
||||||
|
<span class="tpu-game">{{ getGameName() }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="tpu-main">UID {{ props.data.insert.game_user_info.game_uid }}</div>
|
||||||
<div class="tpu-sub">
|
<div class="tpu-sub">
|
||||||
<span>{{ props.data.insert.game_user_info.nickname }}</span>
|
<span>{{ props.data.insert.game_user_info.nickname }}</span>
|
||||||
<span>|</span>
|
<span>|</span>
|
||||||
@@ -11,7 +12,6 @@
|
|||||||
<span>|</span>
|
<span>|</span>
|
||||||
<span>{{ props.data.insert.game_user_info.level }}级</span>
|
<span>{{ props.data.insert.game_user_info.level }}级</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="tpu-game">原神</div>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
@@ -41,6 +41,17 @@ function copyUid(): void {
|
|||||||
navigator.clipboard.writeText(props.data.insert.game_user_info.game_uid);
|
navigator.clipboard.writeText(props.data.insert.game_user_info.game_uid);
|
||||||
showSnackbar({ text: "已复制UID" });
|
showSnackbar({ text: "已复制UID" });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getGameName(): string {
|
||||||
|
const gameBiz = props.data.insert.game_user_info.game_biz;
|
||||||
|
if (gameBiz.startsWith("hkrpg")) return "崩坏·星穹铁道";
|
||||||
|
if (gameBiz.startsWith("hk4e")) return "原神";
|
||||||
|
if (gameBiz.startsWith("nap")) return "绝区零";
|
||||||
|
if (gameBiz.startsWith("bh2")) return "崩坏学园2";
|
||||||
|
if (gameBiz.startsWith("bh3")) return "崩坏3";
|
||||||
|
if (gameBiz.startsWith("nxx")) return "未定事件簿";
|
||||||
|
return "未知游戏";
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="css" scoped>
|
<style lang="css" scoped>
|
||||||
.tpu-box {
|
.tpu-box {
|
||||||
@@ -61,6 +72,19 @@ function copyUid(): void {
|
|||||||
color: #a17a58;
|
color: #a17a58;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.tpu-top {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: flex-end;
|
||||||
|
margin-left: auto;
|
||||||
|
column-gap: 5px;
|
||||||
|
|
||||||
|
:first-child {
|
||||||
|
cursor: pointer;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.tpu-main {
|
.tpu-main {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -68,11 +92,6 @@ function copyUid(): void {
|
|||||||
column-gap: 5px;
|
column-gap: 5px;
|
||||||
font-family: var(--font-title);
|
font-family: var(--font-title);
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
|
|
||||||
:last-child {
|
|
||||||
cursor: pointer;
|
|
||||||
font-size: 12px;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.tpu-sub {
|
.tpu-sub {
|
||||||
@@ -84,9 +103,6 @@ function copyUid(): void {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.tpu-game {
|
.tpu-game {
|
||||||
position: absolute;
|
|
||||||
top: 5px;
|
|
||||||
right: 5px;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
|||||||
Reference in New Issue
Block a user