Commit 8233541c authored by liujiaxin's avatar liujiaxin

www

parent d116f99e
...@@ -126,6 +126,7 @@ export class FormComponent implements OnInit, OnChanges, AfterViewInit, OnDestro ...@@ -126,6 +126,7 @@ export class FormComponent implements OnInit, OnChanges, AfterViewInit, OnDestro
nitem.imgCss = {}; nitem.imgCss = {};
return nitem; return nitem;
}); });
this.initWithDataAfterData();
}); });
} }
...@@ -292,7 +293,10 @@ export class FormComponent implements OnInit, OnChanges, AfterViewInit, OnDestro ...@@ -292,7 +293,10 @@ export class FormComponent implements OnInit, OnChanges, AfterViewInit, OnDestro
} }
focusUserInput() { focusUserInput() {
setTimeout(() => { setTimeout(() => {
this.partConfigBoxes.toArray()[this.currentEditPartIndex].nativeElement.querySelector('input').focus(); const ipt = this.partConfigBoxes.toArray()[this.currentEditPartIndex].nativeElement.querySelector('input')
if (ipt) {
ipt.focus();
}
}, 10); }, 10);
} }
editPart(idx) { editPart(idx) {
...@@ -403,8 +407,10 @@ export class FormComponent implements OnInit, OnChanges, AfterViewInit, OnDestro ...@@ -403,8 +407,10 @@ export class FormComponent implements OnInit, OnChanges, AfterViewInit, OnDestro
} }
ngAfterViewInit(){
ngAfterViewInit() { }
initWithDataAfterData() {
// console.log('ngAfterViewInit'); // console.log('ngAfterViewInit');
this.partConfigBoxes.changes.subscribe(t => { this.partConfigBoxes.changes.subscribe(t => {
......
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