16 lines
275 B
TypeScript
16 lines
275 B
TypeScript
import { defineStore } from "pinia";
|
|
|
|
export const useLoadingStore = defineStore("loading", {
|
|
state: () => ({
|
|
isLoading: false,
|
|
}),
|
|
actions: {
|
|
showLoading() {
|
|
this.isLoading = true;
|
|
},
|
|
hideLoading() {
|
|
this.isLoading = false;
|
|
},
|
|
},
|
|
});
|