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() {