如何在Angular中移除索引
如何在Angular中移除索引
如何按照索引值进行删除,我有一个参数和删除按钮,我尝试将我的参数放到删除按钮中,但它不起作用,如何修复?
deleteRowFiles(rowIndex: number){ this.getListFileName(); if(this.uploadAttachments.length > 1){ Swal.fire({ title: 'Are you sure?', text: 'You will not be able to recover this data!', icon: 'error', showCancelButton: true, confirmButtonText: 'Confirm', cancelButtonText: 'Cancel' }).then((result) => { if(result.value){ this.uploadAttachments.removeAt(rowIndex); this.microSvc.deleteFile(this.iData.transactionType,this.uploadedFiles).pipe( return this.refreshPage(); }) }else if (result.dismiss === Swal.DismissReason.cancel){} }) }
HTML
admin 更改状态以发布 2023年5月21日