fix(window): 更改创建逻辑

Signed-off-by: BTMuli <BT-Muli@outlook.com>
This commit is contained in:
BTMuli
2023-04-05 14:21:05 +08:00
parent 1fafbd4612
commit e7d293f83b
8 changed files with 32 additions and 19 deletions

View File

@@ -24,6 +24,7 @@ const post_id = Number(useRoute().params.post_id);
const postHtml = ref("");
onMounted(async () => {
await appWindow.show();
// 检查数据
if (!post_id) {
loadingEmpty.value = true;
@@ -39,6 +40,7 @@ onMounted(async () => {
postHtml.value = MysOper.Post.parser(postData);
await appWindow.setTitle(postData.post.subject);
} catch (error) {
console.error(error);
loadingEmpty.value = true;
loadingTitle.value = "帖子不存在或解析失败";
await appWindow.setTitle("帖子不存在或解析失败");