微信小程序 功能函数 touch触摸计时
2024-10-19 01:20:12
shiFN:function(e){
// touchstart
// touchend
let that=this;
let n=0;
// 判断是开始还是结束的参数
let textTure = e.type;
that.setData({
textTure: textTure
})
if (textTure =='touchstart'){
let lovetime = setInterval(function () {
n += 0.5;
if (that.data.textTure=='touchend') {
clearInterval(lovetime);
}
console.log(n);
that.setData({
bian: n
})
}, 500)
}
},
<view class='bt-item' bindtouchend='shiFN' bindtouchstart='shiFN'></view>
最新文章
- Sublime 3 如何设置xftp 排除文件夹“bower_components”,“node_modules”
- sqlite学习
- [Asp.net 5] DependencyInjection项目代码分析4-微软的实现(2)
- 【leetcode】Search in Rotated Sorted Array
- two sum - leetcode
- Redis常用方法
- js获取当前url信息
- $(function(){})与$(document).ready(function(){})
- spring3.0的jar包详解
- PL/SQL Developer下设置“长SQL自己主动换行”
- 使用JS的FormData对象
- mysql获取当前时间,前一天,后一天
- Javascript模版引擎mustache.js简介
- Windows Server 2016-Powershell管理站点复制
- MySQL事务,事务隔离级别详解
- python django基础四 ORM简介
- [PHP] 算法-二位有序数组中查找的PHP实现
- 使用rsync 同步数据一些常用参数和示例
- ASP入门(二)-创建Access数据库
- 反射已经";Out";,动态编译才能";Hold";住