Commit ec52fa0c authored by 李维's avatar 李维

Bug fix

parent 56ab2271
......@@ -25,7 +25,9 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
this.item = {};
// 获取存储的数据
(<any> window).courseware.getData((data) => {
this.item.questionType = 'text';
this.item.answerType = 'text';
this.item.answerArr = [];
if (data) {
this.item = data;
}
......@@ -33,10 +35,7 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
this.init();
this.refresh();
setTimeout(() => {
this.changeDetectorRef.markForCheck();
this.changeDetectorRef.detectChanges();
}, 200);
}, this.saveKey);
}
......@@ -69,6 +68,11 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
this.item.answerArr = []
}
setTimeout(() => {
this.changeDetectorRef.markForCheck();
this.changeDetectorRef.detectChanges();
}, 200);
}
......
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