From 81abb5268ea806ea63ee403f303e0212029df264 Mon Sep 17 00:00:00 2001 From: BillDowney Date: Wed, 14 Jul 2021 21:04:01 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9C=A8=E6=8E=A5=E5=8F=A3&=E5=87=BD=E6=95=B0?= =?UTF-8?q?=E6=9C=AA=E4=BF=9D=E5=AD=98=E6=97=B6=EF=BC=8C=E5=9C=A8=E4=B8=8A?= =?UTF-8?q?=E6=96=B9tab=E9=A1=B5=E6=98=BE=E7=A4=BA*=E5=8F=B7=EF=BC=8C?= =?UTF-8?q?=E4=BF=9D=E5=AD=98=E5=90=8E=E6=B6=88=E5=A4=B1=EF=BC=8Cissues:#I?= =?UTF-8?q?3ZL41?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../console/src/components/editor/magic-script-editor.vue | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/magic-editor/src/console/src/components/editor/magic-script-editor.vue b/magic-editor/src/console/src/components/editor/magic-script-editor.vue index c8290952..c27c5111 100644 --- a/magic-editor/src/console/src/components/editor/magic-script-editor.vue +++ b/magic-editor/src/console/src/components/editor/magic-script-editor.vue @@ -12,7 +12,7 @@ > - {{item.name}} + {{item.name}}* @@ -310,7 +310,8 @@ export default { debugDecoration: null, save: true, loading: false, - scrollTop: 0 + scrollTop: 0, + tmpScript: null // 缓存一个未修改前的脚本 }) } if (item.ext.loading) { @@ -377,6 +378,7 @@ export default { item.method = data.method } item.script = data.script + item.ext.tmpScript = data.script item.description = data.description if (item.copy === true) { item.id = '' @@ -428,6 +430,7 @@ export default { bus.$emit('script_add') } thisInfo.id = id + this.info.ext.tmpScript = saveObj.script }) }, doSaveFunction() { @@ -448,6 +451,7 @@ export default { bus.$emit('function_add') } thisInfo.id = id + this.info.ext.tmpScript = saveObj.script }) }, doSave() {