使ItemReorder中的整个离子项可拖动

Pho*_*log 5 draggable ionic-framework ionic3

在我的应用程序中,我有一个如文档中所述的ItemReorder:

<ion-list reorder="true">
  <ion-item *ngFor="let item of items">{{ item }}</ion-item>
</ion-list>
Run Code Online (Sandbox Code Playgroud)

它按预期工作,我可以ion-items通过指向reoder图标来拖动它(参见手绘圈): 在此输入图像描述

我发现平板电脑上的潜在用户正在测试,许多用户最初看不到图标和/或尝试拖动ion-item而不指向图标.他们希望整体ion-item可以拖延:

在此输入图像描述

我该如何实现呢?任何见解都表示赞赏!


我已经检查了两次文档,谷歌搜索并在离子论坛Ionic v1的这个插件找到了这个未解答的问题.我还在Github上扫描了代码但没有成功.

小智 0

        The ideea of this css solution is to have the reorder icon invisible above the zone which you want to reorder. I have changed the icons to be on the right side <ion-list side="start"  and I have changed the css like this 
Run Code Online (Sandbox Code Playgroud)

现在对我来说它正在发挥作用。

        ion-reorder{
            position: absolute;
            width: 22%;
            max-width: 100%;
            opacity: 0;
        }
Run Code Online (Sandbox Code Playgroud)

缺点是没有更多可见的重新排序图标。

  • 一般来说,当您给出答案时,解释为什么您的代码可以解决问题并包含一个简短的演示会很有帮助,您可以通过包含 Codepen 或 JSFiddle 来实现 (2认同)