feat(plugin-workflow-request): allow to use variable in url (#3304)

This commit is contained in:
Junyi 2024-01-02 21:35:09 +08:00 committed by GitHub
parent fda30fd519
commit 64e0659f7b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,6 +4,7 @@ import {
Instruction, Instruction,
WorkflowVariableInput, WorkflowVariableInput,
WorkflowVariableJSON, WorkflowVariableJSON,
WorkflowVariableTextArea,
defaultFieldNames, defaultFieldNames,
} from '@nocobase/plugin-workflow/client'; } from '@nocobase/plugin-workflow/client';
@ -41,7 +42,7 @@ export default class extends Instruction {
title: `{{t("URL", { ns: "${NAMESPACE}" })}}`, title: `{{t("URL", { ns: "${NAMESPACE}" })}}`,
'x-decorator': 'FormItem', 'x-decorator': 'FormItem',
'x-decorator-props': {}, 'x-decorator-props': {},
'x-component': 'Input', 'x-component': 'WorkflowVariableTextArea',
'x-component-props': { 'x-component-props': {
placeholder: 'https://www.nocobase.com', placeholder: 'https://www.nocobase.com',
}, },
@ -175,6 +176,7 @@ export default class extends Instruction {
components = { components = {
ArrayItems, ArrayItems,
WorkflowVariableInput, WorkflowVariableInput,
WorkflowVariableTextArea,
WorkflowVariableJSON, WorkflowVariableJSON,
}; };
useVariables({ key, title }, { types, fieldNames = defaultFieldNames }) { useVariables({ key, title }, { types, fieldNames = defaultFieldNames }) {