You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
635 B
33 lines
635 B
|
10 months ago
|
import { defineStore } from "pinia";
|
||
|
|
import { ref } from "vue";
|
||
|
|
import { load } from "webfontloader";
|
||
|
|
|
||
|
|
export const commonStore = defineStore("common", () => {
|
||
|
|
const snackbarMsg = ref({ text: "", color: "", result: 200 });
|
||
|
|
|
||
|
|
const setSnackbarMsg = (data: {
|
||
|
|
result: number;
|
||
|
|
color: string;
|
||
|
|
text: string;
|
||
|
|
}) => {
|
||
|
|
snackbarMsg.value = data;
|
||
|
|
};
|
||
|
|
|
||
|
|
return {
|
||
|
|
snackbarMsg,
|
||
|
|
setSnackbarMsg,
|
||
|
|
};
|
||
|
|
});
|
||
|
|
|
||
|
|
export const loadingStore = defineStore("loading", () => {
|
||
|
|
const loading = ref(false);
|
||
|
|
const setLoading = (value: boolean) => {
|
||
|
|
loading.value = value;
|
||
|
|
};
|
||
|
|
|
||
|
|
return {
|
||
|
|
loading,
|
||
|
|
setLoading,
|
||
|
|
};
|
||
|
|
});
|