Skip to content

Commit

Permalink
修复不可操作房屋可全选反选的Bug
Browse files Browse the repository at this point in the history
  • Loading branch information
qq10137383 committed Mar 4, 2022
1 parent bf22378 commit a10346a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions src/components/BuildingTable/core/select-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,9 @@ export default class SelectionManager {
if (this.disabled) return

this.query.queryHousesByUnit(unitInfo).forEach(house => {
this.setHouseCell(house, selected)
if (house.isEnabled) {
this.setHouseCell(house, selected)
}
})
this.raiseEvent()
}
Expand All @@ -95,7 +97,9 @@ export default class SelectionManager {
if (this.disabled) return

this.query.queryHousesByLayer(layerInfo, unitInfo).forEach(house => {
this.setHouseCell(house, selected)
if (house.isEnabled) {
this.setHouseCell(house, selected)
}
})
this.raiseEvent()
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/BuildingTable/style/common.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

.bt-checkbox__input {
margin-right: 2px;
&[disabled="disabled"] {
&[disabled] {
cursor: not-allowed;
}
}
Expand Down

0 comments on commit a10346a

Please sign in to comment.