refactor(web): 优化节点展现

This commit is contained in:
v-zhangjc9
2025-07-10 12:44:37 +08:00
parent 5e763637da
commit f707a0d2b5
7 changed files with 202 additions and 145 deletions

View File

@@ -104,14 +104,13 @@ export function inputsFormColumns(
]
}
export function outputsFormColumns(editable: boolean = false, required: boolean = false, preload?: any): Schema[] {
export function outputsFormColumns(editable: boolean = false, required: boolean = false): Schema[] {
return [
{
disabled: !editable,
type: 'input-kvs',
name: 'outputs',
label: '输出变量',
value: preload,
addButtonText: '新增输出',
draggable: false,
keyItem: {
@@ -155,7 +154,7 @@ type AmisNodeProps = {
nodeProps: NodeProps
defaultNodeName: String
defaultNodeDescription?: String
extraNodeDescription?: (nodeData: any) => JSX.Element
extraNodeDescription?: JSX.Element
handler: JSX.Element
columnSchema?: () => Schema[]
}
@@ -338,7 +337,7 @@ const AmisNode: (props: AmisNodeProps) => JSX.Element = ({
>
<div className="card-description p-2 text-secondary text-sm">
{nodeDescription}
{extraNodeDescription?.(nodeData)}
{extraNodeDescription}
</div>
</Card>
{handler}