🎨 代码格式化

This commit is contained in:
BTMuli
2023-06-25 16:15:15 +08:00
parent 7982649bbc
commit 7567bba147
174 changed files with 29970 additions and 29840 deletions

View File

@@ -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>

View File

@@ -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>

View File

@@ -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">

View File

@@ -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 {

View File

@@ -14,8 +14,8 @@
</template>
<script lang="ts" setup>
interface TAOProps {
title: string,
text: string | number,
title: string;
text: string | number;
}
defineProps<TAOProps>();

View File

@@ -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>

View File

@@ -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") {