Commit e9139ba2 authored by liujiaxin's avatar liujiaxin

www

parent 5e6a7d0e
...@@ -128,6 +128,9 @@ export class FormComponent implements OnInit, OnChanges, AfterViewInit, OnDestro ...@@ -128,6 +128,9 @@ export class FormComponent implements OnInit, OnChanges, AfterViewInit, OnDestro
return nitem; return nitem;
}); });
this.initWithDataAfterData(); this.initWithDataAfterData();
this.changeDetectorRef.markForCheck();
this.changeDetectorRef.detectChanges();
this.refresh();
}); });
} }
...@@ -171,6 +174,8 @@ export class FormComponent implements OnInit, OnChanges, AfterViewInit, OnDestro ...@@ -171,6 +174,8 @@ export class FormComponent implements OnInit, OnChanges, AfterViewInit, OnDestro
this.item.contentObj.parts = data; this.item.contentObj.parts = data;
// this.item.contentObj['imgData'] = imgData; // this.item.contentObj['imgData'] = imgData;
(window as any).courseware.setData(this.item, null, this.saveKey); (window as any).courseware.setData(this.item, null, this.saveKey);
this.changeDetectorRef.markForCheck();
this.changeDetectorRef.detectChanges();
this.refresh(); this.refresh();
} }
...@@ -293,6 +298,9 @@ export class FormComponent implements OnInit, OnChanges, AfterViewInit, OnDestro ...@@ -293,6 +298,9 @@ export class FormComponent implements OnInit, OnChanges, AfterViewInit, OnDestro
console.log(123123); console.log(123123);
this.focusUserInput(); this.focusUserInput();
this.save(); this.save();
this.changeDetectorRef.markForCheck();
this.changeDetectorRef.detectChanges();
this.refresh();
} }
focusUserInput() { focusUserInput() {
setTimeout(() => { setTimeout(() => {
...@@ -352,6 +360,9 @@ export class FormComponent implements OnInit, OnChanges, AfterViewInit, OnDestro ...@@ -352,6 +360,9 @@ export class FormComponent implements OnInit, OnChanges, AfterViewInit, OnDestro
const cropper: any = this.angularCropper.cropper; const cropper: any = this.angularCropper.cropper;
cropper.previews = []; cropper.previews = [];
this.changeDetectorRef.markForCheck();
this.changeDetectorRef.detectChanges();
this.refresh();
} }
savePart(evt, idx) { savePart(evt, idx) {
...@@ -378,6 +389,9 @@ export class FormComponent implements OnInit, OnChanges, AfterViewInit, OnDestro ...@@ -378,6 +389,9 @@ export class FormComponent implements OnInit, OnChanges, AfterViewInit, OnDestro
cropper.previews = []; cropper.previews = [];
this.initPart(img ,idx); this.initPart(img ,idx);
this.save(); this.save();
this.changeDetectorRef.markForCheck();
this.changeDetectorRef.detectChanges();
this.refresh();
} }
previewUserSelectPart(idx) { previewUserSelectPart(idx) {
const part = this.cropperParts[idx]; const part = this.cropperParts[idx];
...@@ -402,6 +416,9 @@ export class FormComponent implements OnInit, OnChanges, AfterViewInit, OnDestro ...@@ -402,6 +416,9 @@ export class FormComponent implements OnInit, OnChanges, AfterViewInit, OnDestro
'height.px': ih, 'height.px': ih,
transform: `translateX(-${ix}px) translateY(-${iy}px)` transform: `translateX(-${ix}px) translateY(-${iy}px)`
}; };
this.changeDetectorRef.markForCheck();
this.changeDetectorRef.detectChanges();
this.refresh();
} }
onChangePartWord(val, idx ) { onChangePartWord(val, idx ) {
// const part = this.cropperParts[idx]; // const part = this.cropperParts[idx];
......
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