@antv/l7-component 2.23.0 → 2.23.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -123,7 +123,11 @@ export default class LayerSwitch extends SelectControl {
123
123
  // 如果是单选模式,则只显示第一个图层
124
124
  handleSingleSelection() {
125
125
  this.layers.forEach((layer, index) => {
126
- index === 0 ? layer.show() : layer.hide();
126
+ if (index === 0) {
127
+ layer.show();
128
+ } else {
129
+ layer.hide();
130
+ }
127
131
  });
128
132
  }
129
133
  onAdd() {