fix(接口测试): 大数据量时的接口列表虚拟滚动高度计算调优
--bug=1027497 --user=白奇 【接口测试】 github#25304在使用平台做测试时chrome经常出现崩溃问题 https://www.tapd.cn/55049933/s/1389144
This commit is contained in:
parent
627b884d8c
commit
ae0d601c53
|
@ -17,7 +17,7 @@
|
||||||
"@fortawesome/free-regular-svg-icons": "^5.12.0",
|
"@fortawesome/free-regular-svg-icons": "^5.12.0",
|
||||||
"@fortawesome/free-solid-svg-icons": "^5.12.0",
|
"@fortawesome/free-solid-svg-icons": "^5.12.0",
|
||||||
"@fortawesome/vue-fontawesome": "^0.1.9",
|
"@fortawesome/vue-fontawesome": "^0.1.9",
|
||||||
"@ba1q1/vue-easy-tree": "^1.0.4",
|
"@ba1q1/vue-easy-tree": "^1.1.0",
|
||||||
"axios": "^0.27.2",
|
"axios": "^0.27.2",
|
||||||
"diffable-html": "^4.0.0",
|
"diffable-html": "^4.0.0",
|
||||||
"echarts": "^5.0.2",
|
"echarts": "^5.0.2",
|
||||||
|
|
|
@ -141,8 +141,7 @@
|
||||||
@saveRefresh="setDomain"
|
@saveRefresh="setDomain"
|
||||||
:has-option-group="true"
|
:has-option-group="true"
|
||||||
ref="envPopover"
|
ref="envPopover"
|
||||||
class="ml-10"
|
class="ml-10" />
|
||||||
/>
|
|
||||||
|
|
||||||
<el-tooltip class="mt-2 ml-10" v-if="!debugLoading" content="Ctrl + R" placement="top">
|
<el-tooltip class="mt-2 ml-10" v-if="!debugLoading" content="Ctrl + R" placement="top">
|
||||||
<el-dropdown
|
<el-dropdown
|
||||||
|
@ -271,15 +270,15 @@
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<!-- 场景步骤内容 -->
|
<!-- 场景步骤内容 -->
|
||||||
<div ref="stepInfo" style="height: calc(100vh - 170px);">
|
<div ref="stepInfo" style="height: calc(100vh - 170px)">
|
||||||
<vue-easy-tree
|
<vue-easy-tree
|
||||||
node-key="resourceId"
|
node-key="id"
|
||||||
height="calc(100vh - 170px)"
|
height="calc(100vh - 170px)"
|
||||||
:minItemSize="43"
|
:minItemSize="43"
|
||||||
:sizeDependencies="['expanded']"
|
:sizeDependencies="['expanded']"
|
||||||
:props="props"
|
:props="props"
|
||||||
:data="scenarioDefinition"
|
:data="scenarioDefinition"
|
||||||
:buffer="200"
|
:buffer="300"
|
||||||
class="ms-tree"
|
class="ms-tree"
|
||||||
:expand-on-click-node="false"
|
:expand-on-click-node="false"
|
||||||
:allow-drop="allowDrop"
|
:allow-drop="allowDrop"
|
||||||
|
@ -325,7 +324,14 @@
|
||||||
:show-size="false"
|
:show-size="false"
|
||||||
style="margin-right: 10px" />
|
style="margin-right: 10px" />
|
||||||
</span>
|
</span>
|
||||||
<span style="width: calc(100% - 40px)">
|
<span
|
||||||
|
v-if="
|
||||||
|
stepFilter.get('ALlSamplerStep').indexOf(data.type) === -1 ||
|
||||||
|
!node.parent ||
|
||||||
|
!node.parent.data ||
|
||||||
|
stepFilter.get('AllSamplerProxy').indexOf(node.parent.data.type) === -1
|
||||||
|
"
|
||||||
|
style="width: calc(100% - 40px)">
|
||||||
<!-- 步骤组件-->
|
<!-- 步骤组件-->
|
||||||
<ms-component-config
|
<ms-component-config
|
||||||
:scenario-definition="scenarioDefinition"
|
:scenario-definition="scenarioDefinition"
|
||||||
|
@ -348,25 +354,14 @@
|
||||||
@setDomain="setDomain"
|
@setDomain="setDomain"
|
||||||
@openScenario="openScenario"
|
@openScenario="openScenario"
|
||||||
@editScenarioAdvance="editScenarioAdvance"
|
@editScenarioAdvance="editScenarioAdvance"
|
||||||
ref="componentConfig"
|
ref="componentConfig" />
|
||||||
v-if="
|
|
||||||
stepFilter.get('ALlSamplerStep').indexOf(data.type) === -1 ||
|
|
||||||
!node.parent ||
|
|
||||||
!node.parent.data ||
|
|
||||||
stepFilter.get('AllSamplerProxy').indexOf(node.parent.data.type) === -1
|
|
||||||
" />
|
|
||||||
<div v-else class="el-tree-node is-hidden is-focusable is-leaf" style="display: none">
|
|
||||||
{{ hideNode(node) }}
|
|
||||||
</div>
|
|
||||||
</span>
|
</span>
|
||||||
</el-row>
|
</el-row>
|
||||||
</vue-easy-tree>
|
</vue-easy-tree>
|
||||||
</div>
|
</div>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="21">
|
<el-col :span="21"> </el-col>
|
||||||
|
|
||||||
</el-col>
|
|
||||||
<!-- 按钮列表 -->
|
<!-- 按钮列表 -->
|
||||||
<el-col :span="3">
|
<el-col :span="3">
|
||||||
<div
|
<div
|
||||||
|
@ -1182,8 +1177,11 @@ export default {
|
||||||
},
|
},
|
||||||
margeTransaction(item, console, arr) {
|
margeTransaction(item, console, arr) {
|
||||||
arr.forEach((sub) => {
|
arr.forEach((sub) => {
|
||||||
if (item.data && item.data.id + '_' + item.data.parentIndex === sub.resourceId
|
if (
|
||||||
&& item.data.requestResult.length === 0) {
|
item.data &&
|
||||||
|
item.data.id + '_' + item.data.parentIndex === sub.resourceId &&
|
||||||
|
item.data.requestResult.length === 0
|
||||||
|
) {
|
||||||
sub.responseResult.console = console;
|
sub.responseResult.console = console;
|
||||||
item.data.requestResult.push(sub);
|
item.data.requestResult.push(sub);
|
||||||
// 更新父节点状态
|
// 更新父节点状态
|
||||||
|
@ -1767,7 +1765,7 @@ export default {
|
||||||
this.clearResult(this.scenarioDefinition);
|
this.clearResult(this.scenarioDefinition);
|
||||||
this.clearNodeStatus(this.$refs.stepTree.root.childNodes);
|
this.clearNodeStatus(this.$refs.stepTree.root.childNodes);
|
||||||
runScenario.run = false;
|
runScenario.run = false;
|
||||||
this.message = "STOP";
|
this.message = 'STOP';
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let hasRequest = runScenario && runScenario.hasRequest;
|
let hasRequest = runScenario && runScenario.hasRequest;
|
||||||
|
|
Loading…
Reference in New Issue