Commit 196c0114 authored by Li Mingzhe's avatar Li Mingzhe

fix: 表单不渲染

parent 92699e89
No preview for this file type
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<div style="padding: 20px"> <div style="padding: 20px">
<div *ngFor="let group of item.groupArr; let gIdx = index;"> <div *ngFor="let group of groupArr; let gIdx = index;">
<div style="width: 100%" align="center"> <div style="width: 100%" align="center">
<h1>组-{{gIdx + 1}}</h1> <h1>组-{{gIdx + 1}}</h1>
......
...@@ -37,6 +37,8 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy { ...@@ -37,6 +37,8 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
} }
] ]
groupArr = [];
constructor(private appRef: ApplicationRef,private changeDetectorRef: ChangeDetectorRef, private message: NzMessageService) { constructor(private appRef: ApplicationRef,private changeDetectorRef: ChangeDetectorRef, private message: NzMessageService) {
} }
...@@ -86,6 +88,8 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy { ...@@ -86,6 +88,8 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
if (!this.item.groupArr) { if (!this.item.groupArr) {
this.item.groupArr = []; this.item.groupArr = [];
} }
this.groupArr = this.item.groupArr;
} }
...@@ -184,11 +188,14 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy { ...@@ -184,11 +188,14 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
texJsonData: {}, texJsonData: {},
texPngData: {}, texPngData: {},
}); });
this.groupArr = this.item.groupArr;
this.save(); this.save();
} }
deleteGroup(i) { deleteGroup(i) {
this.item.groupArr.splice(i, 1); this.item.groupArr.splice(i, 1);
this.groupArr = this.item.groupArr;
this.save(); this.save();
} }
......
...@@ -183,7 +183,6 @@ cc.Class({ ...@@ -183,7 +183,6 @@ cc.Class({
} }
this.data.groupArr.forEach((group) => { this.data.groupArr.forEach((group) => {
if (group.hotZoneItemArr) { if (group.hotZoneItemArr) {
group.hotZoneItemArr.forEach((item) => { group.hotZoneItemArr.forEach((item) => {
if (item.gIdx == '0' &item.skeJsonData) { if (item.gIdx == '0' &item.skeJsonData) {
......
No preview for this file type
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