mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2025-12-18 10:18:14 +08:00
♻️ 主题判断上移
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<v-app>
|
<v-app :theme="vuetifyTheme">
|
||||||
<TSidebar v-if="isMain" />
|
<TSidebar v-if="isMain" />
|
||||||
<v-main>
|
<v-main>
|
||||||
<v-container :fluid="true" class="app-container">
|
<v-container :fluid="true" class="app-container">
|
||||||
@@ -13,7 +13,7 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { app, event, fs, tauri, window as TauriWindow } from "@tauri-apps/api";
|
import { app, event, fs, tauri, window as TauriWindow } from "@tauri-apps/api";
|
||||||
import { storeToRefs } from "pinia";
|
import { storeToRefs } from "pinia";
|
||||||
import { onBeforeMount, onMounted, ref } from "vue";
|
import { computed, onBeforeMount, onMounted, ref } from "vue";
|
||||||
import { useRouter } from "vue-router";
|
import { useRouter } from "vue-router";
|
||||||
|
|
||||||
import TBackTop from "./components/app/t-backTop.vue";
|
import TBackTop from "./components/app/t-backTop.vue";
|
||||||
@@ -31,6 +31,9 @@ const userStore = storeToRefs(useUserStore());
|
|||||||
const isMain = ref<boolean>(false);
|
const isMain = ref<boolean>(false);
|
||||||
const theme = ref<string>(appStore.theme);
|
const theme = ref<string>(appStore.theme);
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
const vuetifyTheme = computed(() => {
|
||||||
|
return appStore.theme === "dark" ? "dark" : "light";
|
||||||
|
});
|
||||||
|
|
||||||
onBeforeMount(async () => {
|
onBeforeMount(async () => {
|
||||||
// 获取当前窗口
|
// 获取当前窗口
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ watch(
|
|||||||
() => props.data,
|
() => props.data,
|
||||||
() => {
|
() => {
|
||||||
if (props.data) {
|
if (props.data) {
|
||||||
console.log(JSON.stringify(props.data.desc));
|
console.log(JSON.stringify(props.data));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -2,13 +2,7 @@
|
|||||||
<ToLoading v-model="loading" :title="loadingTitle" :subtitle="loadingSub" />
|
<ToLoading v-model="loading" :title="loadingTitle" :subtitle="loadingSub" />
|
||||||
<div class="gacha-top-bar">
|
<div class="gacha-top-bar">
|
||||||
<div class="gacha-top-title">祈愿记录</div>
|
<div class="gacha-top-title">祈愿记录</div>
|
||||||
<v-select
|
<v-select v-model="uidCur" class="gacha-top-select" :items="selectItem" variant="outlined" />
|
||||||
v-model="uidCur"
|
|
||||||
class="gacha-top-select"
|
|
||||||
:items="selectItem"
|
|
||||||
variant="outlined"
|
|
||||||
:theme="vuetifyTheme"
|
|
||||||
/>
|
|
||||||
<div class="gacha-top-btns">
|
<div class="gacha-top-btns">
|
||||||
<v-btn prepend-icon="mdi-refresh" class="gacha-top-btn" @click="confirmRefresh">刷新</v-btn>
|
<v-btn prepend-icon="mdi-refresh" class="gacha-top-btn" @click="confirmRefresh">刷新</v-btn>
|
||||||
<v-btn prepend-icon="mdi-import" class="gacha-top-btn" @click="handleImportBtn()">
|
<v-btn prepend-icon="mdi-import" class="gacha-top-btn" @click="handleImportBtn()">
|
||||||
@@ -79,9 +73,6 @@ const selectItem = ref<string[]>([]);
|
|||||||
const uidCur = ref<string>("");
|
const uidCur = ref<string>("");
|
||||||
const gachaListCur = ref<TGApp.Sqlite.GachaRecords.SingleTable[]>([]);
|
const gachaListCur = ref<TGApp.Sqlite.GachaRecords.SingleTable[]>([]);
|
||||||
const tab = ref<string>("");
|
const tab = ref<string>("");
|
||||||
const vuetifyTheme = computed(() => {
|
|
||||||
return appStore.theme === "dark" ? "dark" : "light";
|
|
||||||
});
|
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
loadingTitle.value = "正在获取祈愿 UID 列表";
|
loadingTitle.value = "正在获取祈愿 UID 列表";
|
||||||
|
|||||||
@@ -631,6 +631,7 @@ async function setAchiDB(achievement: TGApp.Sqlite.Achievement.SingleTable): Pro
|
|||||||
height: 80px;
|
height: 80px;
|
||||||
border: 1px solid var(--common-shadow-2);
|
border: 1px solid var(--common-shadow-2);
|
||||||
border-radius: 10px 50px 50px 10px;
|
border-radius: 10px 50px 50px 10px;
|
||||||
|
background-color: var(--box-bg-1);
|
||||||
background-position: right;
|
background-position: right;
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|||||||
@@ -79,7 +79,6 @@
|
|||||||
label="首页显示组件"
|
label="首页显示组件"
|
||||||
:multiple="true"
|
:multiple="true"
|
||||||
:chips="true"
|
:chips="true"
|
||||||
:theme="vuetifyTheme"
|
|
||||||
/>
|
/>
|
||||||
<template #append>
|
<template #append>
|
||||||
<v-btn class="config-btn" @click="submitHome"> 确定</v-btn>
|
<v-btn class="config-btn" @click="submitHome"> 确定</v-btn>
|
||||||
@@ -210,9 +209,6 @@ const userInfo = computed(() => {
|
|||||||
avatar: "/source/UI/lumine.webp",
|
avatar: "/source/UI/lumine.webp",
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
const vuetifyTheme = computed(() => {
|
|
||||||
return appStore.theme === "dark" ? "dark" : "light";
|
|
||||||
});
|
|
||||||
|
|
||||||
// load version
|
// load version
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
|
|||||||
@@ -6,7 +6,6 @@
|
|||||||
v-model="curGameLabel"
|
v-model="curGameLabel"
|
||||||
class="post-switch-item"
|
class="post-switch-item"
|
||||||
:items="gameItem"
|
:items="gameItem"
|
||||||
:theme="vuetifyTheme"
|
|
||||||
variant="outlined"
|
variant="outlined"
|
||||||
label="游戏"
|
label="游戏"
|
||||||
/>
|
/>
|
||||||
@@ -14,7 +13,6 @@
|
|||||||
v-model="curForumLabel"
|
v-model="curForumLabel"
|
||||||
class="post-switch-item"
|
class="post-switch-item"
|
||||||
:items="forumItem"
|
:items="forumItem"
|
||||||
:theme="vuetifyTheme"
|
|
||||||
variant="outlined"
|
variant="outlined"
|
||||||
label="频道"
|
label="频道"
|
||||||
/>
|
/>
|
||||||
@@ -22,7 +20,6 @@
|
|||||||
v-model="curSortLabel"
|
v-model="curSortLabel"
|
||||||
class="post-switch-item"
|
class="post-switch-item"
|
||||||
:items="sortItem"
|
:items="sortItem"
|
||||||
:theme="vuetifyTheme"
|
|
||||||
variant="outlined"
|
variant="outlined"
|
||||||
label="排序"
|
label="排序"
|
||||||
/>
|
/>
|
||||||
@@ -196,11 +193,6 @@ const gameList = {
|
|||||||
大别野: 5,
|
大别野: 5,
|
||||||
};
|
};
|
||||||
|
|
||||||
// 主题
|
|
||||||
const vuetifyTheme = computed(() => {
|
|
||||||
return appStore.theme === "dark" ? "dark" : "light";
|
|
||||||
});
|
|
||||||
|
|
||||||
// 渲染参数
|
// 渲染参数
|
||||||
const curForumLabel = ref<string>("酒馆");
|
const curForumLabel = ref<string>("酒馆");
|
||||||
const forumItem = ref<string[]>(["酒馆", "攻略", "同人图", "COS", "硬核"]);
|
const forumItem = ref<string[]>(["酒馆", "攻略", "同人图", "COS", "硬核"]);
|
||||||
|
|||||||
@@ -46,7 +46,7 @@
|
|||||||
<TwcMaterials :data="data.materials" />
|
<TwcMaterials :data="data.materials" />
|
||||||
<TwcSkills :data="data.skills" />
|
<TwcSkills :data="data.skills" />
|
||||||
<TwcConstellations :data="data.constellation" />
|
<TwcConstellations :data="data.constellation" />
|
||||||
<v-expansion-panels :theme="vuetifyTheme" class="twc-text-item">
|
<v-expansion-panels class="twc-text-item">
|
||||||
<v-expansion-panel>
|
<v-expansion-panel>
|
||||||
<template #title><span class="twc-text-title">资料</span></template>
|
<template #title><span class="twc-text-title">资料</span></template>
|
||||||
<template #text>
|
<template #text>
|
||||||
@@ -101,7 +101,6 @@ import TwcConstellations from "../components/wiki/twc-constellations.vue";
|
|||||||
import TwcMaterials from "../components/wiki/twc-materials.vue";
|
import TwcMaterials from "../components/wiki/twc-materials.vue";
|
||||||
import TwcSkills from "../components/wiki/twc-skills.vue";
|
import TwcSkills from "../components/wiki/twc-skills.vue";
|
||||||
import { getWikiData } from "../data";
|
import { getWikiData } from "../data";
|
||||||
import { useAppStore } from "../store/modules/app";
|
|
||||||
|
|
||||||
// 路由数据
|
// 路由数据
|
||||||
const id = <string>useRoute().params.id;
|
const id = <string>useRoute().params.id;
|
||||||
@@ -111,12 +110,6 @@ const loadingEmpty = ref<boolean>(false);
|
|||||||
const loadingTitle = ref<string>("正在加载");
|
const loadingTitle = ref<string>("正在加载");
|
||||||
const loadingSub = ref<string>();
|
const loadingSub = ref<string>();
|
||||||
|
|
||||||
// 主题
|
|
||||||
const appStore = useAppStore();
|
|
||||||
const vuetifyTheme = computed(() => {
|
|
||||||
return appStore.theme === "dark" ? "dark" : "light";
|
|
||||||
});
|
|
||||||
|
|
||||||
// 数据
|
// 数据
|
||||||
const data = ref<TGApp.App.Character.WikiItem>();
|
const data = ref<TGApp.App.Character.WikiItem>();
|
||||||
const box = computed(() => {
|
const box = computed(() => {
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<TwcMaterials :data="data.materials" />
|
<TwcMaterials :data="data.materials" />
|
||||||
<v-expansion-panels :theme="vuetifyTheme" class="tww-affix">
|
<v-expansion-panels class="tww-affix">
|
||||||
<v-expansion-panel expand-icon="mdi-menu-down">
|
<v-expansion-panel expand-icon="mdi-menu-down">
|
||||||
<template #title>
|
<template #title>
|
||||||
<span class="tww-text-title">{{ data.affix.Name }}-精炼 {{ select }}</span>
|
<span class="tww-text-title">{{ data.affix.Name }}-精炼 {{ select }}</span>
|
||||||
@@ -30,7 +30,7 @@
|
|||||||
</template>
|
</template>
|
||||||
</v-expansion-panel>
|
</v-expansion-panel>
|
||||||
</v-expansion-panels>
|
</v-expansion-panels>
|
||||||
<v-expansion-panels :theme="vuetifyTheme" class="tww-story">
|
<v-expansion-panels class="tww-story">
|
||||||
<v-expansion-panel
|
<v-expansion-panel
|
||||||
expand-icon="mdi-menu-down"
|
expand-icon="mdi-menu-down"
|
||||||
v-for="(story, index) in data.story"
|
v-for="(story, index) in data.story"
|
||||||
@@ -59,7 +59,6 @@ import TItembox, { TItemBoxData } from "../components/main/t-itembox.vue";
|
|||||||
import ToLoading from "../components/overlay/to-loading.vue";
|
import ToLoading from "../components/overlay/to-loading.vue";
|
||||||
import TwcMaterials from "../components/wiki/twc-materials.vue";
|
import TwcMaterials from "../components/wiki/twc-materials.vue";
|
||||||
import { getWikiData } from "../data";
|
import { getWikiData } from "../data";
|
||||||
import { useAppStore } from "../store/modules/app";
|
|
||||||
import { parseHtmlText } from "../utils/toolFunc";
|
import { parseHtmlText } from "../utils/toolFunc";
|
||||||
|
|
||||||
// 路由数据
|
// 路由数据
|
||||||
@@ -70,12 +69,6 @@ const loadingEmpty = ref<boolean>(false);
|
|||||||
const loadingTitle = ref<string>("正在加载");
|
const loadingTitle = ref<string>("正在加载");
|
||||||
const loadingSub = ref<string>();
|
const loadingSub = ref<string>();
|
||||||
|
|
||||||
// 主题
|
|
||||||
const appStore = useAppStore();
|
|
||||||
const vuetifyTheme = computed(() => {
|
|
||||||
return appStore.theme === "dark" ? "dark" : "light";
|
|
||||||
});
|
|
||||||
|
|
||||||
// 数据
|
// 数据
|
||||||
const data = ref<TGApp.App.Weapon.WikiItem>();
|
const data = ref<TGApp.App.Weapon.WikiItem>();
|
||||||
const box = computed(() => {
|
const box = computed(() => {
|
||||||
|
|||||||
Reference in New Issue
Block a user