提交 8e2bd222 编写于 作者: S song.tianyang

fix: 复制场景修改场景名称后,tab页的名称没跟着变

修复复制场景修改场景名称后,tab页的名称没跟着变的问题
上级 c9fdccf8
......@@ -237,8 +237,18 @@
this.$refs.apiScenarioList.search(data);
},
refresh(data) {
this.setTabTitle(data);
this.$refs.apiScenarioList.search(data);
},
setTabTitle(data) {
for (let index in this.tabs) {
let tab = this.tabs[index];
if (tab.name === this.activeName) {
tab.label = data.name;
break;
}
}
},
editScenario(row) {
this.addTab({name: 'edit', currentScenario: row});
},
......
......@@ -848,7 +848,7 @@
if (this.currentScenario.tags instanceof String) {
this.currentScenario.tags = JSON.parse(this.currentScenario.tags);
}
this.$emit('refresh');
this.$emit('refresh',this.currentScenario);
})
}
})
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册