From dc4b62ab514d4daf6fbd37a9f1bd8c5d7d5acc43 Mon Sep 17 00:00:00 2001 From: Ryan Wang Date: Sun, 4 Sep 2022 17:17:37 +0800 Subject: [PATCH] perf: improve post publishing --- src/modules/contents/posts/PostList.vue | 41 ++++++++++++++----- .../components/CategoryListItem.vue | 4 +- .../posts/components/PostSettingModal.vue | 32 ++++++++------- src/modules/contents/posts/tags/TagList.vue | 2 +- .../posts/tags/components/PostTag.vue | 30 ++++++++++++-- 5 files changed, 76 insertions(+), 33 deletions(-) diff --git a/src/modules/contents/posts/PostList.vue b/src/modules/contents/posts/PostList.vue index 4d5b1fab9..f80f6b375 100644 --- a/src/modules/contents/posts/PostList.vue +++ b/src/modules/contents/posts/PostList.vue @@ -445,7 +445,7 @@ function handlePhaseFilterItemChange(filterItem: FilterItem) {
-
+
- + :tag="tag" + route + >
diff --git a/src/modules/contents/posts/categories/components/CategoryListItem.vue b/src/modules/contents/posts/categories/components/CategoryListItem.vue index 647d30dc1..8ccb56798 100644 --- a/src/modules/contents/posts/categories/components/CategoryListItem.vue +++ b/src/modules/contents/posts/categories/components/CategoryListItem.vue @@ -53,7 +53,7 @@ function onDelete(category: CategoryTree) { class="group relative block cursor-pointer px-4 py-3 transition-all hover:bg-gray-50" > @@ -75,7 +75,7 @@ function onDelete(category: CategoryTree) {
{ const handleSave = async () => { try { saving.value = true; + + // Set rendered content + formState.value.content.content = formState.value.content.raw; + if (isUpdateMode.value) { const { data } = await apiClient.post.updateDraftPost( formState.value.post.metadata.name, @@ -293,21 +297,10 @@ watchEffect(() => {