0๐
โ
I think a nice solution would be to add a flag variable like
new Vue({
// ...
data: {
condition: false
}
})
and then update it where it is needed like:
vm.condition = true;
and in UI use this logic:
<modal :name="fruit" :opened="opened"
v-bind="{ closed: condition ? onComplete : onClose }">
Source:stackexchange.com