fix: Knowledge Base Workflow - The icon of the data source tool node in the variable selection drop-down box does not correspond to it (#4475)

This commit is contained in:
shaohuzhang1 2025-12-09 18:17:41 +08:00 committed by GitHub
parent 4c0132a3aa
commit ff3ecb36d4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 10 additions and 3 deletions

View File

@ -93,13 +93,17 @@ class AppNode extends HtmlResize.view {
children: globalFields,
})
}
result.push({
const value: any = {
value: this.props.model.id,
icon: this.props.model.properties.node_data?.icon,
label: this.props.model.properties.stepName,
type: this.props.model.type,
children: this.props.model.properties?.config?.fields || [],
})
}
if (this.props.model.properties.kind) {
value['kind'] = this.props.model.properties.kind
}
result.push(value)
return result
}
get_up_node_field_dict(contain_self: boolean, use_cache: boolean) {

View File

@ -8,7 +8,9 @@
>
<img :src="item?.icon" alt="" />
</el-avatar>
<el-avatar v-else-if="item?.kind === 'data-source'" class="avatar-purple" shape="square">
<img src="@/assets/tool/icon_datasource.svg" style="width: 58%" alt="" />
</el-avatar>
<el-avatar v-else-if="item?.tool_type === 'DATA_SOURCE'" class="avatar-purple" shape="square">
<img src="@/assets/tool/icon_datasource.svg" style="width: 58%" alt="" />
</el-avatar>
@ -23,6 +25,7 @@ const props = defineProps<{
name: string
icon: string
tool_type: string
kind?: string
}
}>()
</script>