loader plugin

This commit is contained in:
Thanit Konmek 2023-06-06 20:33:39 +07:00
parent 9be531bd01
commit 28557e07aa
2 changed files with 22 additions and 1 deletions

View file

@ -1,6 +1,7 @@
import { defineStore } from "pinia";
import moment from "moment";
import CustomComponent from "@/components/CustomDialog.vue";
import { Loading, QSpinnerCube } from "quasar";
export const useCounterMixin = defineStore("mixin", () => {
/**
@ -408,6 +409,20 @@ export const useCounterMixin = defineStore("mixin", () => {
});
};
const showLoader = () => {
Loading.show({
spinner: QSpinnerCube,
spinnerSize: 140,
spinnerColor: "primary",
backgroundColor: "white",
});
};
const hideLoader = () => {
// q.loading.hide();
Loading.hide();
};
function modalDelete(
q: any,
title: string,
@ -615,5 +630,7 @@ export const useCounterMixin = defineStore("mixin", () => {
modalError,
dialogMessage,
messageError,
showLoader,
hideLoader,
};
});