mirror of https://github.com/halo-dev/halo-admin
[release-2.0] fix: cannot save post when the publishTime is blank (#764)
This is an automated cherry-pick of #763 /assign JohnNiang ```release-note 修复 Console 端文章设置中的发布时间为空字符串时,无法保存的问题。 ```pull/776/head
parent
caca4975c7
commit
a3caa29efa
|
@ -177,7 +177,7 @@ const publishTime = computed(() => {
|
|||
});
|
||||
|
||||
const onPublishTimeChange = (value: string) => {
|
||||
formState.value.spec.publishTime = toISOString(value);
|
||||
formState.value.spec.publishTime = value ? toISOString(value) : undefined;
|
||||
};
|
||||
</script>
|
||||
|
||||
|
|
|
@ -169,7 +169,7 @@ const publishTime = computed(() => {
|
|||
});
|
||||
|
||||
const onPublishTimeChange = (value: string) => {
|
||||
formState.value.spec.publishTime = toISOString(value);
|
||||
formState.value.spec.publishTime = value ? toISOString(value) : undefined;
|
||||
};
|
||||
</script>
|
||||
<template>
|
||||
|
|
Loading…
Reference in New Issue