fix:修复星蕴石错误

This commit is contained in:
2026-06-10 11:56:59 +08:00
parent 6be3c1ceee
commit 2ba6599543
2 changed files with 6 additions and 11 deletions
@@ -6,11 +6,11 @@
<div class="equ-profile-item">
<div class="mr-10px row-name">当前部位</div>
<span>{{ part == '11' ? '誓约' : `星蕴石-${parseInt(part) + 1}` }}</span>
<calc-checkbox
<!-- <calc-checkbox
style="margin-left: auto"
v-model="global_change"
label="全局修改"
></calc-checkbox>
></calc-checkbox> -->
</div>
<div class="equ-profile-item" v-if="part !== '11'">
<div class="row-name">调适</div>
@@ -39,15 +39,15 @@
<script lang="ts" setup name="Oaths">
import Oath from '@/components/dnf/Equipment/Oath/index.vue'
import { useConfigStore, useInfoStore } from '@/stores'
import { useConfigStore } from '@/stores'
const part = ref('0')
const global_change = ref(false)
// const global_change = ref(false)
const configStore = useConfigStore()
const infoStore = useInfoStore()
// const infoStore = useInfoStore()
const currentInfo = function <T>(name: string, defaultValue?: T) {
return computed<T>({
@@ -66,13 +66,8 @@ const currentInfo = function <T>(name: string, defaultValue?: T) {
// return
// }
let parts: string[] = []
const parts: string[] = [part.value]
if (global_change.value) {
parts = infoStore.oathParts
} else {
parts = [part.value]
}
for (const part of parts) {
if (!configStore.config.oaths[part]) {
configStore.config.oaths[part] = { ...configStore.defaultOathConfig }