From c3829446fd6c8a18f21fd728e09c32f014a41cc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Mon, 12 Aug 2024 17:10:17 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=AF=E4=BB=A5=E5=B0=86=E9=83=A8=E5=88=86?= =?UTF-8?q?=E8=8A=82=E7=82=B9=E5=AD=97=E6=AE=B5=E7=BD=AE=E7=A9=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/console/treeView.ts | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/console/treeView.ts b/src/console/treeView.ts index ce69693..87da85a 100644 --- a/src/console/treeView.ts +++ b/src/console/treeView.ts @@ -59,17 +59,13 @@ class TreeDataProvider implements vscode.TreeDataProvider { } updateItem(item: TreeItem, data: TreeNodeInfo) { - if (typeof data.name === 'string') { - item.label = data.name; - } - if (typeof data.desc === 'string') { - item.description = data.desc; - } - if (typeof data.tip === 'string') { - item.tooltip = data.tip; - } + item.label = data.name; + item.description = data.desc; + item.tooltip = data.tip; if (typeof data.icon === 'string') { item.iconPath = new vscode.ThemeIcon(data.icon); + } else { + item.iconPath = undefined; } if (data.hasChilds) { if (this.manager.treeViews.find(view => view.root === item.uid)) {