parent
ceb07bf033
commit
839d650845
File diff suppressed because it is too large
Load Diff
@ -1,18 +1,27 @@
|
||||
import { mapActions } from "vuex";
|
||||
// import $_color from "@Global/utils/module-color";
|
||||
import Vue from 'vue';
|
||||
// import { mapActions } from "vuex";
|
||||
// // import $_color from "@Global/utils/module-color";
|
||||
// import backHome from "./backHome";
|
||||
|
||||
const modal = {
|
||||
...mapActions("modal", [
|
||||
"__openModal",
|
||||
"$_closeModal"
|
||||
]),
|
||||
$_openModal(name, data = {}) {
|
||||
this.__openModal({ ...data, ...{ name } })
|
||||
},
|
||||
};
|
||||
// import Vue from 'vue';
|
||||
|
||||
// const modal = {
|
||||
// ...mapActions("modal", [
|
||||
// "__openModal",
|
||||
// "$_closeModal"
|
||||
// ]),
|
||||
// $_openModal(name, data = {}) {
|
||||
// this.__openModal({ ...data, ...{ name } })
|
||||
// },
|
||||
// };
|
||||
|
||||
Vue.mixin({
|
||||
methods: { ...modal }
|
||||
});
|
||||
// Vue.mixin({
|
||||
// methods: { ...modal, ...backHome }
|
||||
// });
|
||||
import { $_closeModal, $_openModal } from './modal';
|
||||
export default {
|
||||
methods: {
|
||||
$_openModal,
|
||||
$_closeModal,
|
||||
},
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,20 @@
|
||||
function $_openModal(name, data = {}) {
|
||||
this.$store.dispatch('modal/__openModal', { ...data, ...{ name } });
|
||||
// this.$store.dispatch('modal/$_closeModal');
|
||||
// const modal = {
|
||||
// ...mapActions("modal", [
|
||||
// "__openModal",
|
||||
// "$_closeModal"
|
||||
// ]),
|
||||
// $_openModal(name, data = {}) {
|
||||
// this.__openModal({ ...data, ...{ name } })
|
||||
// },
|
||||
// };
|
||||
}
|
||||
function $_closeModal() {
|
||||
this.$store.dispatch('modal/$_closeModal');
|
||||
}
|
||||
export {
|
||||
$_openModal,
|
||||
$_closeModal
|
||||
}
|
Loading…
Reference in new issue