Commit 6ea77866 authored by 李维's avatar 李维

Hide html until data loaded

parent 5712500b
......@@ -665,7 +665,7 @@ export class CustomHotZoneComponent implements OnInit, OnDestroy {
}
getURL(url: string) {
if(!url && url.indexOf("http")==-1 && url.indexOf("/")==-1){
if(url && url.indexOf("http")==-1 && url.indexOf("/")==-1){
return this.assetsRoot.replace(/_PH_IMAGE_NAME_/g, url)
} else {
return url
......
<div class="model-content">
<div *ngIf="dataLoaded" class="model-content">
<div class="card-config">
<div class="card-item">
<div class="card-item-content">
......
......@@ -40,6 +40,7 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
bgImages: Object = {leftTop:"", middleTop:"", rightTop:"", leftMiddle:"", rightMiddle:"", leftBottom:"", middleBottom:"", rightBottom:""};
KEY = 'DataKey_YM4-13';
dataLoaded = false;
set item(item) {
this._item = item;
}
......@@ -50,9 +51,9 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
@Output()
update = new EventEmitter();
@ViewChild('hotZooLeftEL', {static: true }) hotZooLeftEL;
@ViewChild('hotZooMiddleEL', {static: true }) hotZooMiddleEL;
@ViewChild('hotZooRightEL', {static: true }) hotZooRightEL;
@ViewChild('hotZooLeftEL', {static: false }) hotZooLeftEL;
@ViewChild('hotZooMiddleEL', {static: false }) hotZooMiddleEL;
@ViewChild('hotZooRightEL', {static: false }) hotZooRightEL;
constructor(private appRef: ApplicationRef) {
......@@ -74,6 +75,7 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
}
this.init();
this.refresh();
this.dataLoaded = true;
}, this.KEY);
}
......
......@@ -12,7 +12,7 @@ export const defaultData = {
hotZoneItemArrLeft: [],
questionsLeft: [],
bgItemLeft: {
url: "defalut_bg",
url: "bg_330_168",
rect: {
x: 0,
y: 0,
......@@ -26,7 +26,7 @@ export const defaultData = {
hotZoneItemArrMiddle: [],
questionsMiddle: [],
bgItemMiddle: {
url: "defalut_bg",
url: "bg_330_168",
rect: {
x: 0,
y: 0,
......@@ -40,7 +40,7 @@ export const defaultData = {
hotZoneItemArrRight: [],
questionsRight: [],
bgItemRight: {
url: "defalut_bg",
url: "bg_330_168",
rect: {
x: 0,
y: 0,
......
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