fix:优化filterSelect组件,默认不勾选,展示‘请选择’
This commit is contained in:
parent
005d6f2f71
commit
e9e0905e14
|
@ -11,7 +11,7 @@ export default class filterSelect extends React.Component {
|
|||
item.check = false;
|
||||
return item;
|
||||
});
|
||||
menuList[0].check = true;
|
||||
// menuList[0].check = true;
|
||||
this.state = {
|
||||
id: props.data.id,
|
||||
label: props.data.label,
|
||||
|
@ -21,9 +21,9 @@ export default class filterSelect extends React.Component {
|
|||
visible: true,
|
||||
menuShow: true,
|
||||
propName: props.data.prop,
|
||||
selectList:[]
|
||||
selectList:[],
|
||||
text:''
|
||||
};
|
||||
this.state.text = props.data.menuList[0].name;
|
||||
}
|
||||
onHandlerClick() {
|
||||
let isShow = !this.state.menuShow;
|
||||
|
@ -92,7 +92,7 @@ export default class filterSelect extends React.Component {
|
|||
>
|
||||
<span className="filter-label">{this.state.label}</span>
|
||||
<span className="filter-maohao">:</span>
|
||||
<span className="filter-placeholder">{this.state.text}</span>
|
||||
<span className="filter-placeholder">{this.state.text||'请选择'}</span>
|
||||
<Icon type="down" className="icon-down-arrow" />
|
||||
<Icon
|
||||
type="close"
|
||||
|
|
Loading…
Reference in New Issue