Skip to content

Commit 6ac0fb2

Browse files
committed
fix: Knowledge Base Workflow - The icon of the data source tool node in the variable selection drop-down box does not correspond to it
1 parent 41d97af commit 6ac0fb2

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

ui/src/workflow/common/app-node.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,13 +93,17 @@ class AppNode extends HtmlResize.view {
9393
children: globalFields,
9494
})
9595
}
96-
result.push({
96+
const value: any = {
9797
value: this.props.model.id,
9898
icon: this.props.model.properties.node_data?.icon,
9999
label: this.props.model.properties.stepName,
100100
type: this.props.model.type,
101101
children: this.props.model.properties?.config?.fields || [],
102-
})
102+
}
103+
if (this.props.model.properties.kind) {
104+
value['kind'] = this.props.model.properties.kind
105+
}
106+
result.push(value)
103107
return result
104108
}
105109
get_up_node_field_dict(contain_self: boolean, use_cache: boolean) {

ui/src/workflow/icons/tool-lib-node-icon.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88
>
99
<img :src="item?.icon" alt="" />
1010
</el-avatar>
11-
11+
<el-avatar v-else-if="item?.kind === 'data-source'" class="avatar-purple" shape="square">
12+
<img src="@/assets/tool/icon_datasource.svg" style="width: 58%" alt="" />
13+
</el-avatar>
1214
<el-avatar v-else-if="item?.tool_type === 'DATA_SOURCE'" class="avatar-purple" shape="square">
1315
<img src="@/assets/tool/icon_datasource.svg" style="width: 58%" alt="" />
1416
</el-avatar>
@@ -23,6 +25,7 @@ const props = defineProps<{
2325
name: string
2426
icon: string
2527
tool_type: string
28+
kind?: string
2629
}
2730
}>()
2831
</script>

0 commit comments

Comments
 (0)