mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-26 17:30:07 +00:00
[TS] Fix TreeExplorerNode types (#3163)
This commit is contained in:
@@ -136,14 +136,13 @@ const renderedRoot = computed<TreeExplorerNode<ModelOrFolder>>(() => {
|
||||
}
|
||||
return 'pi pi-folder'
|
||||
},
|
||||
// @ts-expect-error fixme ts strict error
|
||||
getBadgeText() {
|
||||
// Return null to apply default badge text
|
||||
// Return undefined to apply default badge text
|
||||
// Return empty string to hide badge
|
||||
if (!folder) {
|
||||
return null
|
||||
return
|
||||
}
|
||||
return folder.state === ResourceState.Loaded ? null : ''
|
||||
return folder.state === ResourceState.Loaded ? undefined : ''
|
||||
},
|
||||
children,
|
||||
draggable: node.leaf,
|
||||
|
||||
@@ -117,7 +117,6 @@ const renderedRoot = computed<TreeExplorerNode<ComfyNodeDefImpl>>(() => {
|
||||
// @ts-expect-error fixme ts strict error
|
||||
leaf: node.leaf,
|
||||
data: node.data,
|
||||
// @ts-expect-error fixme ts strict error
|
||||
getIcon() {
|
||||
if (this.leaf) {
|
||||
return 'pi pi-circle-fill'
|
||||
|
||||
Reference in New Issue
Block a user