• 动画消除”保存的页面“


    html

    <view class="content">

      <block wx:for="{{list}}" wx:key="{{index}}">

        <view animation="{{item.value.animation}} class="list">

        <view class="title" bindtap="onLoadNews" data-key="{{item.key}}"

      {{item.value.title}}

    </view>

    js

    page ({

      data:{  

        list:[]

    }

    //监听显示

    onshow:function() {

      var animation=wx.createAnimation({

        duration:1000,

          timingFunction:"ease".

          this.animation=animation

     js

    onFavorite:function(e){

      var that=this,

        key=e.currentTarget.dataset.key

        value=e.currentTarget.dataset.value

        data=that.data.list

        this.animation.opacity(0).step();

        var animation=this.animation.export();

        var arrayTmp=[];

        hotapp.post(key.value.function(res){

          console.log(e.currentTarget.dataset.key);

        var newdata=data.map{function(item){

          if (item.key==key){

        item value.animation=animation;

        }else{

          that.animation.opacity(1).step();

          item.value.animation=that.animation.export();

        arrayTmp.push(item);

      }

        return item;

    });

        this.setData({list:newdata});

        setTimeout(function(){

        that.setData({list:arrayTmp});

        wx.showToast({

          title:"成功“,

          },

        icon:'success',

        duration:2000

        })

      },1200);

    })

        

  • 相关阅读:
    顺序表的C语言实现
    Nginx模块开发(5)————开发简单的HTTP过滤模块
    python集合(set)
    python——封装、解构
    python——杨辉三角
    python——bytes、bytearray
    python算法——求10万以内的质数
    python算法——打印菱形、对等三角、闪电
    python字符串操作
    python—冒泡排序
  • 原文地址:https://www.cnblogs.com/aivnfjgj/p/6363647.html
Copyright © 2020-2023  润新知