Commit 96599ac9 authored by 范雪寒's avatar 范雪寒

feat: 补充标题

parent 8f05e337
...@@ -36,6 +36,9 @@ ...@@ -36,6 +36,9 @@
<div class="border" style="width: 750px;"> <div class="border" style="width: 750px;">
<span style="float: left; height: 30px; font-size: 18px;">{{sideByIndex[i]}}:</span> <span style="float: left; height: 30px; font-size: 18px;">{{sideByIndex[i]}}:</span>
<br><br> <br><br>
<span style="float: left; margin-left: 20px; margin-bottom: -15px; height: 30px; font-size: 18px;">标题:</span>
<input style="float: left; margin-bottom: -15px; width: 250px;" type="text" nz-input [(ngModel)]="item.groupTitle[i]" (blur)="save()">
<div *ngFor="let line of group; let j = index"> <div *ngFor="let line of group; let j = index">
<div style="width: 660px; float: left;" class="border"> <div style="width: 660px; float: left;" class="border">
<div style="float: left;"> <div style="float: left;">
......
...@@ -37,7 +37,6 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy { ...@@ -37,7 +37,6 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
} }
ngOnInit() { ngOnInit() {
this.item = { this.item = {
title: '', title: '',
titleAudio: '', titleAudio: '',
...@@ -46,7 +45,8 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy { ...@@ -46,7 +45,8 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
middleImg: '', middleImg: '',
middleImgAudio: '', middleImgAudio: '',
totalAudio: '', totalAudio: '',
group: [[], [], [], []] group: [[], [], [], []],
groupTitle: ['', '', '', ''],
}; };
// 获取存储的数据 // 获取存储的数据
...@@ -56,6 +56,10 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy { ...@@ -56,6 +56,10 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
this.item = data; this.item = data;
} }
if (!this.item.groupTitle) {
this.item.groupTitle = ['', '', '', ''];
}
this.init(); this.init();
this.changeDetectorRef.markForCheck(); this.changeDetectorRef.markForCheck();
this.changeDetectorRef.detectChanges(); this.changeDetectorRef.detectChanges();
......
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