mirror of
https://github.com/halo-dev/halo.git
synced 2025-12-20 16:44:38 +08:00
Improve navigation logic after publishing content (#7775)
This commit is contained in:
@@ -262,9 +262,15 @@ const handlePublish = async () => {
|
||||
});
|
||||
|
||||
if (returnToView.value === "true" && permalink) {
|
||||
handleClearCache(name.value);
|
||||
window.location.href = permalink;
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
|
||||
if (router.options.history.state.back === null) {
|
||||
router.push({ name: "Posts" });
|
||||
} else {
|
||||
router.back();
|
||||
}
|
||||
} else {
|
||||
const { data } = await consoleApiClient.content.post.draftPost({
|
||||
|
||||
Reference in New Issue
Block a user