mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2025-12-13 09:28:14 +08:00
♻️ 感觉差不多了,剩下的就靠测试了 #92
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { appWindow } from "@tauri-apps/api/window";
|
||||
import { webviewWindow } from "@tauri-apps/api";
|
||||
import { ref, onMounted, reactive } from "vue";
|
||||
import JsonViewer from "vue-json-viewer";
|
||||
import { useRoute } from "vue-router";
|
||||
@@ -33,7 +33,7 @@ let jsonList = reactive({});
|
||||
let jsonContent = reactive({});
|
||||
|
||||
onMounted(async () => {
|
||||
await appWindow.show();
|
||||
await webviewWindow.getCurrent().show();
|
||||
// 检查数据
|
||||
if (!annoId) {
|
||||
loadingEmpty.value = true;
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { appWindow } from "@tauri-apps/api/window";
|
||||
import { webviewWindow } from "@tauri-apps/api";
|
||||
import { onMounted, reactive, ref } from "vue";
|
||||
import JsonViewer from "vue-json-viewer";
|
||||
import { useRoute } from "vue-router";
|
||||
@@ -30,7 +30,7 @@ let parseData = reactive<TGApp.Plugins.Mys.SctPost.Base[]>([]);
|
||||
const isEmpty = ref<boolean>(false);
|
||||
|
||||
onMounted(async () => {
|
||||
await appWindow.show();
|
||||
await webviewWindow.getCurrent().show();
|
||||
if (!postId) {
|
||||
loadingEmpty.value = true;
|
||||
loadingTitle.value = "错误的 POST ID!";
|
||||
|
||||
@@ -160,7 +160,7 @@ onMounted(async () => {
|
||||
const isDev = useAppStore().devMode ?? false;
|
||||
if (isDev) {
|
||||
await TGLogger.Info(`[t-post][${postId}][onMounted] 打开 JSON 窗口`);
|
||||
createPostJson(postId);
|
||||
await createPostJson(postId);
|
||||
}
|
||||
await nextTick(() => {
|
||||
shareTimeTimer.value = setInterval(() => {
|
||||
@@ -253,10 +253,10 @@ function parseContent(content: string): string {
|
||||
return JSON.stringify(result);
|
||||
}
|
||||
|
||||
function createPostJson(postId: number): void {
|
||||
async function createPostJson(postId: number): Promise<void> {
|
||||
const jsonPath = `/post_detail_json/${postId}`;
|
||||
const jsonTitle = `Post_${postId}_JSON`;
|
||||
createTGWindow(jsonPath, "Dev_JSON", jsonTitle, 960, 720, false, false);
|
||||
await createTGWindow(jsonPath, "Dev_JSON", jsonTitle, 960, 720, false, false);
|
||||
}
|
||||
|
||||
async function toPost(): Promise<void> {
|
||||
|
||||
Reference in New Issue
Block a user