fix(接口测试): 修复sql请求结果集未及时更新问题
--bug=1022508 --user=赵勇 【接口测试】sql请求,执行后修改sql再执行,响应内容没有更新 https://www.tapd.cn/55049933/s/1332530
This commit is contained in:
parent
93c3f5ed8a
commit
983d6be64f
|
@ -34,17 +34,27 @@ export default {
|
|||
body: String,
|
||||
},
|
||||
created() {
|
||||
if (!this.body) {
|
||||
return;
|
||||
}
|
||||
let rowArray = this.body.split('\n');
|
||||
// 过多会有性能问题
|
||||
if (rowArray.length > 100) {
|
||||
rowArray = rowArray.slice(0, 100);
|
||||
}
|
||||
this.getTableData(rowArray);
|
||||
this.init();
|
||||
},
|
||||
watch: {
|
||||
body() {
|
||||
this.init();
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
if (!this.body) {
|
||||
return;
|
||||
}
|
||||
this.tables = [];
|
||||
this.titles = [];
|
||||
let rowArray = this.body.split('\n');
|
||||
// 过多会有性能问题
|
||||
if (rowArray.length > 100) {
|
||||
rowArray = rowArray.slice(0, 100);
|
||||
}
|
||||
this.getTableData(rowArray);
|
||||
},
|
||||
getTableData(rowArray) {
|
||||
let titles;
|
||||
let result = [];
|
||||
|
|
Loading…
Reference in New Issue