(e, id)
| 66 | } |
| 67 | } |
| 68 | function onClickGroup (e, id) { |
| 69 | let tempOpenSubKey = [...openSubKey] |
| 70 | if (tempOpenSubKey.includes(e.key)) { |
| 71 | tempOpenSubKey = tempOpenSubKey.filter(item => { return item !== e.key }) // 去掉已经存在的 |
| 72 | } else { |
| 73 | props.onPropertyChange({ groupId: id }, null, 'layerClickGroup'); // 展开的时候才发送点击组事件 |
| 74 | tempOpenSubKey.push(e.key) |
| 75 | |
| 76 | } |
| 77 | setOpenSubKey(tempOpenSubKey) |
| 78 | e.domEvent.preventDefault() |
| 79 | |
| 80 | } |
| 81 | function clickLayer (id) { |
| 82 | // 点击图层中某个图层 |
| 83 | let tempSelectKeys = [...(props.nowId || [])] |