Commit 73e18525 authored by liujiangnan's avatar liujiangnan

feat: 渲染问题

parent 81b4a115
import { Component, ElementRef, ViewChild, OnInit, Input, OnDestroy, HostListener, OnChanges, AfterViewInit } from '@angular/core';
import { Component, ElementRef, ViewChild, OnInit, Input, OnDestroy, HostListener, OnChanges, AfterViewInit, ApplicationRef, ChangeDetectorRef } from '@angular/core';
import * as _ from 'lodash';
import { animate, state, style, transition, trigger } from '@angular/animations';
......@@ -46,6 +46,11 @@ export class PlayComponent implements OnInit {
curIndex = 0;
curOption: any;
constructor(private appRef: ApplicationRef,
private changeDetectorRef: ChangeDetectorRef) {
}
ngOnInit() {
this.data = {
contentObj: {
......@@ -65,6 +70,8 @@ export class PlayComponent implements OnInit {
this.data = data;
}
window["air"].hideAirClassLoading(this.saveKey, this.data);
this.refresh();
}, this.saveKey);
}
......@@ -79,5 +86,14 @@ export class PlayComponent implements OnInit {
this.curOption = null;
}
/**
* 刷新 渲染页面
*/
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