File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
HorizontalButtonGroupsControl
VerticalButtonGroupsControl Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -127,7 +127,7 @@ class HorizontalButtonGroupsControl extends React.Component {
127127 } )
128128 }
129129
130- _getFloorName = ( floorLevel , floorNameType ) => {
130+ _getFloorName = ( floorLevel , isFocusFloorName ) => {
131131 const {
132132 labelFormater,
133133 map : { focusFloor }
@@ -137,7 +137,7 @@ class HorizontalButtonGroupsControl extends React.Component {
137137 return ''
138138 }
139139 //重置时重新设置楼层按钮显示
140- if ( floorNameType === '1' && typeof focusFloor === 'undefined' && floorLevel !== focusFloor ) {
140+ if ( isFocusFloorName && typeof focusFloor === 'undefined' ) {
141141 floorLevel = this . state . listFloors [ 0 ]
142142 setTimeout ( ( ) => {
143143 this . setState ( {
@@ -221,7 +221,7 @@ class HorizontalButtonGroupsControl extends React.Component {
221221 className = { classnames ( styles . floorBlock , styles . initFloor , styles . withBorder , styles . active ) }
222222 onClick = { this . _toggleShowGroups }
223223 >
224- { this . _getFloorName ( focusFloor , '1' ) }
224+ { this . _getFloorName ( focusFloor , true ) }
225225 </ div >
226226 </ div >
227227 )
Original file line number Diff line number Diff line change @@ -124,7 +124,7 @@ class VerticalButtonGroupsControl extends React.Component {
124124 } )
125125 }
126126
127- _getFloorName = ( floorLevel , floorNameType ) => {
127+ _getFloorName = ( floorLevel , isFocusFloorName ) => {
128128 const {
129129 labelFormater,
130130 map : { focusFloor }
@@ -133,7 +133,7 @@ class VerticalButtonGroupsControl extends React.Component {
133133 return ''
134134 }
135135 //重置时重新设置楼层按钮显示
136- if ( floorNameType === '1' && typeof focusFloor === 'undefined' ) {
136+ if ( isFocusFloorName && typeof focusFloor === 'undefined' ) {
137137 floorLevel = this . state . listFloors [ 0 ]
138138 setTimeout ( ( ) => {
139139 this . setState ( {
@@ -205,7 +205,7 @@ class VerticalButtonGroupsControl extends React.Component {
205205 className = { classnames ( styles . floorBlock , styles . withBorder , styles . active ) }
206206 onClick = { this . _toggleShowGroups }
207207 >
208- { this . _getFloorName ( focusFloor , '1' ) }
208+ { this . _getFloorName ( focusFloor , true ) }
209209 </ div >
210210 </ div >
211211 )
You can’t perform that action at this time.
0 commit comments