From b60688cfd7bee578a2788eb097f9d29d77c10f52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A6=BE=E5=87=A0=E6=B5=B7?= Date: Tue, 30 Jun 2020 17:31:38 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=A9=BA=E5=80=BC=EF=BC=8C?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E5=BC=82=E5=B8=B8bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/view/admin/admin-link/admin-link.component.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/app/view/admin/admin-link/admin-link.component.ts b/src/app/view/admin/admin-link/admin-link.component.ts index 35bfed4..fec9af2 100644 --- a/src/app/view/admin/admin-link/admin-link.component.ts +++ b/src/app/view/admin/admin-link/admin-link.component.ts @@ -70,6 +70,9 @@ export class AdminLinkComponent implements OnInit { linkReq.name = this.formGroup.value.name; linkReq.url = this.formGroup.value.url; linkReq.open = this.formGroup.value.open; + // 暂时设置未空 + linkReq.desc = ''; + linkReq.iconPath = ''; const oper = this.formGroup.value.oper; let observable: Observable>; if (oper === 'edit') { @@ -80,7 +83,7 @@ export class AdminLinkComponent implements OnInit { } observable.subscribe({ next: data => this.messageService.success('操作成功'), - error: err => this.messageService.success('操作失败,', err.msg), + error: err => this.messageService.error('操作失败,' + err.msg), complete: () => this.getLinks() }) } @@ -88,6 +91,7 @@ export class AdminLinkComponent implements OnInit { addLink() { this.modalVisible = true; this.modalTitle = '新增友链信息'; + this.formGroup.reset(); this.formGroup.controls.oper.setValue('add') } } -- 2.49.1