mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2025-12-18 10:18:14 +08:00
🎨 代码格式化
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
<template>
|
||||
<div v-if="props.modelValue===undefined">
|
||||
暂无数据
|
||||
</div>
|
||||
<div v-if="props.modelValue === undefined">暂无数据</div>
|
||||
<div v-else class="tur-ag-box">
|
||||
<TibUrAvatar v-for="avatar in data" :key="avatar.id" :model-value="avatar" />
|
||||
</div>
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
<template>
|
||||
<div v-if="props.modelValue===undefined">
|
||||
暂无数据
|
||||
</div>
|
||||
<div v-if="props.modelValue === undefined">暂无数据</div>
|
||||
<div v-else class="tur-hg-box">
|
||||
<TurHomeSub v-for="home in homes" :data="home" />
|
||||
</div>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
</div>
|
||||
<div class="tur-hs-title">
|
||||
<!-- canvas -->
|
||||
<img :src="getUrl.icon" alt="comfort">
|
||||
<img :src="getUrl.icon" alt="comfort" />
|
||||
{{ data.comfortName }}
|
||||
</div>
|
||||
<div class="tur-hs-text-grid">
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
<template>
|
||||
<div v-if="props.modelValue===undefined">
|
||||
暂无数据
|
||||
</div>
|
||||
<div v-if="props.modelValue === undefined">暂无数据</div>
|
||||
<div v-else class="tur-og-box">
|
||||
<TurOverviewSub title="活跃天数" :text="data.activeDays" />
|
||||
<TurOverviewSub title="成就达成数" :text="data.achievementNumber" />
|
||||
@@ -26,13 +24,11 @@ import { computed } from "vue";
|
||||
import TurOverviewSub from "./tur-overview-sub.vue";
|
||||
|
||||
interface TurOverviewGridProps {
|
||||
modelValue?: string
|
||||
modelValue?: string;
|
||||
}
|
||||
|
||||
const props = defineProps<TurOverviewGridProps>();
|
||||
const data = computed(() =>
|
||||
JSON.parse(<string>props.modelValue) as TGApp.Sqlite.Record.Stats,
|
||||
);
|
||||
const data = computed(() => JSON.parse(<string>props.modelValue) as TGApp.Sqlite.Record.Stats);
|
||||
</script>
|
||||
<style lang="css" scoped>
|
||||
.tur-og-box {
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
interface TAOProps {
|
||||
title: string,
|
||||
text: string | number,
|
||||
title: string;
|
||||
text: string | number;
|
||||
}
|
||||
|
||||
defineProps<TAOProps>();
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
<template>
|
||||
<div v-if="props.modelValue===undefined">
|
||||
暂无数据
|
||||
</div>
|
||||
<div v-if="props.modelValue === undefined">暂无数据</div>
|
||||
<div v-else class="tur-wg-box">
|
||||
<TurWorldSub v-for="area in getData()" :data="area" :theme="theme" />
|
||||
</div>
|
||||
@@ -25,7 +23,7 @@ const theme = computed(() => {
|
||||
}
|
||||
});
|
||||
|
||||
function getData () {
|
||||
function getData() {
|
||||
return JSON.parse(<string>props.modelValue) as TGApp.Sqlite.Record.WorldExplore[];
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -5,11 +5,11 @@
|
||||
backgroundImage: `url('${getUrl.bg}')`,
|
||||
backgroundPositionX: 'right',
|
||||
backgroundSize: 'cover',
|
||||
backgroundRepeat: 'no-repeat'
|
||||
backgroundRepeat: 'no-repeat',
|
||||
}"
|
||||
>
|
||||
<div class="tur-ws-icon">
|
||||
<img :src="getUrl.icon" alt="icon">
|
||||
<img :src="getUrl.icon" alt="icon" />
|
||||
</div>
|
||||
<div class="tur-ws-content">
|
||||
<div class="tur-ws-title">
|
||||
@@ -20,13 +20,13 @@
|
||||
<span>{{ data.exploration / 10 }}</span>
|
||||
<span>%</span>
|
||||
</div>
|
||||
<div v-if="data.type==='Reputation'" class="tur-ws-sub">
|
||||
<div v-if="data.type === 'Reputation'" class="tur-ws-sub">
|
||||
<span>声望等级:</span>
|
||||
<span>{{ data.level }}</span>
|
||||
<span>级</span>
|
||||
</div>
|
||||
<div v-if="data.offerings.length>0" class="tur-ws-sub">
|
||||
<img :src="getUrl.offer" alt="offer">
|
||||
<div v-if="data.offerings.length > 0" class="tur-ws-sub">
|
||||
<img :src="getUrl.offer" alt="offer" />
|
||||
<span>{{ data.offerings[0].name }}等级:</span>
|
||||
<span>{{ data.offerings[0].level }}</span>
|
||||
<span>级</span>
|
||||
@@ -35,7 +35,6 @@
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
|
||||
// vue
|
||||
import { onMounted, ref } from "vue";
|
||||
// tauri
|
||||
@@ -44,8 +43,8 @@ import { event } from "@tauri-apps/api";
|
||||
import { saveImgLocal } from "../../utils/TGShare";
|
||||
|
||||
interface TurWorldSubProps {
|
||||
theme: "default" | "dark",
|
||||
data: TGApp.Sqlite.Record.WorldExplore
|
||||
theme: "default" | "dark";
|
||||
data: TGApp.Sqlite.Record.WorldExplore;
|
||||
}
|
||||
|
||||
const props = defineProps<TurWorldSubProps>();
|
||||
@@ -66,11 +65,11 @@ onMounted(async () => {
|
||||
getUrl.value.offer = await saveImgLocal(props.data.offerings[0].icon);
|
||||
}
|
||||
props.theme === "dark"
|
||||
? getUrl.value.icon = getUrl.value.iconLight
|
||||
: getUrl.value.icon = getUrl.value.iconDark;
|
||||
? (getUrl.value.icon = getUrl.value.iconLight)
|
||||
: (getUrl.value.icon = getUrl.value.iconDark);
|
||||
});
|
||||
|
||||
async function listenOnTheme () {
|
||||
async function listenOnTheme() {
|
||||
await event.listen("readTheme", (e) => {
|
||||
const theme = e.payload as string;
|
||||
if (theme === "dark") {
|
||||
|
||||
Reference in New Issue
Block a user