fix: The dropdown data of subsequent nodes in the form cannot be displayed back (#3129)

This commit is contained in:
shaohuzhang1 2025-05-22 10:54:25 +08:00 committed by GitHub
parent 81a3af2c8b
commit 8f7d91798b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -4,6 +4,24 @@ class FormNode extends AppNode {
constructor(props: any) {
super(props, FormNodeVue)
}
get_node_field_list() {
const result = []
const fields = this.props.model.properties?.config?.fields || []
let otherFields = []
try {
otherFields = this.props.model.properties.node_data.form_field_list.map((item: any) => ({
label: typeof item.label == 'string' ? item.label : item.label.label,
value: item.field
}))
} catch (e) {}
result.push({
value: this.props.model.id,
label: this.props.model.properties.stepName,
type: this.props.model.type,
children: [...fields, ...otherFields]
})
return result
}
}
export default {
type: 'form-node',