快活林资源网 Design By www.csstdc.com

1,html中

 <ion-item>
  <div class="middle-content-order">
   <div class="middle-order-icon">
    <ion-icon name="chevron-up-outline" class="up-gray" item-right *ngIf="!isShow" (click)="isShow=!isShow">
    </ion-icon>
    <ion-icon name="chevron-down-outline" class="down-gray" item-right *ngIf="isShow" (click)="isShow=!isShow">
    </ion-icon>
   </div>
   <div class="middle-order-title"><span>复印纸</span></div>
   <div class="middle-order-null"></div>
   <div class="middle-order-detail"><span>查看全部</span></div>
 </div>
 </ion-item>
  <ion-list *ngIf="!isShow">
   <div class="order-alert">
    <div class='item-small'>
    <span> A3复印纸</span>
    </div>
    <div class='item-small'>
     <span> A3复印纸</span>
    </div>
    <div class='item-small'>
     <span> A3复印纸</span>
    </div>

    <div class='item-small'>
     <span> A3复印纸</span>
    </div>
    <div class='item-small'>
     <span> A3复印纸</span>
    </div>
    <div class='item-small'>
     <span> A3复印纸</span>
    </div>
    
   </div>
  </ion-list>

效果图

Angular+ionic实现折叠展开效果的示例代码

下面看下ionic3 模拟下拉 展开/收缩效果

Angular+ionic实现折叠展开效果的示例代码

<ion-header>
 <ion-navbar>
 <ion-title>user</ion-title>
 </ion-navbar>
</ion-header>
<ion-content>
 
<ion-item>
 用户信息
<ion-icon name="ios-arrow-down" item-right *ngIf="isShow" (click)="isShow=!isShow"></ion-icon>
<ion-icon name="ios-arrow-forward" item-right *ngIf="!isShow" (click)="isShow=!isShow"></ion-icon>
 </ion-item>
 <ion-list *ngIf="isShow">
  <ion-item *ngFor="let item of items" >
   姓名:{{item.name}} 年龄:{{item.age}}
  </ion-item>
 </ion-list>
</ion-content>
快活林资源网 Design By www.csstdc.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
快活林资源网 Design By www.csstdc.com