Security News
Bun 1.2 Released with 90% Node.js Compatibility and Built-in S3 Object Support
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
rax-gesture-view
Advanced tools
Web / Weex / 小程序
描述: 手势组件,监听组件内触发的横向或纵向滑动,并触发相应事件。
$ npm install rax-gesture-view --save
注: 1、支持列表中的 代表h5 代表weex 代表小程序
属性 | 类型 | 默认值 | ** [必填] ** | 描述 | ** [支持] ** |
---|---|---|---|---|---|
onHorizontalPan | function | - | 节点被点击之后触发 | ||
onVerticalPan | function | - | 长按式触发 |
/** @jsx createElement */
import {createElement, Component, render} from 'rax';
import GestureView from '../src/index';
import View from 'rax-view';
import { isWeex } from 'universal-env';
import * as DriverDOM from 'driver-dom';
import * as DriverWeex from 'driver-weex';
class App extends Component {
onHorizontalPan = (e) => {
console.error('onHorizontalPan:' + e.state);
}
onVerticalPan = (e) => {
console.error('onVerticalPan:' + e.state);
}
render() {
return (<View style={{flex: 1}}>
<GestureView style={{width: 300, height: 300, backgroundColor: 'red'}}
onVerticalPan={this.onVerticalPan}
onHorizontalPan={this.onHorizontalPan}
>pan me</GestureView>
</View>);
}
}
render(<App />, document.body, { driver: isWeex ? DriverWeex : DriverDOM });
FAQs
Gesture component for Rax.
The npm package rax-gesture-view receives a total of 6 weekly downloads. As such, rax-gesture-view popularity was classified as not popular.
We found that rax-gesture-view demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 7 open source maintainers 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
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
Security News
Biden's executive order pushes for AI-driven cybersecurity, software supply chain transparency, and stronger protections for federal and open source systems.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.