Commit 51eca916 authored by liujiangnan's avatar liujiangnan

fix: 显示问题

parent ee48ea5f
import { Component, ElementRef, ViewChild, OnInit, Input, OnDestroy, HostListener, OnChanges, AfterViewInit } from '@angular/core';
import { Component, ElementRef, ApplicationRef, ChangeDetectorRef,ViewChild, OnInit, Input, OnDestroy, HostListener, OnChanges, AfterViewInit } from '@angular/core';
import * as _ from 'lodash';
......@@ -34,7 +34,8 @@ export class PlayComponent implements OnInit, OnDestroy, OnChanges, AfterViewIni
wrongAudio = new Audio();
isnull: any;
constructor() {
constructor(private appRef: ApplicationRef,
public changeDetectorRef: ChangeDetectorRef) {
this.num = 0;
this.indexnum = 0;
this.index = 0;
......@@ -71,7 +72,9 @@ export class PlayComponent implements OnInit, OnDestroy, OnChanges, AfterViewIni
this.data = data;
}
this.init();
window["air"].hideAirClassLoading(this.saveKey, this.data)
window["air"].hideAirClassLoading(this.saveKey, this.data);
this.refresh();
}, this.saveKey);
}
......@@ -186,5 +189,11 @@ export class PlayComponent implements OnInit, OnDestroy, OnChanges, AfterViewIni
});
}
refresh() {
setTimeout(() => {
this.appRef.tick();
}, 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