Home Reference Source Repository
public class | source

Picker

Extends:

react~Component → Picker

弹窗选择器

Constructor Summary

Public Constructor
public

constructor(props: Object, context: Object)

构造函数

Member Summary

Public Members
public

state: *

Method Summary

Public Methods
public

componentWillReceiveProps(objectPattern: {"selectedList": *})

public

render(): *

Public Constructors

public constructor(props: Object, context: Object) source

构造函数

Params:

NameTypeAttributeDescription
props Object

组件所使用的属性

props.visible boolean
  • optional

弹窗选择器是否显示

props.optionsList Object[] | string[] | number[]

进行选择的数据列表

props.selectedList number[]
  • optional

当前选中的数据列表项下标组成的数组

props.labelName string
  • optional
  • default: 'name'

当可选择的数据列表的项是对象(obj)时,obj[labelName] 就是选择器显示的文案

props.nextName string
  • optional
  • default: 'childs'

某个列表项的下一个选择列表数据多对应的 key

props.title PropTypes.node
  • optional

弹窗标题

props.confirmText PropTypes.node
  • optional
  • default: '确定'

确认按钮文案

props.cancelText PropTypes.node
  • optional
  • default: '取消'

取消按钮文案

props.onConfirm function

确认按钮的函数回调

props.onCancel function
  • optional

取消按钮的函数回调

props.onChange function
  • optional

选中某一个项时触发的函数回调

context Object

Public Members

public state: * source

Public Methods

public componentWillReceiveProps(objectPattern: {"selectedList": *}) source

Params:

NameTypeAttributeDescription
objectPattern {"selectedList": *}
  • default: {"selectedList":null}

public render(): * source

Return:

*