Commit fc2ae412 authored by 李维's avatar 李维

New delete audio button

parent 10d1ee3d
...@@ -33,8 +33,9 @@ ...@@ -33,8 +33,9 @@
<div *ngIf="audioUrl && needRemove; then truthyTemplate else falsyTemplate"></div> <div *ngIf="audioUrl && needRemove; then truthyTemplate else falsyTemplate"></div>
<ng-template #truthyTemplate > <ng-template #truthyTemplate >
<div class="btn-delete" (click)="onBtnDeleteAudio()"> <div class="btn-delete" (click)="onBtnDeleteAudio()">
<i nz-icon nzType="delete" nzTheme="outline"></i> <fa-icon icon="close"></fa-icon>
</div> </div>
</ng-template> </ng-template>
......
...@@ -145,14 +145,11 @@ export class AudioRecorderComponent implements OnInit, OnChanges, OnDestroy { ...@@ -145,14 +145,11 @@ export class AudioRecorderComponent implements OnInit, OnChanges, OnDestroy {
// 开始录音 // 开始录音
onBtnRecord = () => { onBtnRecord = () => {
} }
// 切换模式 // 切换模式
onBtnSwitchType() { onBtnSwitchType() {
} }
onBtnClearAudio() { onBtnClearAudio() {
this.audioUrl = null; this.audioUrl = null;
this.audioRemoved.emit(); this.audioRemoved.emit();
......
...@@ -18,8 +18,15 @@ ...@@ -18,8 +18,15 @@
<span>音频</span> <span>音频</span>
</div> </div>
<div style="flex:11"> <div style="flex:11">
<app-audio-recorder [audioUrl]="item.audio_url1" (audioUploaded)="onAudioUploadSuccessByItem($event, item, 'audio_url1')" :needRemove="true" (audioRemoved)="onAudioDeleteByItem($event, item, 'audio_url1')" ></app-audio-recorder> <div style="float: left;">
</div> <app-audio-recorder [audioUrl]="item.audio_url1" (audioUploaded)="onAudioUploadSuccessByItem($event, item, 'audio_url1')"></app-audio-recorder>
</div>
<div style="float: left; margin-left: 20px;">
<button nz-button nzType="danger" [disabled]="!item.audio_url1" (click)="onAudioDeleteByItem($event, item, 'audio_url1')">
清除音频
</button>
</div>
</div>
</div> </div>
</div> </div>
</div> </div>
......
/* You can add global styles to this file, and also import other style files */ /* You can add global styles to this file, and also import other style files */
@import "~ng-zorro-antd/ng-zorro-antd.min.css";
\ 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