<ng-content></ng-content><ng-container *ngIf="mode==='image'"><div class="nb-uploader-image"><ul *ngIf="files.length" class="image-list"><li *ngFor="let file of files" class="image-item"><div class="img-progress-start" [class.hidden]="file.state!=='uploading'"><span *ngIf="progressMode==='text'">{{ file.progress || '正在上传中' }}<label [class.hidden]="!file.progress">%</label> </span><span *ngIf="progressMode==='bar'"><nb-progress-bar [value]="file.progress"></nb-progress-bar></span><button type="button" nb-button theme="default" (click)="onCancelFile(file)">取消</button></div><div class="img-progress-error" [class.hidden]="file.state!=='error'"><span class="progress-error-msg">{{ uploadFailedMessage }}</span> <button type="button" nb-button theme="default" (click)="onReuploadFile(file)">重试</button> <i class="iconfont icon-close" title="Close" (click)="onRemoveFile(file)"></i></div><div class="img-progress-finish" [class.hidden]="file.state!=='success'"><span class="photo_bigger_mark"><img [src]="file.url"></span><div class="photo-control"><label for="fileInput" class="edit_mark" (click)="onReplaceFile(file)">重新上传</label> <i class="iconfont icon-close" title="Close" (click)="onRemoveFile(file)"></i></div></div></li></ul><div class="image-add" *ngIf="!disabled"><span class="image-add-icon">+</span> <input id="fileInput" (change)="onFileSelect($event)" #uploadInput type="file" multiple="multiple" name="myFile" class="fileinput" accept="{{ accept }}"></div><ul class="nb-uploader-msg"><li *ngFor="let msg of msgs"><span class="ui-messages-summary">{{ msg.message }}</span></li></ul></div></ng-container><ng-container *ngIf="mode==='file'"><div class="nb-uploader-file"><div class="file-add" [class.file-add-disabled]="disabled"><button type="button" nb-button theme="default" [disabled]="disabled"><i class="fa fa-upload"></i> 文件上传</button> <input (change)="onFileSelect($event)" #uploadInput type="file" multiple="multiple" name="myFile" class="fileinput" accept="{{ accept }}"></div><ul class="nb-uploader-msg"><li *ngFor="let msg of msgs"><span class="ui-messages-summary">{{ msg.message }}</span></li></ul><ul *ngIf="files.length" class="file-list"><li *ngFor="let file of files" class="file-item"><div class="file-progress-start" [class.hidden]="file.state!=='uploading'"><div *ngIf="progressMode==='text'">{{ file.progress || '正在上传中' }}<label [class.hidden]="!file.progress">%</label></div><div *ngIf="progressMode==='bar'" class="file-progress-bar"><nb-progress-bar [value]="file.progress"></nb-progress-bar></div><i class="iconfont icon-close" title="Close" (click)="onCancelFile(file)"></i></div><div class="file-progress-error" [class.hidden]="file.state!=='error'"><span class="iconfont icon-paperclip"></span> <span class="file-name" title="{{ file.name }}">{{ file.name }}</span> <span class="progress-error-msg">上传失败</span> <span class="progress-error-reupload" (click)="onReuploadFile(file)"><i class="iconfont icon-redo"></i> 重试 </span><i class="iconfont icon-close" title="Close" (click)="onRemoveFile(file)"></i></div><div class="file-progress-finish" [class.hidden]="file.state!=='success'"><span class="iconfont icon-paperclip"></span> <span class="file-name" title="{{ file.name }}">{{ file.name }}</span> <i class="iconfont icon-close" title="Close" (click)="onRemoveFile(file)"></i></div></li></ul></div></ng-container>