Commit 74f48a1e authored by limingzhe's avatar limingzhe

fix: debug

parent 4fc4b182
<div style="margin: 30px;">
<div style="margin: 30px; display: flex; align-items: center; ">
<h3>大标题:</h3>
<input type="text" nz-input [(ngModel)]="item.title" (blur)="save()" style=" width: 350px;">
</div>
<div *ngIf="item && item.quesArr">
<div *ngFor="let ques of item.quesArr; let i = index"
style="border: 2px #ccc solid; border-radius: 15px; width: 1000px; padding: 30px; margin: 30px;">
......@@ -33,7 +39,19 @@
(imageUploaded)="onItemImgUploadSuccess($event, ques, 'pic_url')">
</app-upload-image-with-preview>
</div>
<button style="float: right;" nz-button nzType="" (click)="onDeletaImg(ques, 'pic_url')">
<button *ngIf="ques.pic_url" style="float: right;" nz-button nzType="" (click)="onDeletaImg(ques, 'pic_url')">
x
</button>
</div>
<div style="margin-top: 10px; display: flex; ">
<span style="">视频:</span>
<div style="width: 300px;">
<app-upload-video [videoUrl]="ques.video_url"
(videoUploaded)="onVideoUploadSuccess($event, ques, 'video_url')">
</app-upload-video>
</div>
<button *ngIf="ques.video_url" style="float: right;" nz-button nzType="" (click)="onDeletaImg(ques, 'video_url')">
x
</button>
</div>
......@@ -99,7 +117,7 @@
(imageUploaded)="onItemImgUploadSuccess($event, option, 'pic_url')">
</app-upload-image-with-preview>
</div>
<button style="float: right;" nz-button nzType="" (click)="onDeletaImg(option, 'pic_url')">
<button *ngIf="option.pic_url" style="float: right;" nz-button nzType="" (click)="onDeletaImg(option, 'pic_url')">
x
</button>
</div>
......
......@@ -599,9 +599,9 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
this.save();
}
onVideoUploadSuccess(e) {
onVideoUploadSuccess(e, item, key) {
console.log('e: ', e);
this.item.video_url = e.url;
item[key] = e.url;
this.save();
}
......
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