From 12de2b97586fca8dfadeeb43863cdcfc186a3c50 Mon Sep 17 00:00:00 2001 From: wxg0103 <727495428@qq.com> Date: Mon, 24 Jul 2023 19:40:52 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E7=B3=BB=E7=BB=9F=E8=AE=BE=E7=BD=AE):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=8E=AF=E5=A2=83=E5=8F=98=E9=87=8F=E8=B6=85?= =?UTF-8?q?=E8=BF=87=E5=8D=81=E4=B8=AA=EF=BC=8C=E7=BC=96=E8=BE=91=E5=8F=98?= =?UTF-8?q?=E9=87=8F=E8=B7=B3=E8=BD=AC=E9=94=99=E8=AF=AF=E7=9A=84=E7=BC=BA?= =?UTF-8?q?=E9=99=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1028108 --user=王孝刚 【项目设置】github#25802,项目环境通用配置变量超过10个时,编辑变量跳转错误 https://www.tapd.cn/55049933/s/1396750 --- .../components/environment/commons/ApiScenarioVariables.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/framework/sdk-parent/frontend/src/components/environment/commons/ApiScenarioVariables.vue b/framework/sdk-parent/frontend/src/components/environment/commons/ApiScenarioVariables.vue index 7913b600b9..0a2527680b 100644 --- a/framework/sdk-parent/frontend/src/components/environment/commons/ApiScenarioVariables.vue +++ b/framework/sdk-parent/frontend/src/components/environment/commons/ApiScenarioVariables.vue @@ -259,6 +259,7 @@ export default { const allDataIndex = this.allData.findIndex((d) => d.name === index.name); this.allData.splice(allDataIndex, 1); this.sortParameters(); + this.currentPage = Math.ceil(this.allData.length / this.pageSize); this.queryPage(); }, queryPage() { @@ -301,14 +302,13 @@ export default { } if (isNeedCreate) { this.items.push(new KeyValue({ enable: true, id: getUUID(), type: 'CONSTANT', scope: 'api' })); + this.currentPage = Math.ceil(this.allData.length / this.pageSize); } // 需过滤数据 this.allData = []; this._filter(); - this.currentPage = Math.ceil(this.allData.length / this.pageSize); this.queryPage(); this.$emit('change', this.items); - // TODO 检查key重复 }, changeType(data) { data.value = '';