【发布时间】:2021-01-18 05:41:20
【问题描述】:
我实现了一个三层文件夹结构,以类似于 Angular 项目中的分层级别,并尝试在此文件夹结构上实现拖放,以便在拖放时将它们合并到彼此上。
我尝试添加 HTML 拖放 API,但这无助于理想地合并拖放文件夹的内容。
<table class="table table-bordered table-striped">
<ng-container *ngFor="let content of contents">
<tr class="top-row">
<td class="parent"><i id="parentFolder" class="fa fa-folder-open"></i>{{content.title}}</td>
</tr>
<ng-container *ngFor="let subFolder of contents['subfolder']">
<tr class="object-row">
<td class="child"><i id="childFolder" class="fa fa-folder-open"></i>{{subFolder.title}}</td>
</tr>
<tr *ngFor="let product of subfolder['innerFolder']">
<td class="secondchild"><i class="fa fa-folder"></i>{{product.title}}</td>
</tr>
</ng-container>
</ng-container>
</table>
【问题讨论】:
标签: html jquery angular drag-and-drop