fix: 接口定义导出问题
This commit is contained in:
parent
d925e9cbac
commit
bc585eeca4
|
@ -242,8 +242,12 @@
|
||||||
this.showCasePage = true;
|
this.showCasePage = true;
|
||||||
},
|
},
|
||||||
exportAPI() {
|
exportAPI() {
|
||||||
|
if (!this.isApiListEnable) {
|
||||||
|
this.$warning('用例列表暂不支持导出,请切换成接口列表');
|
||||||
|
return;
|
||||||
|
}
|
||||||
let obj = {projectName: getCurrentProjectID(), protocol: this.currentProtocol}
|
let obj = {projectName: getCurrentProjectID(), protocol: this.currentProtocol}
|
||||||
if (this.$refs.apiList[0].selectRows && this.$refs.apiList[0].selectRows.length > 0) {
|
if (this.$refs.apiList[0].selectRows && this.$refs.apiList[0].selectRows.size > 0) {
|
||||||
let arr = Array.from(this.$refs.apiList[0].selectRows);
|
let arr = Array.from(this.$refs.apiList[0].selectRows);
|
||||||
obj.data = arr;
|
obj.data = arr;
|
||||||
downloadFile("导出API.json", JSON.stringify(obj));
|
downloadFile("导出API.json", JSON.stringify(obj));
|
||||||
|
|
Loading…
Reference in New Issue