fix: 无法发布文章的bug
This commit is contained in:
@@ -36,7 +36,7 @@ export class PublishFormComponent implements OnInit {
|
|||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
this.formGroup = this.fb.group({
|
this.formGroup = this.fb.group({
|
||||||
isUpdate: [true, Validators.required],
|
isUpdate: [false, Validators.required],
|
||||||
type: [true, Validators.required],
|
type: [true, Validators.required],
|
||||||
tagList: [null, Validators.required],
|
tagList: [null, Validators.required],
|
||||||
tags: [null],
|
tags: [null],
|
||||||
@@ -55,7 +55,7 @@ export class PublishFormComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
publishArticle() {
|
publishArticle() {
|
||||||
console.log(this.formGroup.value)
|
// console.log(this.formGroup.value)
|
||||||
const formData = {
|
const formData = {
|
||||||
id: this.formGroup.value.isUpdate ? this.primaryData?.id : null,
|
id: this.formGroup.value.isUpdate ? this.primaryData?.id : null,
|
||||||
type: this.formGroup.value.type,
|
type: this.formGroup.value.type,
|
||||||
|
|||||||
Reference in New Issue
Block a user