Commit f972a842 authored by asdf's avatar asdf

表单制作

parent ce297878
<div class="model-content">
<div class="section-content;text-align:center">
<div style="display: inline-block; margin-left: 20px;">
<span>背景音乐</span><span> : </span>
</div>
<div style="display: inline-block; margin-bottom: 10px">
<app-audio-recorder [audioUrl]="contentObj.bgm_url" (audioUploaded)="onBgmUploadSuccess($event)">
</app-audio-recorder>
<div class="card-config">
<div class="card-item clearfix" style="padding: 0.5vw; width: 600px; ">
<div class="card-item-content border">
<div class="section-content;text-align:center">
<div style="display: inline-block; margin-left: 20px;">
<span>开始音频</span><span> : </span>
</div>
<div style="display: inline-block; margin-bottom: 10px;margin-left: 10px;">
<app-audio-recorder [audioUrl]="contentObj.bgm_url" (audioUploaded)="onBgmUploadSuccess($event)">
</app-audio-recorder>
</div>
</div>
<div class="section-content;text-align:center ">
<span style="margin-bottom: 10px;margin-left: 20px;">字母(小写,无需符号隔开。例如:ab): </span>
<input style="width: 200px; margin-bottom: 10px;margin-left: 10px;" type="text" nz-input
[(ngModel)]="contentObj.letter" (ngModelChange)="handleTextChange2($event)">
</div>
</div>
</div>
</div>
<!-- <div class="card-config">
<div class="card-item clearfix">
<div class="card-item-content border">
</div>
</div>
</div> -->
<div class="card-config">
<!-- 背景音乐 骨骼动画,音频,文字-------复制,粘贴 -->
<div *ngFor="let item of contentObj.dataArray; let i = index" class="card-item clearfix"
......@@ -18,7 +39,9 @@
<div class="title">
第-<strong>{{ i+1}}</strong>-个单词
</div>
<div class="section" style="margin-top: 10px"></div>
<div class="section-content;text-align:center ">
......@@ -34,7 +57,7 @@
<div class="section"></div>
<div class="section-content;text-align:center ">
<span style="margin-bottom: 10px;margin-left: 20px;">文本: </span>
<span style="margin-bottom: 10px;margin-left: 20px;">单词: </span>
<input style="width: 200px; margin-bottom: 10px;margin-left: 10px;" type="text" nz-input
[(ngModel)]="item.text" (ngModelChange)="handleTextChange($event, i)">
</div>
......@@ -47,7 +70,7 @@
</button>
</div>
</div>
<div class="section" style="margin-top: 10px"></div>
<div class="section-content;text-align:center" style="margin-top: 10px">
......
......@@ -31,6 +31,7 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
contentObj = {
"version": "1.1",
bgm_url: "",
letter:"",
dataArray: []
}
/**
......@@ -65,6 +66,12 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
this.refresh();
}
handleTextChange2(text) {
this.contentObj.letter = text;
this.saveItem()
this.refresh();
}
ngOnInit() {
this.item = {};
this.item.contentObj = {};
......@@ -143,7 +150,7 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
}
addItem(item) {
item.push({ text: "", shortAudio_url: '', image_url: "",words:{} })
item.push({ text: "",shortAudio_url: '', image_url: "",words:{} })
this.saveItem();
setTimeout(() => {
window.scrollTo(0, document.body.scrollHeight);
......
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