mirror of
https://github.com/harvester/harvester-ui-extension.git
synced 2025-12-13 21:21:44 +00:00
refactor: rewrite with emit pattern
Signed-off-by: Yi-Ya Chen <yiya.chen@suse.com>
This commit is contained in:
parent
a207ec078b
commit
4d48e75447
@ -29,7 +29,7 @@ import SSHKey from './kubevirt.io.virtualmachine/VirtualMachineSSHKey';
|
|||||||
export default {
|
export default {
|
||||||
name: 'HarvesterEditVMTemplate',
|
name: 'HarvesterEditVMTemplate',
|
||||||
|
|
||||||
emits: ['update:value'],
|
emits: ['update:templateValue'],
|
||||||
|
|
||||||
components: {
|
components: {
|
||||||
Tab,
|
Tab,
|
||||||
@ -206,11 +206,6 @@ export default {
|
|||||||
this.$refs.yamlEditor?.refresh();
|
this.$refs.yamlEditor?.refresh();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
updateNameNsDescriptionValue(newValue) {
|
|
||||||
this.templateValue.metadata.name = newValue.metadata.name;
|
|
||||||
this.templateValue.metadata.namespace = newValue.metadata.namespace;
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
@ -227,11 +222,11 @@ export default {
|
|||||||
@finish="saveVMT"
|
@finish="saveVMT"
|
||||||
>
|
>
|
||||||
<NameNsDescription
|
<NameNsDescription
|
||||||
:value="value"
|
:value="templateValue"
|
||||||
:mode="realTemplateMode"
|
:mode="realTemplateMode"
|
||||||
name-label="harvester.vmTemplate.nameNsDescription.name"
|
name-label="harvester.vmTemplate.nameNsDescription.name"
|
||||||
:namespaced="true"
|
:namespaced="true"
|
||||||
@update:value="updateNameNsDescriptionValue"
|
@update:value="$emit('update:templateValue', $event)"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<Checkbox
|
<Checkbox
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user