This commit is contained in:
2025-05-15 23:15:57 +08:00
parent 723ceb5f6f
commit 900d8e8560
86 changed files with 2350 additions and 1905 deletions
+16 -10
View File
@@ -26,26 +26,31 @@ export const useInfoStore = defineStore('infoStore', () => {
const sundries = computed(() => infos.value?.sundry ?? {})
const options = computed(() => infos.value?.options ?? [])
const standardUUID = ref<string>()
const setStandard = (result?: IResult,skillCount?:{
count: number;
mode: string;
name: string;
}[]) => {
const setStandard = (
result?: IResult,
skillCount?: {
count: number
mode: string
name: string
}[],
) => {
if (!result) {
!!standardUUID.value && sessionStorage.removeItem(standardUUID.value)
standardUUID.value = undefined
} else {
standardUUID.value = result.uuid
sessionStorage.setItem(result.uuid, JSON.stringify({skills:result.skills,skillCount}))
sessionStorage.setItem(result.uuid, JSON.stringify({ skills: result.skills, skillCount }))
}
}
const standard = computed(()=>{
const standard = computed(() => {
const value = sessionStorage.getItem(standardUUID.value ?? '')
if(!value) return undefined
else return JSON.parse(value) as {skills:IResultSkill[],skillCount:IResultSkillCount[]}
if (!value) return undefined
else return JSON.parse(value) as { skills: IResultSkill[]; skillCount: IResultSkillCount[] }
})
const parts = [
@@ -107,6 +112,7 @@ export const useInfoStore = defineStore('infoStore', () => {
jades,
setStandard,
standard,
sundries
sundries,
options
}
})