react-native-wheel-view-view
v0.1.0
Published
native wheel view
Readme
react-native-wheel-view
原生滚轮组件,安卓IOS均为原生实现
安卓使用WheelPicker
IOS使用系统组件
Installation
npm install cloud2303/react-native-wheel-viewUsage
import { WheelViewView } from 'cloud2303/react-native-wheel-view';
// 高度不能为0
<WheelViewView
style={{ flex: 1 }}
data={['1', '2', '3', '4', '5']}
selectedIndex={selectedIndex}
onItemSelected={(event) => {
console.log(event.nativeEvent.data, event.nativeEvent.position, '选中的');
setSelectedIndex(event.nativeEvent.position);
}}
/>;Contributing
See the contributing guide to learn how to contribute to the repository and the development workflow.
License
MIT
Made with create-react-native-library
