mirror of https://github.com/halo-dev/halo-admin
perf: back to post list when post is first created (#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/710/head
parent
db187f14eb
commit
7f4ee54ffb
|
@ -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