ComboBox

筛选组件

Props

属性

类型

说明

show

[boolen]

true-显示 false-隐藏

optionList

[array]

选项信息

btnList

[array]

按钮信息

selectCall

[function]

点击选项列表区域的回调,需要对触发事件元素进行判断是否为选项,有可能是其他dom

<ComboBox
  show={showCombo}
  optionList={this.optionList}
  btnList={this.btnList}
  time={time}
  tradeType={tradeType}
  selectCall={this.select}
/>

this.btnList = [
  {
    label: '取消',
    callback: this.cancel,
    className: 'cancel',
  },
  {
    label: '确认',
    callback: this.commit,
    className: 'commit',
  },
];

this.optionList = [
  {
    title: '时间选择',
    key: 'time',
    options: [
      { label: '近7天', key: '7' },
      { label: '近1月', key: '30' },
      { label: '近3月', key: '90' },
      { label: '近半年', key: '180' },
      { label: '近一年', key: '365' },
    ],
  },
  {
    title: '交易类型',
    key: 'tradeType',
    options: [
      { label: '全部', key: '0' },
      { label: '转入托管', key: '1' },
      { label: '转出托管', key: '2' },
   ],
  },
];

Last updated

Was this helpful?