♻️ 公告页的窗口创建逻辑也顺便改一下

This commit is contained in:
BTMuli
2023-12-20 00:47:26 +08:00
parent 0d5d77e2bd
commit 568b0b5db7
4 changed files with 23 additions and 25 deletions

View File

@@ -166,7 +166,7 @@ onMounted(async () => {
// 打开 json
const isDev = useAppStore().devMode ?? false;
if (isDev) {
createPostJson(postId.toString());
createPostJson(postId);
}
await nextTick(() => {
loading.value = false;
@@ -236,7 +236,7 @@ function parseContent(content: string): string {
return JSON.stringify(result);
}
function createPostJson(postId: string): void {
function createPostJson(postId: number): void {
const jsonPath = `/post_detail_json/${postId}`;
const jsonTitle = `Post_${postId}_JSON`;
createTGWindow(jsonPath, "Dev_JSON", jsonTitle, 960, 720, false, false);