Clean up code

This commit is contained in:
Ramon Wenger 2020-03-25 13:10:46 +01:00
parent 32e3c6067b
commit 6082d37177
1 changed files with 1 additions and 16 deletions

View File

@ -7,11 +7,7 @@ class ModalStore {
this.vm = new Vue({ this.vm = new Vue({
data: () => ({ data: () => ({
component: '', component: '',
payload: {}, payload: {}
_resolve: () => {
},
_reject: () => {
}
}) })
}); });
} }
@ -19,25 +15,15 @@ class ModalStore {
get state() { get state() {
return this.vm.$data; return this.vm.$data;
} }
// set component(c) {
// console.log(c);
// this.vm.$data.component = c;
// }
} }
const ModalPlugin = { const ModalPlugin = {
// Store: ModalStore,
install(Vue, options) { install(Vue, options) {
const store = new ModalStore({}); const store = new ModalStore({});
const reset = () => { const reset = () => {
store.state.component = ''; store.state.component = '';
store.state.payload = {}; store.state.payload = {};
store.state._resolve = () => {
};
store.state._reject = () => {
};
}; };
Vue.prototype.$modal = { Vue.prototype.$modal = {
@ -64,7 +50,6 @@ const ModalPlugin = {
}, },
_reject: () => { _reject: () => {
}, },
}; };
} }
}; };