mirror of https://github.com/halo-dev/halo
perf: back to post list when post is first created (halo-dev/console#709)
#### What type of PR is this? /kind improvement /milestone 2.0 #### What this PR does / why we need it: 首次创建文章或者自定义页面时,跳转回管理列表,与编辑保持一致。 #### Special notes for your reviewer: /cc @halo-dev/sig-halo-console 测试方式:创建一篇新的文章或自定义页面,点击发布,观察是否返回到了管理列表。 #### Does this PR introduce a user-facing change? ```release-note None ```pull/3445/head
parent
73676ee815
commit
210d5e8b3e
|
@ -140,6 +140,7 @@ const handlePublish = async () => {
|
||||||
await apiClient.singlePage.draftSinglePage({
|
await apiClient.singlePage.draftSinglePage({
|
||||||
singlePageRequest: formState.value,
|
singlePageRequest: formState.value,
|
||||||
});
|
});
|
||||||
|
router.push({ name: "SinglePages" });
|
||||||
}
|
}
|
||||||
|
|
||||||
Toast.success("发布成功");
|
Toast.success("发布成功");
|
||||||
|
|
|
@ -144,6 +144,8 @@ const handlePublish = async () => {
|
||||||
await apiClient.post.publishPost({
|
await apiClient.post.publishPost({
|
||||||
name: data.metadata.name,
|
name: data.metadata.name,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
router.push({ name: "Posts" });
|
||||||
}
|
}
|
||||||
|
|
||||||
Toast.success("发布成功", { duration: 2000 });
|
Toast.success("发布成功", { duration: 2000 });
|
||||||
|
|
Loading…
Reference in New Issue