Commit 5e32c10d authored by Chen Jiping's avatar Chen Jiping

完善

parent 7d94ef20
import {Component, EventEmitter, Input, OnDestroy, OnChanges, OnInit, Output, ApplicationRef,ElementRef, HostListener} from '@angular/core'; import {Component, EventEmitter, Input, OnDestroy, OnChanges, OnInit, Output, ApplicationRef,ElementRef, HostListener,ChangeDetectorRef} from '@angular/core';
import { NzTableModule } from 'ng-zorro-antd/table'; import { NzTableModule } from 'ng-zorro-antd/table';
...@@ -15,7 +15,7 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy { ...@@ -15,7 +15,7 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
item; item;
constructor(private appRef: ApplicationRef) { constructor(private appRef: ApplicationRef,private changeDetectorRef: ChangeDetectorRef) {
} }
...@@ -38,6 +38,9 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy { ...@@ -38,6 +38,9 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
} }
console.log('item', this.item); console.log('item', this.item);
this.init(); this.init();
this.changeDetectorRef.markForCheck();
this.changeDetectorRef.detectChanges();
this.refresh(); this.refresh();
}, this.saveKey); }, this.saveKey);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment