src/app/routes/devices/version/add-or-edit/add-or-edit.component.ts
@@ -42,8 +42,22 @@ for (const i in this.validateForm.controls) { this.validateForm.controls[ i ].disable(); } const isModified = Object.keys(value).some( (key: string) => { return this.data[key] !== value[key]; } ); // 未作修改 if (!isModified) { this.close(); return; } this.isSaving = true; this.data = value; Object.keys(this.data).forEach( (key: string) => { if ( value[key] != null ) { this.data[key] = value[key]; } } ); this.subject.next( this ); }else { for (const i in this.validateForm.controls) {