fix(项目设置): 修复删除环境变量会把空变量删除的缺陷

--bug=1033014 --user=王孝刚 【项目设置】项目环境-删除变量时-把空白输入框删除掉了
https://www.tapd.cn/55049933/s/1437743
This commit is contained in:
wxg0103 2023-11-17 15:29:35 +08:00 committed by wxg0103
parent d83177ebbf
commit 488ed0fa90
1 changed files with 9 additions and 4 deletions

View File

@ -256,13 +256,18 @@ export default {
methods: {
remove: function (index) {
const dataIndex = this.pageData.findIndex((d) => d.name === index.name);
if (dataIndex !== -1) {
this.pageData.splice(dataIndex, 1);
}
const allDataIndex = this.allData.findIndex((d) => d.name === index.name);
if (allDataIndex !== -1) {
this.allData.splice(allDataIndex, 1);
}
const itemsIndex = this.items.findIndex((d) => d.name === index.name);
if (itemsIndex !== -1) {
this.items.splice(itemsIndex, 1);
}
this.sortParameters();
this.queryPage();
},