Commit b5c84a8f authored by Chen Jiping's avatar Chen Jiping

调试

parent 20cd3065
...@@ -26,9 +26,10 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy { ...@@ -26,9 +26,10 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
ngOnInit() { ngOnInit() {
this.item = new Course(); this.item = new Course();
this.item.type = '01'; this.item.type = '01';
this.item.picArr = [];
this.item.colorArr = [];
this.initColorArr(); this.initColorArr();
...@@ -40,12 +41,12 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy { ...@@ -40,12 +41,12 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
if (data) { if (data) {
this.item = data; this.item = data;
} }
console.log(this.item); //console.log(this.item);
this.init(); this.init();
this.changeDetectorRef.markForCheck();
this.changeDetectorRef.detectChanges();
this.refresh(); this.refresh();
this.save();
}, this.saveKey); }, this.saveKey);
} }
...@@ -133,6 +134,8 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy { ...@@ -133,6 +134,8 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
* 刷新 渲染页面 * 刷新 渲染页面
*/ */
refresh() { refresh() {
this.changeDetectorRef.markForCheck();
this.changeDetectorRef.detectChanges();
setTimeout(() => { setTimeout(() => {
this.appRef.tick(); this.appRef.tick();
}, 1); }, 1);
......
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