You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
dashboard/src/charts/BillTypeSelect.jsx

34 lines
981 B
React

import React, {Component} from 'react';
import {Select} from 'antd';
import {observer} from 'mobx-react';
const BillTypeSelect = (props) => {
const {store} = props;
return (
<div>
<Select
mode={store.bill_type_mode}
style={{width: '100%'}}
placeholder="选择类型"
value={store.bill_types}
onChange={store.bt_handleChange}
>
{props.show_all ? <Select.Option key="-1" value="ALL">ALL 账单类型</Select.Option> : ''}
{Object.keys(store.data).length == 0 ? '' : store.data.map((item, index) => {
return (
<Select.Option key={index}
value={item.cb_billtype}>{item.cb_billtype}</Select.Option>
)
})
}
</Select>
</div>
);
}
export default observer(BillTypeSelect);