mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-28 02:02:08 +00:00
[TS] Use custom TreeNode type (#3164)
This commit is contained in:
@@ -157,9 +157,7 @@ const categories = computed<SettingTreeNode[]>(() =>
|
||||
].map((node) => ({
|
||||
...node,
|
||||
translatedLabel: t(
|
||||
// @ts-expect-error fixme ts strict error
|
||||
`settingsCategories.${normalizeI18nKey(node.label)}`,
|
||||
// @ts-expect-error fixme ts strict error
|
||||
node.label
|
||||
)
|
||||
}))
|
||||
@@ -177,16 +175,12 @@ onMounted(() => {
|
||||
})
|
||||
|
||||
const sortedGroups = (category: SettingTreeNode): ISettingGroup[] => {
|
||||
// @ts-expect-error fixme ts strict error
|
||||
return (
|
||||
[...(category.children ?? [])]
|
||||
// @ts-expect-error fixme ts strict error
|
||||
.sort((a, b) => a.label.localeCompare(b.label))
|
||||
.map((group) => ({
|
||||
label: group.label,
|
||||
settings: flattenTree<SettingParams>(group)
|
||||
}))
|
||||
)
|
||||
return [...(category.children ?? [])]
|
||||
.sort((a, b) => a.label.localeCompare(b.label))
|
||||
.map((group) => ({
|
||||
label: group.label,
|
||||
settings: flattenTree<SettingParams>(group)
|
||||
}))
|
||||
}
|
||||
|
||||
const searchQuery = ref<string>('')
|
||||
|
||||
Reference in New Issue
Block a user