2016-02-23 47 views
0

離子向左滑動工作不與項目圖標向右離子向左滑動不與項目圖標向右

Plunker showing the behavior

我遇到一些容易混淆的行爲工作。使用離子列表和離子項目,我將設置屬性以啓用滑動。

<ion-list can-swipe="true"> 
 
    <ion-item ng-repeat="element in ctrl.data" class="item-remove-animate item-icon-right"> 
 
    <span>{{ element }}</span> 
 
    <span class="item-note">Date</span> 
 
    <i class="icon ion-chatbubble-working"></i> 
 
    <ion-option-button class="button-assertive icon ion-trash-a" ng-click="ctrl.delete($index) "> 
 
    </ion-option-button> 
 
    </ion-item> 
 
</ion-list>

然而,有我快成

  1. 兩個問題刪除動畫沒有以往任何時候都似乎工作

  2. 如果設置「本期特價貨品圖標右側「,然後滑動完全消失。如果我在該類中添加「i」標籤,則可以滑動。

有誰知道爲什麼會發生這種情況?我是CSS和離子的新手,所以在調試時知道要查找什麼有點困難。

如果你能告訴我你的思維過程,或指向相關的文章進行調試這些意外的行爲,我會很感激

回答

0

刪除動畫,似乎集合重複不添加「NG-離開「由於表現受到打擊,上課。 (ref)

對於滑動左邊的錯誤,我不得不從離子選項類中刪除「圖標」。

0

這裏樣張希望這有助於你

<ion-list class"animate-ripple" show-delete="false" can-swipe="true" swipe-direction="both"> 
     <ion-item ng-show="orders_list.length==0"> 
      <h2>No orders, Please go to Menu and Select Create a Order</h2> 
     </ion-item> 
     <ion-item item="order" 
        ng-repeat="order in orders_list | custom:filterOrder" 
        class="item-text-wrap" > 
      <a class="item item-icon-right" style=" border:none; text-align:left" 
      ng-click="showOrdersDetail(order.order_id)"> 
       <i class="icon ion-chevron-right"></i> 
       <h2>Order No. {{order.order_id}}</h2> 
       <h5>TOTAL:{{order.total_pagar}}</h5> 
       <h5>ITEMS:{{order.total_items}}</h5> 
      </a> 
      <div ng-if="filterOrder.tipo_estado === 'ACT'"> 
       <ion-option-button class="button-assertive" ng-click="del_order(order,{{$index}});"> 
        Del 
       </ion-option-button> 
       <ion-option-button class="button-balanced" ng-click="pay_order(order);"> 
        Pay 
       </ion-option-button> 
      </div> 
      <div ng-if="filterOrder.tipo_estado === 'PAG'"> 
       <ion-option-button class="button-balanced" ng-click="showLinceseList(order.order_id);"> 
        Apply a<br> License 
       </ion-option-button> 
      </div> 
      </ion-item> 
    </ion-list>