| 79 | |
| 80 | } |
| 81 | function clickLayer (id) { |
| 82 | // 点击图层中某个图层 |
| 83 | let tempSelectKeys = [...(props.nowId || [])] |
| 84 | if (isCtrl) { |
| 85 | if (tempSelectKeys.includes(id)) { |
| 86 | tempSelectKeys.splice(tempSelectKeys.findIndex(item => item === id), 1) |
| 87 | } else { |
| 88 | tempSelectKeys.push(id) |
| 89 | } |
| 90 | } else { |
| 91 | tempSelectKeys = [id] |
| 92 | } |
| 93 | // setSelectKeys(tempSelectKeys) |
| 94 | props.onPropertyChange({ selectKeys: tempSelectKeys }, null, 'layerClick'); |
| 95 | } |
| 96 | function onMenuClick (type) { |
| 97 | setIsShowMenu(false) |
| 98 | setShowSubMenu(false) |