dev
This commit is contained in:
@@ -47,6 +47,9 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
let key: 'avatar' | 'equips' = 'avatar'
|
let key: 'avatar' | 'equips' = 'avatar'
|
||||||
if (part.value == '宠物') key = 'equips'
|
if (part.value == '宠物') key = 'equips'
|
||||||
|
if (!configStore.config[key][part.value]) {
|
||||||
|
configStore.config[key][part.value] = key === 'avatar' ? { ...configStore.defaultAvatarConfig } : { ...configStore.defaultEqusConfig }
|
||||||
|
}
|
||||||
if (configStore.config[key][part.value]) {
|
if (configStore.config[key][part.value]) {
|
||||||
;(configStore.config[key][part.value] as Record<string, any>)[name] = val
|
;(configStore.config[key][part.value] as Record<string, any>)[name] = val
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -92,6 +92,9 @@ export default defineComponent({
|
|||||||
parts = [part.value]
|
parts = [part.value]
|
||||||
}
|
}
|
||||||
for (const part of parts) {
|
for (const part of parts) {
|
||||||
|
if (!configStore.config.equips[part]) {
|
||||||
|
configStore.config.equips[part] = { ...configStore.defaultEqusConfig }
|
||||||
|
}
|
||||||
if (configStore.config.equips[part]) {
|
if (configStore.config.equips[part]) {
|
||||||
;(configStore.config.equips[part] as Record<string, any>)[name] = val
|
;(configStore.config.equips[part] as Record<string, any>)[name] = val
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -233,5 +233,7 @@ export const useConfigStore = defineStore('configStore', () => {
|
|||||||
result,
|
result,
|
||||||
chooseEqu,
|
chooseEqu,
|
||||||
skillCountConfig,
|
skillCountConfig,
|
||||||
|
defaultEqusConfig,
|
||||||
|
defaultAvatarConfig,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user