Commit d124eef9 authored by liujiangnan's avatar liujiangnan

feat: 表单

parent 81531605
......@@ -2,7 +2,9 @@
export const defaultData = {
"title": "Hello Apples",
"endImgAni": {
"tipSwitch": 1,
"audio": "",
"imgAni": {
"ske": {
"url": "https://teach.cdn.ireadabc.com/8a5825bc51a32f13ddb55d3065d713a9.json",
"name": "动画用图川阅阅奖励_ske.json"
......
......@@ -4,7 +4,6 @@
.model-content {
width: 100%;
height: 100%;
}
.radioPaire {
......
<div class="model-content">
<br>
<span style="font-size: 20px; padding-left: 20px;">标题: </span>
<input type="text" style="width: 300px;" nz-input [(ngModel)]="item.title" (blur)="save()">
<div>
<span style="font-size: 20px;">标题: </span><input type="text" nz-input [(ngModel)]="item.title" (blur)="save()">
<span style="font-size: 20px;">提示动画: </span>
<app-upload-dragon-bone style="width: 100%" (save)="onDragonBoneSave($event,item)"
[skeJsonData]="item.endImgAni.ske" [texJsonData]="item.endImgAni.tex" [texPngData]="item.endImgAni.png">
<br>
<br>
<span style="padding-left: 20px;font-size: 20px;">提示开关: </span>
<nz-radio-group [ngModel]="item.tipSwitch" (ngModelChange)="customRadioChange($event, item,'tipSwitch')"
style="font-size: 20px; display: inline-block;">
<label nz-radio nzValue="1"></label>
<label nz-radio nzValue="0"></label>
</nz-radio-group>
<br>
<br>
<div *ngIf="item.tipSwitch == 1">
<div>
<span style="font-size: 20px; padding-left: 20px;">提示音频: </span>
<app-audio-recorder [audioUrl]="item.audio" style="display: inline-block;"
(audioUploaded)="onAudioUploadSuccess($event, 'audio', item)">
</app-audio-recorder>
</div>
<br>
<span style="font-size: 20px; padding-left: 20px;">提示动画: </span>
<app-upload-dragon-bone style="width: 100%" (save)="onDragonBoneSave($event,item)" style="display: inline-block;"
[skeJsonData]="item.imgAni.ske" [texJsonData]="item.imgAni.tex" [texPngData]="item.imgAni.png">
</app-upload-dragon-bone>
</div>
......
......@@ -17,7 +17,9 @@ export class FormComponent extends ComponentBase implements OnInit, OnChanges, O
item = {
title: "",
endImgAni: {
tipSwitch: 1,
audio: "",
imgAni: {
ske: {},
tex: {},
png: {}
......@@ -46,4 +48,9 @@ export class FormComponent extends ComponentBase implements OnInit, OnChanges, O
this.save();
}
customRadioChange(e, item, key) {
item[key] = e;
this.save();
}
}
\ No newline at end of file
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