Commit deab64d0 authored by wangxin's avatar wangxin

Update form.component.ts

parent eb39ed7e
......@@ -45,11 +45,18 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
ngOnInit() {
this.item = {};
this.item.contentObj = {};
if (!this.item.contentObj) {
this.item.contentObj = {};
}
// 获取存储的数据
(<any>window).courseware.getData((data) => {
if (data) {
this.item = data;
} else {
this.item = {};
}
this.init();
......@@ -63,7 +70,11 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
ngOnDestroy() {}
init() {}
init() {
if (this.item.contentObj.picArr) {
this.picArr = this.item.contentObj.picArr;
}
}
/**
* 储存图片数据
......
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