圆月山庄资源网 Design By www.vgjia.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>
标签:
Angular折叠展开,ionic3展开,收缩

圆月山庄资源网 Design By www.vgjia.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
圆月山庄资源网 Design By www.vgjia.com