Commit 83198a13 authored by liujiangnan's avatar liujiangnan

feat: 表单添加项

parent 518e9c66
...@@ -4,6 +4,24 @@ ...@@ -4,6 +4,24 @@
<div class="border" style="width: 1000px;"> <div class="border" style="width: 1000px;">
<span style="font-size: 20px;">标题: </span> <span style="font-size: 20px;">标题: </span>
<input type="text" nz-input [(ngModel)]="item.title" (blur)="save()"> <input type="text" nz-input [(ngModel)]="item.title" (blur)="save()">
<div>
<span>老师头像:</span>
<div style="width: 300px;">
<app-upload-image-with-preview [picUrl]="item.teacher_avatar"
(imageUploaded)="onAssetUploadSuccess($event, 'teacher_avatar')">
</app-upload-image-with-preview>
</div>
</div>
<span style="font-size: 20px;">学习单词: </span>
<textarea rows="4" nz-input [(ngModel)]="item.word" (blur)="save()"></textarea>
<span style="font-size: 20px;">学习句子: </span>
<textarea rows="4" nz-input [(ngModel)]="item.sentence" (blur)="save()"></textarea>
<span style="font-size: 20px;">故事梗概: </span>
<textarea rows="4" nz-input [(ngModel)]="item.story" (blur)="save()"></textarea>
</div> </div>
<div class="border" style="width: 1000px;"> <div class="border" style="width: 1000px;">
......
...@@ -15,6 +15,10 @@ export class FormComponent extends ComponentBase implements OnInit, OnChanges, O ...@@ -15,6 +15,10 @@ export class FormComponent extends ComponentBase implements OnInit, OnChanges, O
// 储存对象 // 储存对象
item: any = { item: any = {
title: '', title: '',
teacher_avatar: '',
word: '',
sentence: '',
store: '',
pages: [], pages: [],
}; };
......
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