zoukankan      html  css  js  c++  java
  • 动画消除”保存的页面“

    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);

    })

        

  • 相关阅读:
    vue开发(一)安装
    Ubuntu18.04安装mysql
    使用.NET Framework开发IIS 7.0模块和处理程序拦截请求实现跳转
    Mysql 清空数据后,释放硬盘文件
    依赖注入
    ubuntu 上开发.netcore
    使用python获取微医数据
    Mysql查询某字段重复值并删除重复值
    使用pyinstaller 打包python程序
    堆(heap)和栈(stack)、内存泄漏(memory leak)和内存溢出
  • 原文地址:https://www.cnblogs.com/aivnfjgj/p/6363647.html
Copyright © 2011-2022 走看看