(oldId: string, newId: string)
| 301 | } |
| 302 | |
| 303 | changeId(oldId: string, newId: string) { |
| 304 | if (this.files.get(newId)) { |
| 305 | return; |
| 306 | } |
| 307 | const file = this.files.get(oldId)!; |
| 308 | this.files.set(newId, file); |
| 309 | this.files.delete(oldId); |
| 310 | if (this.current == oldId) { |
| 311 | this.current = newId; |
| 312 | } |
| 313 | } |
| 314 | |
| 315 | update() { |
| 316 | for (let i = 0; i < this.task.length; i++) { |