react-native-dj-tabmenu
v1.0.2
Published
daojia TabMenu
Readme
TabMEnu

Install
npm i --save react-native-dj-tabmenuUsage
Using in your app will usually look like this:
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View
} from 'react-native';
import {TabMenu,TabMenuDialog} from 'react-native-dj-tabmenu';
export default class NPMTest extends Component {
_onPress(name,id) {
alert("name="+name + ",id="+id);
}
render() {
return (
<TabMenu data={result} nSelected={0} rightClick={this._onPress.bind(this)} >
</TabMenu>
);
}
}
AppRegistry.registerComponent('xxx', () => NPMTest);Props
The following props can be used to modify the style and/or behaviour:
| Prop | Type | Opt/Required | Default | Note |
|---|---|---|---|---|
|data|array|Required|{}| 需要渲染的数据
|itemNum|number|Option|3 | 右边每行排列的item个数
|nSelected|number|Option|0 |左边默认选中的item的索引
|rightClick|function|Required|()=>{}|右边每个item点击的响应函数
Methods
The following methods can be used to open and close the Dialog:
| Method | Parameters | Note | |---|---|---|
