|
|
@@ -37,7 +37,8 @@ class Filter extends React.Component {
|
|
|
}
|
|
|
|
|
|
componentDidMount() {
|
|
|
- if (this.props.index.connectorIndex || this.props.index.parkingIndex) {
|
|
|
+ console.log("当前筛选", this.props);
|
|
|
+ if (this.props.index) {
|
|
|
this.setState({
|
|
|
filterIndex: this.props.index
|
|
|
});
|
|
|
@@ -49,7 +50,11 @@ class Filter extends React.Component {
|
|
|
|
|
|
selectConnector(index) {
|
|
|
const indexs = this.state.filterIndex;
|
|
|
- indexs.connectorIndex = index;
|
|
|
+ if (indexs.connectorIndex == index) {
|
|
|
+ indexs.connectorIndex = -1;
|
|
|
+ } else {
|
|
|
+ indexs.connectorIndex = index;
|
|
|
+ }
|
|
|
this.setState({
|
|
|
count: 0,
|
|
|
filterIndex: indexs
|