Skip to content

Commit

Permalink
fix: GSEKit ip选择器变量切ip选择器后无法正常操作问题修复 --story=121335817
Browse files Browse the repository at this point in the history
# Reviewed, transaction id: 27456
  • Loading branch information
ywywZhou committed Dec 23, 2024
1 parent 97cbdfb commit 99699a6
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -658,9 +658,10 @@
},
// 变量类型切换
onValTypeChange (val, oldValue) {
// 将上一个类型的填写的数据存起来("集群模块IP选择器"的code与"ip选择器"code相同,需要单独处理)
const valData = oldValue === 'set_module_ip_selector'
? { set_module_ip_selector: tools.deepClone(this.renderData['ip_selector']) }
// 将上一个类型的填写的数据存起来("集群模块IP选择器"和"GSEKit IP选择器"的code与"ip选择器"code相同,需要单独处理)
const sameIpSelectorCode = ['set_module_ip_selector', 'gse_kit_ip_selector']
const valData = sameIpSelectorCode.includes(oldValue)
? { [oldValue]: tools.deepClone(this.renderData['ip_selector']) }
: tools.deepClone(this.renderData)
Object.assign(this.varTypeData, valData)
// 将input textarea类型正则存起来
Expand All @@ -677,7 +678,7 @@
})
if (val in this.varTypeData) {
const value = this.varTypeData[val]
this.renderData = { [val === 'set_module_ip_selector' ? 'ip_selector' : val]: value }
this.renderData = { [sameIpSelectorCode.includes(val) ? 'ip_selector' : val]: value }
} else {
this.renderData = {}
}
Expand Down

0 comments on commit 99699a6

Please sign in to comment.