Files
super_video/src/stores/modules/interview.ts
T

47 lines
1.1 KiB
TypeScript

import { defineStore } from 'pinia'
import { ref } from 'vue'
/**
* I store - manages Interview information
*/
export const useInterviewStore = defineStore(
'Interview',
() => {
//State
//Interview-任务取景框引导
const isGuideInterviewTask = ref<boolean>(true)
//Interview-是否解锁完成前置(观看视频)
const isInterviewUnlock = ref<boolean>(false)
//Interview-发现与记录解锁进度
const InterviewUnlockProgress = ref<number>(0)
//Actions
function setIsGuideInterviewTask(value: boolean): void {
isGuideInterviewTask.value = value
}
function setIsInterviewUnlock(value: boolean): void {
isInterviewUnlock.value = value
}
function setInterviewUnlockProgress(value: number): void {
InterviewUnlockProgress.value = value
}
return {
//State
setIsGuideInterviewTask,
setIsInterviewUnlock,
setInterviewUnlockProgress,
//Actions
isGuideInterviewTask,
isInterviewUnlock,
InterviewUnlockProgress
}
},
{
persist: true
}
)