From 0c8eed9243f954b66b630d93b06466c394506c28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A6=BE=E5=87=A0=E6=B5=B7?= Date: Sat, 1 Aug 2020 21:43:36 +0800 Subject: [PATCH] ... --- src/app/view/link/link.component.ts | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/app/view/link/link.component.ts b/src/app/view/link/link.component.ts index 9e88cea..790c4a8 100644 --- a/src/app/view/link/link.component.ts +++ b/src/app/view/link/link.component.ts @@ -46,14 +46,6 @@ export class LinkComponent implements OnInit { name: [null, [Validators.required, Validators.maxLength(255)]], url: [null, [Validators.required, Validators.pattern(/^([\w-]+\.)+[\w-]+(\/[\w-./?%&=]*)?$/)]] }); - this.applyFormGroup.patchValue({ - desc: '百度', - email: 'a@celess.cn', - iconPath: 'baidu.com', - linkUrl: 'baidu.com', - name: '百度', - url: 'baidu.com' - }) } apply() { @@ -67,6 +59,7 @@ export class LinkComponent implements OnInit { this.message.success('提交成功,请稍等,即将为你处理'); this.loading = false; this.showModal = false; + this.applyFormGroup.reset() }, error: err => { if (err.code === 7200) { @@ -87,6 +80,7 @@ export class LinkComponent implements OnInit { } this.loading = false; this.showModal = false; + this.applyFormGroup.reset() } }); }