* Remove item by name * 通过名称移除菜单项
(name: string)
| 229 | * 通过名称移除菜单项 |
| 230 | */ |
| 231 | public removeItem(name: string): boolean { |
| 232 | const item = this._list.getChild(name); |
| 233 | if (item) { |
| 234 | const index = this._list.getChildIndex(item); |
| 235 | this._list.removeChildToPoolAt(index); |
| 236 | return true; |
| 237 | } |
| 238 | return false; |
| 239 | } |
| 240 | |
| 241 | /** |
| 242 | * Clear all items |
no test coverage detected