pass a copy when opening dialog
otherwise, any changes the dialog makes will reflect in the calling view's object
This commit is contained in:
@@ -85,6 +85,7 @@ async function onSubmit() {
|
||||
|
||||
defineExpose({
|
||||
async open(m = null) {
|
||||
m = m ? JSON.parse(JSON.stringify(m)) : null; // make a copy
|
||||
busy.value = false;
|
||||
formError.value = '';
|
||||
mailbox.value = m;
|
||||
@@ -92,7 +93,7 @@ defineExpose({
|
||||
name.value = m ? m.name : '';
|
||||
domain.value = m ? m.domain : props.domains[0].domain;
|
||||
ownerId.value = m ? m.ownerId : '';
|
||||
aliases.value = m ? JSON.parse(JSON.stringify(m.aliases)) : [];
|
||||
aliases.value = m ? m.aliases : [];
|
||||
active.value = m ? m.active : true;
|
||||
enablePop3.value = m ? m.enablePop3 : false;
|
||||
storageQuotaEnabled.value = m && m.storageQuota ? true : false;
|
||||
|
||||
Reference in New Issue
Block a user