zoukankan      html  css  js  c++  java
  • 微信小程序--动画animation

    js:
    list:[],
    contentflag:false
     
    this.animation = wx.createAnimation({
    duration: 500,
    timingFunction: 'linear',
    })
     
    //
    var systemInfo = wx.getSystemInfoSync();
    var px = systemInfo.windowWidth;
    this.animation.translateX(-px).step()
    this.setData({
      animation: this.animation.export()
    });
     
    //下拉刷新
    bottomhd() {
      var _this = this;
      //调接口
    },
    //获取失败
    err() {
      var _this = this;
      var systemInfo = wx.getSystemInfoSync();
      var px = systemInfo.windowWidth;
      this.animation.translateX(px).step();
      _this.setData({
        animation: this.animation.export(),
      })
    },
     
    if (res.data.data.list.length < 10) {
      _this.setData({
        contentflag: true
      });
    }
     
    var id = e.currentTarget.dataset.id;
     
    wxml:
    <view  animation="{{animation}}">
      <scroll-view scroll-y class='brandcontent' bindscrolltolower="bottomhd">
        <view wx:for="{{list}}" wx:for-index="index" wx:for-item="item" data-id="{{item.code}}" data-name="{{item.name}}" bindtap='getid'>{{item.name}}</view>
        <view wx:if="{{contentflag}}">已经到底了</view>
      </scroll-view>
    </view>
  • 相关阅读:
    C语言内存分析
    算法之快速排序
    单链表逆转
    C程序设计语言之一
    vim插件配置(一)
    makefile示例
    cocos2d基础入门
    Makefile
    Makefile
    GCC编译四阶段
  • 原文地址:https://www.cnblogs.com/Super-scarlett/p/10309411.html
Copyright © 2011-2022 走看看