diff --git a/frontend/src/business/components/api/automation/scenario/common/Jsr233ProcessorContent.vue b/frontend/src/business/components/api/automation/scenario/common/Jsr233ProcessorContent.vue index c0931be545..a7be0fe635 100644 --- a/frontend/src/business/components/api/automation/scenario/common/Jsr233ProcessorContent.vue +++ b/frontend/src/business/components/api/automation/scenario/common/Jsr233ProcessorContent.vue @@ -218,12 +218,9 @@ export default { } }, handleCodeTemplate(code) { - if (!this.jsr223ProcessorData.script) { - this.jsr223ProcessorData.script = code; - } else { - this.jsr223ProcessorData.script = this.jsr223ProcessorData.script + '\n' + code; + if (this.$refs.codeEdit) { + this.$refs.codeEdit.insert(code); } - this.reload(); }, } } diff --git a/frontend/src/business/components/api/definition/components/MsCodeEdit.vue b/frontend/src/business/components/api/definition/components/MsCodeEdit.vue index 10e988c0e0..3d16f61fcd 100644 --- a/frontend/src/business/components/api/definition/components/MsCodeEdit.vue +++ b/frontend/src/business/components/api/definition/components/MsCodeEdit.vue @@ -1,9 +1,9 @@