1.0.15 • Published 7 years ago

react-native-dj-alertselected v1.0.15

Weekly downloads
-
License
ISC
Repository
-
Last release
7 years ago

AlertSelected

accordion

Install

npm i --save react-native-dj-alertselected

Usage

Using an Accordion in your app will usually look like this:

import React, { Component } from 'react';
import {
  AppRegistry,
  StyleSheet,
  Text,
  View
} from 'react-native';

import AlertSelected from 'react-native-dj-alertselected';

export default class NPMTest extends Component {

  testAlertSelected(){
    let array = ["男","女"];
    /**
     * 弹出控件,最多支持3个选项
     * title: 标题
     * entityList:选择项数据   数组
     * field:操作字段
     * parent:父对象
     * callback:回调方法
     */
    this.refs.as.show("选择性别", array,"sex",this,(field,i)=>{alert(array[i])});
  }

  render() {
    return (
      <View style={styles.container}>
        <Text style={styles.welcome} onPress={this.testAlertSelected.bind(this)}>
          Welcome to React Native!
        </Text>
        {/*初始化组件*/}
        <AlertSelected ref="as" isRnNav={true}/>
      </View>
    );
  }
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    justifyContent: 'center',
    alignItems: 'center',
    backgroundColor: '#F5FCFF',
  },
});

AppRegistry.registerComponent('xxx', () => NPMTest);

Props

The following props can be used to modify the style and/or behaviour:

PropTypeOpt/RequiredDefaultNote
isRnNavBooleanRequiredfalse是否正在使用RN导航,默认为false.

Methods

The following methods can be used to open and close the accordion:

MethodParametersNote
showtitle: 标题、entityList:选择项数据数组、field:操作字段、parent:父对象、callback:回调方法调起控件.
1.0.15

7 years ago

1.0.13

7 years ago

1.0.12

7 years ago

1.0.11

7 years ago

1.0.10

7 years ago

1.0.9

7 years ago

1.0.8

7 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago