我正在使用角度来插入和预览图像,但是我想在拖动图像时在拖放区中添加一种颜色..有人知道我该怎么实现吗?
HTML
<div cdkDropList (cdkDropListDropped)="drop($event)">
<div class="drop" [style.border-width.px]="urls.length > 0 ? 0: 3">
<div class="cont" *ngIf="urls.length === 0">
<div class="browse" >
Upload
</div>
</div>
<div class="abc" *ngIf="urls.length > 0">
<img [src]="urls[0]" cdkDrag><span class="delete" style="cursor: pointer;" (click)="deleteImage(urls[0])">X</span>
</div>
<input type="file" id="files" multiple (change)="detectFiles($event)" accept="image/*">
</div>
</div>