mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-05-07 22:49:26 +08:00
feat(plugin-workflow): allow to select any path of a variable in condition node (#4571)
This commit is contained in:
parent
15424f4c88
commit
361ebee130
@ -170,7 +170,13 @@ function Calculation({ calculator, operands = [], onChange }) {
|
|||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
`}
|
`}
|
||||||
>
|
>
|
||||||
<Variable.Input value={operands[0]} onChange={leftOperandOnChange} scope={leftOptions} useTypedConstant />
|
<Variable.Input
|
||||||
|
changeOnSelect
|
||||||
|
value={operands[0]}
|
||||||
|
onChange={leftOperandOnChange}
|
||||||
|
scope={leftOptions}
|
||||||
|
useTypedConstant
|
||||||
|
/>
|
||||||
<Select
|
<Select
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
role="button"
|
role="button"
|
||||||
@ -193,7 +199,13 @@ function Calculation({ calculator, operands = [], onChange }) {
|
|||||||
</Select.OptGroup>
|
</Select.OptGroup>
|
||||||
))}
|
))}
|
||||||
</Select>
|
</Select>
|
||||||
<Variable.Input value={operands[1]} onChange={rightOperandOnChange} scope={rightOptions} useTypedConstant />
|
<Variable.Input
|
||||||
|
changeOnSelect
|
||||||
|
value={operands[1]}
|
||||||
|
onChange={rightOperandOnChange}
|
||||||
|
scope={rightOptions}
|
||||||
|
useTypedConstant
|
||||||
|
/>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -391,6 +403,9 @@ export default class extends Instruction {
|
|||||||
title: `{{t("Condition expression", { ns: "${NAMESPACE}" })}}`,
|
title: `{{t("Condition expression", { ns: "${NAMESPACE}" })}}`,
|
||||||
'x-decorator': 'FormItem',
|
'x-decorator': 'FormItem',
|
||||||
'x-component': 'WorkflowVariableTextArea',
|
'x-component': 'WorkflowVariableTextArea',
|
||||||
|
'x-component-props': {
|
||||||
|
changeOnSelect: true,
|
||||||
|
},
|
||||||
['x-validator'](value, rules, { form }) {
|
['x-validator'](value, rules, { form }) {
|
||||||
const { values } = form;
|
const { values } = form;
|
||||||
const { evaluate } = evaluators.get(values.engine);
|
const { evaluate } = evaluators.get(values.engine);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user