code scanner

This commit is contained in:
Julian Krauser 2025-03-24 16:18:23 +01:00
parent 2b3231e26c
commit 2a77a950f5
9 changed files with 312 additions and 91 deletions

View file

@ -4,19 +4,22 @@ export const useModalStore = defineStore("modal", {
state: () => {
return {
show: false,
component_ref: null as any,
data: null as any,
component_ref: undefined as any,
data: undefined as any,
callback: undefined as undefined | Function,
};
},
actions: {
openModal(component_ref: any, data?: any) {
openModal(component_ref: any, data?: any, callback?: Function) {
this.component_ref = component_ref;
this.data = data;
this.callback = callback;
this.show = true;
},
closeModal() {
this.component_ref = null;
this.data = null;
this.component_ref = undefined;
this.data = undefined;
this.callback = undefined;
this.show = false;
},
},