1 回答

TA貢獻(xiàn)1799條經(jīng)驗(yàn) 獲得超9個(gè)贊
通過使用[sortablejsOptions]="options"我實(shí)現(xiàn)了我的功能。
<table id="id">
<tbody [sortablejs]="Array" [sortablejsOptions]="Array">
<tr *ngFor="let item of Array">
<td class="myRowClass sort-disabled">
<!-- index logic -->
</td>
<td>
<!--row logic -->
</td>
<td [sortablejs]="item.cols" [sortablejsOptions]="options">
<div *ngFor="let cell of item.cols; let j = index">
<!--column logic -->
</div>
</td>
</tr>
</tbody>
</table>
.ts 文件組名中的選項(xiàng)必須相同。
options: Options = {
group: { name: "test" }
}
添加回答
舉報(bào)