Commit 66cc63e3 authored by Chen Jiping's avatar Chen Jiping

完善

parent a7b02fb0
...@@ -43,6 +43,7 @@ ...@@ -43,6 +43,7 @@
<tr> <tr>
<th>序号</th> <th>序号</th>
<th>备选答案</th> <th>备选答案</th>
<th>备选答案(图片)</th>
<th>是否正确</th> <th>是否正确</th>
<th>操作</th> <th>操作</th>
</tr> </tr>
...@@ -51,6 +52,13 @@ ...@@ -51,6 +52,13 @@
<tr *ngFor="let data of it.answers;let j = index"> <tr *ngFor="let data of it.answers;let j = index">
<td>{{j+1}}</td> <td>{{j+1}}</td>
<td><input type="text" nz-input placeholder="请录入备选答案" [(ngModel)]="data.val" (blur)="save()"></td> <td><input type="text" nz-input placeholder="请录入备选答案" [(ngModel)]="data.val" (blur)="save()"></td>
<td>
<app-upload-image-with-preview
style="width: 100%"
[picUrl]="data.pic_url"
(imageUploaded)="onImageUploadSuccess($event, data, 'pic_url')"
></app-upload-image-with-preview>
</td>
<td> <td>
<nz-select [(ngModel)]="data.correct" nzAllowClear nzPlaceHolder="请选择" (ngModelChange)="save()"> <nz-select [(ngModel)]="data.correct" nzAllowClear nzPlaceHolder="请选择" (ngModelChange)="save()">
<nz-option nzValue="0" nzLabel="否"></nz-option> <nz-option nzValue="0" nzLabel="否"></nz-option>
......
...@@ -62,9 +62,9 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy { ...@@ -62,9 +62,9 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
* 储存图片数据 * 储存图片数据
* @param e * @param e
*/ */
onImageUploadSuccess(e, key) { onImageUploadSuccess(e, item, key) {
this.item[key] = e.url; item[key] = e.url;
this.save(); this.save();
} }
...@@ -159,6 +159,7 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy { ...@@ -159,6 +159,7 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
getDefaultAnswerItem(){ getDefaultAnswerItem(){
let answer = { let answer = {
val:"", val:"",
pic_url:"",
correct:'0' correct:'0'
} }
......
This diff is collapsed.
...@@ -23,7 +23,8 @@ const res = [ ...@@ -23,7 +23,8 @@ const res = [
['play', "assets/play/play.png"], ['play', "assets/play/play.png"],
['playing', "assets/play/playing.png"], ['playing', "assets/play/playing.png"],
['start', "assets/play/start.png"] ['start', "assets/play/start.png"],
['restart', "assets/play/restart.png"]
]; ];
......
src/assets/play/play.png

17.2 KB | W: | H:

src/assets/play/play.png

21.5 KB | W: | H:

src/assets/play/play.png
src/assets/play/play.png
src/assets/play/play.png
src/assets/play/play.png
  • 2-up
  • Swipe
  • Onion skin
src/assets/play/playing.png

17.7 KB | W: | H:

src/assets/play/playing.png

22.2 KB | W: | H:

src/assets/play/playing.png
src/assets/play/playing.png
src/assets/play/playing.png
src/assets/play/playing.png
  • 2-up
  • Swipe
  • Onion skin
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