|
@@ -178,15 +178,17 @@ watch(
|
|
|
)
|
|
|
|
|
|
watch(
|
|
|
- () => props.node,
|
|
|
+ () => [props.node, WorkflowStore.nodeRelationChangeFlag],
|
|
|
(n) => {
|
|
|
- if (n) {
|
|
|
- const all = WorkflowStore.getInVars(n)
|
|
|
+ if (n[0]) {
|
|
|
+ const all = WorkflowStore.getInVars(n[0])
|
|
|
const map = new Map()
|
|
|
all.forEach((p) => {
|
|
|
p.options.forEach((v) => {
|
|
|
if (v.source === VarsSource.Root) {
|
|
|
map.set(`${v.key}`, v)
|
|
|
+ } else if (v.source === VarsSource.Env) {
|
|
|
+ map.set(`env.${v.key}`, v)
|
|
|
} else {
|
|
|
map.set(`${v.nodeId}.${v.key}`, v)
|
|
|
}
|
|
@@ -347,6 +349,8 @@ const initVarsDom = (vars) => {
|
|
|
dom.setAttribute('contenteditable', 'false')
|
|
|
if (vars.source === VarsSource.Root) {
|
|
|
dom.setAttribute('sign', `{{#${vars.key}#}}`)
|
|
|
+ } else if (vars.source === VarsSource.Env) {
|
|
|
+ dom.setAttribute('sign', `{{#env.${vars.key}#}}`)
|
|
|
} else {
|
|
|
dom.setAttribute('sign', `{{#${vars.nodeId}.${vars.key}#}}`)
|
|
|
}
|