@@ -65,7 +65,7 @@ export default {
this.showDialog = false
},
initEditor() {
- if (!this.searchEditor) {
+ if (this.searchList.length > 0 && !this.searchEditor) {
this.searchEditor = monaco.editor.create(document.getElementById('searchEditor'), {
minimap: {
enabled: false
@@ -401,8 +401,8 @@ export default {
return
}
let newItem = {
- copy: true,
- ...item
+ ...item,
+ copy: true
newItem.name = newItem.name + '(复制)'
newItem.tmp_id = new Date().getTime() + '' + Math.floor(Math.random() * 1000)