* 批量选中
(ids: string[])
| 46 | * 批量选中 |
| 47 | */ |
| 48 | selectAll(ids: string[]) { |
| 49 | const selectIds: string[] = []; |
| 50 | |
| 51 | ids.forEach(d => { |
| 52 | const node = this.doc.getNode(d); |
| 53 | |
| 54 | if (node?.canSelect()) { |
| 55 | selectIds.push(d); |
| 56 | } |
| 57 | }); |
| 58 | |
| 59 | this._selected = selectIds; |
| 60 | |
| 61 | this.emitter.emit('selectionchange', this._selected); |
| 62 | } |
| 63 | |
| 64 | /** |
| 65 | * 清除选中 |