Skip to content

Commit

Permalink
Fix unvalidated parameters when publishing
Browse files Browse the repository at this point in the history
Signed-off-by: longjuan <[email protected]>
  • Loading branch information
longjuan committed Dec 13, 2022
1 parent f3ef88e commit 067646b
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/modules/contents/posts/components/PostSettingModal.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<script lang="ts" setup>
import { VButton, VModal, VSpace, VTabItem, VTabs } from "@halo-dev/components";
import SubmitButton from "@/components/button/SubmitButton.vue";
import { computed, ref, watchEffect } from "vue";
import type { Post } from "@halo-dev/api-client";
import cloneDeep from "lodash.clonedeep";
Expand Down Expand Up @@ -192,6 +193,8 @@ const onPublishTimeChange = (value: string) => {
:actions="false"
:preserve="true"
type="form"
:config="{ validationVisibility: 'submit' }"
@submit="handlePublish"
>
<FormKit
v-model="formState.spec.title"
Expand Down Expand Up @@ -306,14 +309,14 @@ const onPublishTimeChange = (value: string) => {
<template #footer>
<VSpace>
<template v-if="publishSupport">
<VButton
<SubmitButton
v-if="formState.metadata.labels?.[postLabels.PUBLISHED] !== 'true'"
:loading="publishing"
type="secondary"
@click="handlePublish()"
text="发布"
@submit="$formkit.submit('basic')"
>
发布
</VButton>
</SubmitButton>
<VButton
v-else
:loading="publishCanceling"
Expand Down

0 comments on commit 067646b

Please sign in to comment.