Browse Source

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
Ryan Wang 2 years ago committed by GitHub
parent
commit
7f4ee54ffb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      src/modules/contents/pages/SinglePageEditor.vue
  2. 2
      src/modules/contents/posts/PostEditor.vue

1
src/modules/contents/pages/SinglePageEditor.vue

@ -140,6 +140,7 @@ const handlePublish = async () => {
await apiClient.singlePage.draftSinglePage({
singlePageRequest: formState.value,
});
router.push({ name: "SinglePages" });
}
Toast.success("发布成功");

2
src/modules/contents/posts/PostEditor.vue

@ -144,6 +144,8 @@ const handlePublish = async () => {
await apiClient.post.publishPost({
name: data.metadata.name,
});
router.push({ name: "Posts" });
}
Toast.success("发布成功", { duration: 2000 });

Loading…
Cancel
Save