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(() => {
-
- 取消发布
-
-
- 发布
+
+ {{
+ formState.post.status?.phase === "PUBLISHED" ? "重新发布" : "发布"
+ }}
{
>
仅保存
+
+ 取消发布
+
关闭
diff --git a/src/modules/contents/posts/tags/TagList.vue b/src/modules/contents/posts/tags/TagList.vue
index dfc16172e..067ea8942 100644
--- a/src/modules/contents/posts/tags/TagList.vue
+++ b/src/modules/contents/posts/tags/TagList.vue
@@ -192,7 +192,7 @@ onMounted(async () => {
();
+const props = withDefaults(
+ defineProps<{
+ tag: Tag;
+ route: boolean;
+ }>(),
+ {
+ route: false,
+ }
+);
const labelColor = computed(() => {
const { color } = props.tag.spec;
@@ -18,9 +25,24 @@ const labelColor = computed(() => {
const onBlack = Math.abs(Color.contrast(color, "black", "APCA"));
return onWhite > onBlack ? "white" : "#333";
});
+
+const router = useRouter();
+
+const handleRouteToDetail = () => {
+ if (!props.route) {
+ return;
+ }
+ router.push({
+ name: "Tags",
+ query: { name: props.tag.metadata.name },
+ });
+};
-
+
{{ tag.spec.displayName }}