
Security News
ECMAScript 2025 Finalized with Iterator Helpers, Set Methods, RegExp.escape, and More
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
@gystt/ysutils
Advanced tools
这是一个基于react写的一个移动端项目的一些方法 # 二、方法介绍 ### 1、advancedSliding(event,slideObj) #### 1.1方法简介: 该方法可以给标签添加滑动事件(向上滑动,向下滑动,向左滑动,向右滑动),并执行传入的回调函数 #### 1.2参数介绍: event:需要添加滑动事件的标签 slideObj:是一个滑动事件的对象 { top:需要一个函数是上滑的回调 bottom:需要一个函数是下滑的回
这是一个基于react写的一个移动端项目的一些方法
该方法可以给标签添加滑动事件(向上滑动,向下滑动,向左滑动,向右滑动),并执行传入的回调函数
event:需要添加滑动事件的标签
slideObj:是一个滑动事件的对象
{
top:需要一个函数是上滑的回调
bottom:需要一个函数是下滑的回调
left:需要一个函数是左滑的回调
right:需要一个函数是右滑的回调
slde:需要一个数字,滑动多少距离触发滑动事件(默认是30)
}
// import React, { Component, createRef } from 'react'
// import { advancedSliding } from '@gystt/ysutils'
// export default class App extends Component {
// divRef = createRef(null)
// top = () => {
// console.log("上滑事件");
// }
// bottom = () => {
// console.log("下滑事件");
// }
// componentDidMount() {
// advancedSliding(this.divRef, { top: this.top, bottom: this.bottom })
// }
// render() {
// return (
// <div ref={this.divRef}>
// </div>
// )
// }
// }
FAQs
这是一个基于react写的一个移动端项目的一些方法 # 二、方法介绍 ### 1、advancedSliding(event,slideObj) #### 1.1方法简介: 该方法可以给标签添加滑动事件(向上滑动,向下滑动,向左滑动,向右滑动),并执行传入的回调函数 #### 1.2参数介绍: event:需要添加滑动事件的标签 slideObj:是一个滑动事件的对象 { top:需要一个函数是上滑的回调 bottom:需要一个函数是下滑的回
The npm package @gystt/ysutils receives a total of 2 weekly downloads. As such, @gystt/ysutils popularity was classified as not popular.
We found that @gystt/ysutils demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
Security News
A new Node.js homepage button linking to paid support for EOL versions has sparked a heated discussion among contributors and the wider community.
Research
North Korean threat actors linked to the Contagious Interview campaign return with 35 new malicious npm packages using a stealthy multi-stage malware loader.