This commit is contained in:
2026-04-20 02:00:30 +08:00
parent 02d5f80f4c
commit 34697d25c8
23 changed files with 207 additions and 16 deletions
+24
View File
@@ -45,6 +45,29 @@ export const useInfoStore = defineStore('infoStore', () => {
return result
})
const oathSkills = computed(() => {
const origin = infos.value?.oaths_skills
if (!origin) return origin
const skillOrder = ['2', '1', '3']
return Object.fromEntries(
Object.entries(origin).map(([key, value]) => [
key,
{
...value,
skills: [...value.skills].sort((left, right) => {
const leftIndex = skillOrder.indexOf(left.skillId)
const rightIndex = skillOrder.indexOf(right.skillId)
const normalizedLeftIndex = leftIndex === -1 ? skillOrder.length : leftIndex
const normalizedRightIndex = rightIndex === -1 ? skillOrder.length : rightIndex
return normalizedLeftIndex - normalizedRightIndex
}),
},
]),
)
})
const standardUUID = ref<string>()
const setStandard = (
@@ -139,5 +162,6 @@ export const useInfoStore = defineStore('infoStore', () => {
standard,
sundries,
options,
oathSkills,
}
})