mirror of
https://github.com/jumpserver/lina.git
synced 2025-09-18 08:12:33 +00:00
fix: 修复更新资产时,其它资产协议丢失的问题
This commit is contained in:
@@ -90,10 +90,12 @@ export default {
|
||||
default: () => ([])
|
||||
},
|
||||
readonly: {
|
||||
// 这个是在详情中,不可编辑,包括所有
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
settingReadonly: {
|
||||
// 这个是在资产添加时设置协议使用,不能修改 setting
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
@@ -146,6 +148,11 @@ export default {
|
||||
},
|
||||
items: {
|
||||
handler(value) {
|
||||
if (this.settingReadonly) {
|
||||
value = value.map(i => {
|
||||
return { name: i.name, port: i.port }
|
||||
})
|
||||
}
|
||||
this.$emit('input', value)
|
||||
},
|
||||
immediate: true,
|
||||
|
@@ -152,6 +152,8 @@ export default {
|
||||
if (i.name === 'http') {
|
||||
i.display_name = 'http(s)'
|
||||
}
|
||||
// 这个不删除会导致时,把 platform id 提交成 asset 的
|
||||
delete i['id']
|
||||
return i
|
||||
})
|
||||
const protocolChoices = this.defaultConfig.fieldsMeta.protocols.el.choices
|
||||
|
Reference in New Issue
Block a user