• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

小程序动画Animation,高度增加动画形式,图标旋转动画形式

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

<view class="serach-title serach-list"  animation="{{animatheightadd}}" >
<i-row class="serach-top">
<i-col span="12" i-class="serach-titleLeft">航空汽油<i-icon type="collection_fill" size="15" color="#FFCB68"/></i-col>
<i-col span="12" i-class="serach-titleRight">3175.38</i-col>
</i-row>
<i-row class="source">
<i-col span="12" i-class="source-word">来源: 英国环境、食品及农村事务部 (DEFRA)(2016) - 范畴一</i-col>
<i-col span="12" i-class="source-value">kgCO2/t<i-icon type="playon_fill" class="menuclick"
data-show="{{isdown}}"  size="12" color="#62B0F2"
bindtap="menuclick" animation="{{animationData}}"/></i-col>
</i-row>
<i-row class="data-list">
<i-col span="12" i-class="data-listLeft word1">3127.67</i-col>
<i-col span="12" i-class="data-listRight word1">kgCO2/t</i-col>
</i-row>
<i-row class="data-list">
<i-col span="12" i-class="data-listLeft word2">3127.67</i-col>
<i-col span="12" i-class="data-listRight word2">kgCO2/t</i-col>
</i-row>
<i-row class="data-list">
<i-col span="12" i-class="data-listLeft word3">3127.67</i-col>
<i-col span="12" i-class="data-listRight word3">kgCO2/t</i-col>
</i-row>
</view>

menuclick(e){
var that=this;
var is=e.currentTarget.dataset.show
var animation = wx.createAnimation({
duration: 500,
timingFunction: "ease",
delay: 0,
transformOrigin: "50% 50%",
})
var animatheightadd = wx.createAnimation({
duration: 500,
timingFunction: 'ease-in',
})
if(that.data.isdown==false){
animation.rotate(90).step();
animatheightadd.height(200).step()
that.setData({
isdown:true,
animationData: animation.export(),
animatheightadd: animatheightadd.export(),
})
}else{
animation.rotate(0).step();
animatheightadd.height(75).step()
that.setData({
isdown:false,
animationData: animation.export(),
animatheightadd: animatheightadd.export(),
})
}
},

 

 

 


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
微信小程序自定义组件(stepper)发布时间:2022-07-22
下一篇:
微信小程序——navigator无法跳转发布时间:2022-07-22
热门推荐
    热门话题
    阅读排行榜

    扫描微信二维码

    查看手机版网站

    随时了解更新最新资讯

    139-2527-9053

    在线客服(服务时间 9:00~18:00)

    在线QQ客服
    地址:深圳市南山区西丽大学城创智工业园
    电邮:jeky_zhao#qq.com
    移动电话:139-2527-9053

    Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap