19 lines
479 B
JavaScript
19 lines
479 B
JavaScript
import { ref, computed } from "vue";
|
|
import { defineStore } from "pinia";
|
|
|
|
export const useAuthModal = defineStore("authModal", () => {
|
|
const isShow = ref(false);
|
|
const authModalType = ref('login');
|
|
function showAuthModal() {
|
|
isShow.value = true;
|
|
}
|
|
function hideAuthModal(){
|
|
isShow.value = false;
|
|
}
|
|
function setAuthModalType(type){
|
|
authModalType.value = type;
|
|
}
|
|
|
|
return { isShow, authModalType, showAuthModal, hideAuthModal, setAuthModalType };
|
|
});
|