<van-grid :column-num="2" class="content" :border="false" >
  <van-grid-item class="box" v-for="(item2,index2) in list" :key="index2" >
    <div class="inner-box" v-if="!item2.isBack" @touchstart="touchstartevent(item2,index2)" @touchmove="touchmoveevent(item2,index2)" @touchend="touchendevent(item2,index2)" >
      <span>正面</span>
    </div>
    <div class="inner-box-back" @click.stop="deleteModel(item2,index2)" v-else>           <span>删除</span>     </div>
   </van-grid-item>
</van-grid>  
// 模板长按删除功能
touchstartevent(item,index){
  this.closeDeleteevent()//清除删除图标事件
  var self = this;
  this.timeoutEvent = 0;
  this.timeoutEvent = setTimeout(() => {
    self.enterLongevent(item,index);//长按执行的操作
  },1000)
},
enterLongevent(item,index){
  item.isBack = true;
  console.log("长按了呀")
},
touchmoveevent(item,index){
  console.log("移动了")
  clearTimeout(this.timeoutEvent)
  this.timeoutEvent = 0;
},
touchendevent(item,index){
  console.log("离开屏幕")
  clearTimeout(this.timeoutEvent)
  this.timeoutEvent = 0;
},
.inner-box{
  width: 100%;
  border-radius: 10px;
  border: 1px solid #f2f2f2;
  -webkit-touch-callout: none!important;
  -webkit-user-select: none!important;
  -moz-user-select:none;
  -ms-uese-select:none;
  user-select: none;
  animation: mymoveone 0.5s ease-in-out;
}
@keyframes mymoveone{
  from{
  opacity: 0;
    transform: rotateY(90deg);
  }
to{
  opacity: 1;
    transform: rotateY(0);
  }
}
.inner-box-back{
  width: 100%;
  height: 99px;
  animation: mymove 0.5s ease-in-out;
  border-radius: 10px;
  border: 1px solid #f2f2f2;
  background: fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  font-size: #333333;
}
@keyframes mymove{
  from{
    opacity: 0;
    transform: rotateY(-90deg);
  }
  to{
    opacity: 1;
    transform: rotateY(0);
  }
}

效果:

暂时无法显示

vue-多个卡片翻转动效的更多相关文章

  1. No.4 - 3D 空间的卡片翻转动效

    参考 ①张鑫旭http://www.zhangxinxu.com/wordpress/2012/09/css3-3d-transform-perspective-animate-transition/ ...

  2. 基于vue实现上下滑动翻页效果

    18年年底的时候,一直在做年度报告的H5页面,因为项目需要,需要实现上下滑动翻页,并且上滑的页面比正常页面的比例要缩小一定比例. 效果类似于http://www.17sucai.com/pins/de ...

  3. 转载 vue-awesome-swiper - 基于vue实现h5滑动翻页效果

    说到h5的翻页,很定第一时间想到的是swiper.但是我当时想到的却是,vue里边怎么用swiper?! 中国有句古话叫:天塌下来有个高的顶着. 在前端圈里,总有前仆后继的仁人志士相继挥洒着热汗(这里 ...

  4. pc端vue 滚动到底部翻页

    html: <div class="list" ref="scrollTopList"> <div class="listsmall ...

  5. [LeetCode] Card Flipping Game 翻卡片游戏

    On a table are N cards, with a positive integer printed on the front and back of each card (possibly ...

  6. Nuxt|Vue仿探探/陌陌卡片式滑动|vue仿Tinder拖拽翻牌效果

    探探/Tinder是一个很火的陌生人社交App,趁着国庆假期闲暇时间倒腾了个Nuxt.js项目,项目中有个模块模仿探探滑动切换界面效果.支持左右拖拽滑动like和no like及滑动回弹效果. 一览效 ...

  7. MVVM大比拼之vue.js源码精析

    VUE 源码分析 简介 Vue 是 MVVM 框架中的新贵,如果我没记错的话作者应该毕业不久,现在在google.vue 如作者自己所说,在api设计上受到了很多来自knockout.angularj ...

  8. vue.js源码精析

    MVVM大比拼之vue.js源码精析 VUE 源码分析 简介 Vue 是 MVVM 框架中的新贵,如果我没记错的话作者应该毕业不久,现在在google.vue 如作者自己所说,在api设计上受到了很多 ...

  9. javascript编程解决黑白卡片问题

    问题描述: 时间限制:1秒 空间限制:32768K 牛牛有n张卡片排成一个序列.每张卡片一面是黑色的,另一面是白色的.初始状态的时候有些卡片是黑色朝上,有些卡片是白色朝上.牛牛现在想要把一些卡片翻过来 ...

  10. jQuery中turn.js(翻页效果)学习笔记

    Turn.js是一个内置的jQuery翻页插件1 html中引入<script type="text/javascript" src="js/turn.js&quo ...

随机推荐

  1. EBS 常用sql

    1)查看请求挂在哪个状态下 SELECT fcpv.concurrent_program_name FROM fnd_request_groups frg, --请求组 fnd_request_gro ...

  2. 百题计划-3 codeforces 657div2 C. Choosing flowers 贪心+枚举+二分

    https://codeforces.com/contest/1379/problem/C 题意: 给m种花(a,b),从中取出n朵,每种花可以取0和无限朵,如果取出第i朵花的个数为c>0,则贡 ...

  3. TP5--路由

    路由定义采用\think\Route类,通常是在应用的路由配置文件application/route.php进行注册 use think\Route; //路由规则 // Route::rule('/ ...

  4. SICP 笔记:环境配置

    SICP 笔记:环境配置 记录学习<算机的程序的构造和解释>的笔记. 环境配置 SICP 里面使用的语言是一种 Lisp 的变体 Scheme. 使用 DrRacket 作为 IDE 来进 ...

  5. jjupyter notebook 修改存储位置和修改默认浏览器

    先jupyter notebook --generate-config 找到配置文件位置 打开这里的哪个文件 然后修改即可 1.修改默认打开目录找到 #c.NotebookApp.notebook_d ...

  6. 解决django中的跨域问题

    解决django中的跨域问题: Django项目中出现跨域问题,用第三方包django-cors-headers来解决跨域问题. 安装:pip install django-cors-headers; ...

  7. 记D365开发的最佳实践

    前端JS 不同的需求应该划分模块,以便日后修改,也是为了职责分离,模块分离,日后如果想分离到单独的JS文件里面也是比较方便: 对于公共的查询函数,应该做缓存,优先使用sessionStorage. 多 ...

  8. Finance财务软件(权限管理专题)

    我们支持按模块对用户授权 如上所示,我们对用户test进行授权.test登录系统后将看不到未授权的菜单:

  9. mac sourcetree required password

    coding   c85Ao 解决办法,用http拉取,使用命令行clone 每次push需要密码解决方法 sourcetree 不停的让输入密码,报 password required1.在终端(t ...

  10. Day 22 22.1.2:增量式爬虫 - 场景2的实现

    场景2的实现: 数据指纹 使用详情页的url充当数据指纹即可. 创建爬虫爬虫文件: cd project_name(进入项目目录) scrapy genspider 爬虫文件的名称(自定义一个名字即可 ...