🐛 修复 postRef 为 null 问题

This commit is contained in:
BTMuli
2023-12-27 22:53:12 +08:00
parent afddc9f955
commit 9973cb1577

View File

@@ -136,7 +136,6 @@ onMounted(async () => {
loadingTitle.value = "正在渲染数据...";
renderPost.value = getRenderPost(postData.value);
shareTitle.value = `Post_${postId}`;
postRef.value = <HTMLElement>document.querySelector(".tp-post-body");
await appWindow.setTitle(`Post_${postId} ${postData.value.post.subject}`);
} catch (error) {
console.error(error);
@@ -153,6 +152,7 @@ onMounted(async () => {
}
await nextTick(() => {
loading.value = false;
postRef.value = <HTMLElement>document.querySelector(".tp-post-body");
});
});