0.0.4 • Published 4 years ago

finger.taro v0.0.4

Weekly downloads
3
License
MIT
Repository
github
Last release
4 years ago

web手势库,基于AlloyFinger的 Taro 库,可以快速帮助你的 web 程序增加手势支持,也不用再担心 click 300ms 的延迟了;

安装

  
  npm install finger.taro -S
  
  yarn add finger.taro -S

API

props

参数说明类型默认值
onLeft向左滑动回调函数function-
onRight向右滑动的回调函数function-

未添加的功能

参数说明类型默认值
pinch缩放回调函数function-
rotate旋转回调函数function-
pressMove拖拽回调函数function-
swipe滑动回调函数function-
longTap长按回调函数function-
singleTap单击回调函数function-
doubleTap双击回调函数function-

使用

使用的文件

  
  import Finger from 'finger.taro'

  const App = () => (
    <>
      <FingeTaro
        onRightFn={() => fn()}
        onLeft={()=>fn()}
      >
        ....
      <FingeTaro />
    </>
  );

修改 config/index.js

  const config = {
    ...
    h5: {
      ...
      esnextModules: ['finger.taro'],
    },
  }

注意事项

使用前请确保项目中已经安装了Taro相关的库,主要有如下:

  • @tarojs/taro

  • nervjs

  • @tarojs/components

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago