Commit a2f9ac99 authored by liujiaxin's avatar liujiaxin

sdf

parent b5a73f20
import { Component, ElementRef, ViewChild, OnInit, Input, OnDestroy, HostListener, AfterViewInit } from '@angular/core'; import { ApplicationRef, ChangeDetectorRef, Component, ElementRef, ViewChild, OnInit, Input, OnDestroy, HostListener, AfterViewInit } from '@angular/core';
import { import {
Label, Label,
...@@ -61,7 +61,10 @@ export class PlayComponent implements OnInit, AfterViewInit, OnDestroy { ...@@ -61,7 +61,10 @@ export class PlayComponent implements OnInit, AfterViewInit, OnDestroy {
animationB = ''; animationB = '';
saveKey = 'ww_talk'; saveKey = 'ww_talk';
constructor(private appRef: ApplicationRef,
private changeDetectorRef: ChangeDetectorRef) {
}
ngOnInit() { ngOnInit() {
this.data = { this.data = {
...@@ -92,12 +95,20 @@ export class PlayComponent implements OnInit, AfterViewInit, OnDestroy { ...@@ -92,12 +95,20 @@ export class PlayComponent implements OnInit, AfterViewInit, OnDestroy {
this.data = data; this.data = data;
} }
this.init(); this.init();
this.changeDetectorRef.markForCheck();
this.changeDetectorRef.detectChanges();
this.refresh();
if (window['air']) { if (window['air']) {
window['air'].hideAirClassLoading(this.saveKey, this.data); window['air'].hideAirClassLoading(this.saveKey, this.data);
} }
}, this.saveKey); }, this.saveKey);
} }
refresh() {
setTimeout(() => {
this.appRef.tick();
}, 1);
}
init() { init() {
this.talkIdx = { this.talkIdx = {
A: -1, A: -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