mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-05-05 21:49:25 +08:00
fix(plugin-workflow): fix test button variable (#5766)
This commit is contained in:
parent
0fbe4f0229
commit
23c23307fa
@ -159,9 +159,6 @@ export function useAvailableUpstreams(node, filter?) {
|
|||||||
*/
|
*/
|
||||||
export function useUpstreamScopes(node) {
|
export function useUpstreamScopes(node) {
|
||||||
const stack: any[] = [];
|
const stack: any[] = [];
|
||||||
if (!node) {
|
|
||||||
return [];
|
|
||||||
}
|
|
||||||
|
|
||||||
for (let current = node; current; current = current.upstream) {
|
for (let current = node; current; current = current.upstream) {
|
||||||
if (current.upstream && current.branchIndex != null) {
|
if (current.upstream && current.branchIndex != null) {
|
||||||
@ -406,11 +403,12 @@ function TestButton() {
|
|||||||
const form = useMemo(() => createForm(), []);
|
const form = useMemo(() => createForm(), []);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<NodeContext.Provider value={{ type: node.type, config: values }}>
|
<NodeContext.Provider value={{ ...node, config: values }}>
|
||||||
<VariableKeysContext.Provider value={keys}>
|
<VariableKeysContext.Provider value={keys}>
|
||||||
<SchemaComponent
|
<SchemaComponent
|
||||||
components={{
|
components={{
|
||||||
Alert,
|
Alert,
|
||||||
|
TestFormFieldset,
|
||||||
}}
|
}}
|
||||||
scope={{
|
scope={{
|
||||||
useCancelAction,
|
useCancelAction,
|
||||||
@ -451,7 +449,7 @@ function TestButton() {
|
|||||||
type: 'object',
|
type: 'object',
|
||||||
title: '{{t("Replace variables", { ns: "workflow" })}}',
|
title: '{{t("Replace variables", { ns: "workflow" })}}',
|
||||||
'x-decorator': 'FormItem',
|
'x-decorator': 'FormItem',
|
||||||
'x-component': TestFormFieldset,
|
'x-component': 'TestFormFieldset',
|
||||||
},
|
},
|
||||||
actions: {
|
actions: {
|
||||||
type: 'void',
|
type: 'void',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user