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

Hide html until data loaded

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