کار اولیه
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
import { defineStore } from "pinia";
|
||||
import { ref } from "vue";
|
||||
|
||||
export const useCommonStore = defineStore("commonStore", () => {
|
||||
const sidebarOpen = ref(false);
|
||||
|
||||
function toggleSidebar() {
|
||||
sidebarOpen.value = !sidebarOpen.value;
|
||||
}
|
||||
|
||||
function closeSidebar() {
|
||||
sidebarOpen.value = false;
|
||||
}
|
||||
|
||||
function openSidebar() {
|
||||
sidebarOpen.value = true;
|
||||
}
|
||||
|
||||
return {
|
||||
sidebarOpen,
|
||||
toggleSidebar,
|
||||
closeSidebar,
|
||||
openSidebar,
|
||||
};
|
||||
});
|
||||
Reference in New Issue
Block a user