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:
@@ -53,6 +53,7 @@ async function onSubmit() {
|
||||
|
||||
defineExpose({
|
||||
async open(g = null) {
|
||||
g = g ? JSON.parse(JSON.stringify(g)) : null; // make a copy
|
||||
group.value = g;
|
||||
name.value = g ? g.name : '';
|
||||
formError.value = {};
|
||||
|
||||
Reference in New Issue
Block a user