feat: plugin input type add select and custom var (#2571)

* feat: plugin input type add select and custom var

* fix

* fix ui

* fix

* fix
This commit is contained in:
heheer
2024-08-30 18:03:04 +08:00
committed by GitHub
parent 903f39fe17
commit 9d5fd24085
29 changed files with 591 additions and 367 deletions

View File

@@ -173,14 +173,17 @@ export const pluginData2FlowNodeIO = ({
const pluginOutput = nodes.find((node) => node.flowNodeType === FlowNodeTypeEnum.pluginOutput);
return {
inputs: pluginInput
? pluginInput.inputs.map((item) => ({
...item,
...getModuleInputUiField(item),
value: getOrInitModuleInputValue(item),
canEdit: false
}))
: [],
inputs:
pluginInput?.inputs.map((item) => ({
...item,
...getModuleInputUiField(item),
value: getOrInitModuleInputValue(item),
canEdit: false,
renderTypeList:
item.renderTypeList[0] === FlowNodeInputTypeEnum.customVariable
? [FlowNodeInputTypeEnum.reference, FlowNodeInputTypeEnum.input]
: item.renderTypeList
})) || [],
outputs: pluginOutput
? [
...pluginOutput.inputs.map((item) => ({