vue中连续点击3次且时间间隔不超过3秒,才显示div(刚开始隐藏的)
num:0,//点击次数
timer0:'',//第一次点击的时间
timer4:'',//第四次点击的时间
centerDialogVisible: false
// 连续4次点击显示模态框
changeAccount(){
this.num++
if(this.num==1){
this.timer0=new Date().getTime()/1000
}
if(this.num==4){
this.timer4= new Date().getTime()/1000
if(this.timer4-this.timer0<=3){
// this.isShow=!this.isShow
this.num=0
this.centerDialogVisible=true
}else {
this.num=0
}
}
}, *****************************************************************
vue中连续点击3次且时间间隔不超过3秒,才显示div(刚开始隐藏的)的更多相关文章
- html中连续点击某个标签会出现蓝色的解决方法
给标签加上下面的属性就可以了,也可以把这些属性建立一个class名,谁需要的时候加上也ok -moz-user-select: none; /*mozilar*/ -webkit-user-selec ...
- vue中的锚链接跳转问题
在vue中的锚链接和普通的html不同,关于vue中的锚链接可以参考vue 中的 scrollBehavior 滚动行为. 在router.js中 //创建 router 实例 const rout ...
- Vue中的动画效果
Vue 在插入.更新或者移除 DOM 时,提供多种不同方式的应用过渡效果.包括以下工具: 在 CSS 过渡和动画中自动应用 class 可以配合使用第三方 CSS 动画库,如 Animate.css ...
- Vue中观察者模式的实现
Vue中实现观察者模式的方法可以有三种: 1.v-on方法 exp: <div id='test'> <button v-on:event='functionName'>but ...
- vue中的js引入图片,必须require进来
需求:如何components里面的index.vue怎样能把assets里面的图片拿出来. 1.在img标签里面直接写上路径: <img src="../assets/a1.png& ...
- Vue中利用$emit实现子组件向父组件通信
Vue中利用$emit实现子组件向父组件通信 父组件 <template> <div> <p>我是父组件</p> <child :isShow=& ...
- vue中的js引入图片,使用require相关问题
vue中的js引入图片,必须require进来 或者引用网络地址 <template> <div class="home"> <img alt=&qu ...
- vue项目引入FastClick组件解决IOS系统下h5页面中的按钮点击延迟,连续点击无反应的问题
异常描述: ios系统手机中访问h5页面,按钮点击有延迟,连续点击卡顿.无反应. 异常原因: 这要追溯至 2007 年初.苹果公司在发布首款 iPhone 前夕,遇到一个问题:当时的网站都是为大屏幕设 ...
- jquery动画效果中,避免持续反应用户的连续点击
一.某些动画效果中,避免持续连续反应用户的连续点击(这标题真不好描述) 意思就是指用户点击速度很快,完成一次效果的时间不能很快结束的话,就会出现用户不点击了,效果还在持续.看下面例子就明白了,手风琴效 ...
随机推荐
- hive中的几个参数:元数据配置、仓库位置、打印表字段相关参数
hive仓库位置由以下参数决定,默认位置/user/hive/warehouse: <property> <name>hive.metastore.wareho ...
- C和C指针小记(七)-整型变量范围
1.变量范围 limits.h 头文件中定义来C 语言的变量范围. 变量范围的限制 //char 的范围 printf("CHAR_BIT:%d CHAR_MIN:%d CHAR_MAX:% ...
- arcgis10.4 server第一次发布地图报错:We were unable to connect to...Error:Proxy server got bad address...
arcgis 10.4发布地图跟10.2不一样.server url里的http要改为https,否则就会连接不上.
- In abstract algebra, a congruence relation (or simply congruence) is an equivalence relation on an algebraic structure (such as a group, ring, or vector space) that is compatible with the structure in
https://en.wikipedia.org/wiki/Congruence_relation In abstract algebra, a congruence relation (or sim ...
- 适配ipad Pro
买了个新款ipad pro 11寸的,发现我们的ipad项目. 上下左右都有黑边 使用info.plist设置启动图,不用asset和launch storyboard 图片用如下格式命名,拖到项目中 ...
- 20165317Java实验三敏捷开发与XP实践
实验三 敏捷开发与XP实践实验报告 实验目的 安装 alibaba 插件,解决代码中的规范问题.再研究一下Code菜单,找出一项让自己感觉最好用的功能. 在码云上把自己的学习搭档加入自己的项目中,确认 ...
- LeetCode 561 Array Partition I 解题报告
题目要求 Given an array of 2n integers, your task is to group these integers into n pairs of integer, sa ...
- SQL DATE_FORMAT() 函数
参照原文:https://blog.csdn.net/moakun/article/details/82290387 DATE_FORMAT() 函数用于以不同的格式显示日期/时间数据 MySQL 使 ...
- 【pyqtgraph绘图】Qt速成课程
解读官方API-Qt速成课程 参考:http://www.pyqtgraph.org/documentation/qtcrashcourse.html Qt速成课程 PyQtGraph广泛使用Qt来生 ...
- centos7.2 mysql5.5编译安装
环境 centos7.2 源码包mysql5.5.38 mysql5.5开始,源码配置编译工具configure变成了cmake,所以先要去把cmake装上.并安装make,bison,cmake,g ...