From e1bd4a9411ea568526d5248b4b901e4948176bd1 Mon Sep 17 00:00:00 2001 From: Michael Li Date: Sat, 30 Jul 2022 12:11:31 +0800 Subject: [PATCH] web: just reload home path after create post success --- web/src/views/Home.vue | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/web/src/views/Home.vue b/web/src/views/Home.vue index 5122d653..d40f7e85 100644 --- a/web/src/views/Home.vue +++ b/web/src/views/Home.vue @@ -84,12 +84,9 @@ const loadPosts = () => { }; const onPostSuccess = (post: Item.PostProps) => { - router.push({ - name: 'post', - query: { - id: post.id, - }, - }); + setTimeout(() => { + loadPosts(); + }, 50); }; const updatePage = (p: number) => {