Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
280 views
in Technique[技术] by (71.8m points)

javascript - ngx可排序的自定义触发器(ngx-sortable custom trigger)

I have implemented ngx-sortable , and right now, the whole element is a trigger (draggable) , I need to sort an item.

(我已经实现了ngx-sortable ,现在,整个元素是一个触发器(可拖动),我需要对一个项目进行排序。)

eg I want to sort the items by using the grey handle on the left, and not the whole item itself:

(例如,我想使用左侧的灰色手柄而不是整个项目本身对项目进行排序:)

在此处输入图片说明

<ngx-sortable [items]="items" [listStyle]="listStyle" (listSorted)="listOrderChanged($event)">
    <ng-template let-item>
        <div class="categories-cont d-flex justify-content-between align-items-center">
            <div class="cont-drag-icon"><i class="icon icon-drag"></i></div>
            <div class="cont d-flex align-items-center w-100">
            <div class="cont-title w-100" i18n>{{item.name}}</div>
            <div class="cont-act" (click)="deleteItem(item)"><i class="icon icon-trash"></i></div>
            </div>
        </div>
    </ng-template>
</ngx-sortable>
  ask by Tanasos translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...