ui: Allow editing VM and template settings (#6262)

This commit is contained in:
Pearl Dsilva 2022-04-14 14:07:30 +05:30 committed by GitHub
parent a1fb44e41f
commit 05c907b3a8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -73,7 +73,7 @@
<a-auto-complete <a-auto-complete
style="width: 100%" style="width: 100%"
v-model:value="item.value" v-model:value="item.value"
:options="detailOptions[item.name]" :options="getDetailOptions(detailOptions[item.name])"
@change="val => handleInputChange(val, index)" @change="val => handleInputChange(val, index)"
@pressEnter="e => updateDetail(index)" /> @pressEnter="e => updateDetail(index)" />
<tooltip-button <tooltip-button
@ -224,6 +224,13 @@ export default {
handleInputChange (val, index) { handleInputChange (val, index) {
this.details[index].value = val this.details[index].value = val
}, },
getDetailOptions (values) {
if (!values) {
return
}
var data = values.map(value => { return { value: value } })
return data
},
onAddInputChange (val, obj) { onAddInputChange (val, obj) {
this.error = false this.error = false
this[obj] = val this[obj] = val