This commit is contained in:
2025-04-05 13:00:16 +08:00
parent e2099aa047
commit da8e163322
20 changed files with 1843 additions and 15196 deletions
@@ -20,7 +20,7 @@ export default defineComponent({
)
})
const enchanting_list = computed<IEnchantingInfo[] | undefined>(() => {
const enchant_list = computed<IEnchantingInfo[] | undefined>(() => {
return basicInfoStore.enchants
?.filter((item) => item.position.includes(part.value))
.sort((a, b) => (b.fame ?? 0) - (a.fame ?? 0))
@@ -55,7 +55,7 @@ export default defineComponent({
}
// 附魔
const enchanting = currentInfo<string | number>('enchanting')
const enchant = currentInfo<string | number>('enchant')
// 镶嵌栏1
const emblem_0 = currentInfo<string | number>('emblem_0', 0)
@@ -92,9 +92,9 @@ export default defineComponent({
{has_enchant.value ? (
<div class="equ-profile-item">
<div class="row-name">{part.value == '宠物' ? '附魔' : '属性'}</div>
<calc-select v-model={enchanting.value} class="flex-1 !h-20px">
<calc-select v-model={enchant.value} class="flex-1 !h-20px">
<calc-option value={0}>无</calc-option>
{renderList(enchanting_list.value ?? [], (item) => (
{renderList(enchant_list.value ?? [], (item) => (
<calc-option value={item.id}>{item.detail}</calc-option>
))}
</calc-select>
@@ -24,7 +24,7 @@ export default defineComponent({
)
const basicInfoStore = useInfoStore()
const enchanting_list = computed<IEnchantingInfo[] | undefined>(() => {
const enchant_list = computed<IEnchantingInfo[] | undefined>(() => {
return basicInfoStore.enchants
?.filter(
(item) =>
@@ -62,7 +62,7 @@ export default defineComponent({
let parts: string[] = []
if (global_change.value) {
if (name === 'enchanting') {
if (name === 'enchant') {
const enchant = basicInfoStore?.enchants?.find((item) => item.id == val) as
| IEnchantingInfo
| undefined
@@ -96,7 +96,7 @@ export default defineComponent({
}
// 附魔
const enchanting = currentInfo<string | number>('enchanting')
const enchant = currentInfo<string | number>('enchant')
// 镶嵌栏1
const emblem_0 = currentInfo<string | number>('emblem_0', 0)
@@ -171,9 +171,9 @@ export default defineComponent({
)}
<div class="equ-profile-item">
<div class="row-name">附魔</div>
<calc-select v-model={enchanting.value} class="flex-1 !h-20px">
<calc-select v-model={enchant.value} class="flex-1 !h-20px">
<calc-option value={""}>无</calc-option>
{renderList(enchanting_list.value ?? [], (item) => (
{renderList(enchant_list.value ?? [], (item) => (
<calc-option value={item.id}>{item.detail}</calc-option>
))}
</calc-select>
@@ -0,0 +1,55 @@
<template>
<div>
<template v-for="key in ['0','1','2','3']" :key="key">
<div class="flex gap-2 mt-5px">
<calc-select class="flex-1 !h-20px" v-model="configStore.config.jades[key].id">
<calc-option v-for="(item, index) in ['0','1']" :key="index" :value="item">
{{item}}
</calc-option>
</calc-select>
<calc-select class="flex-1 !h-20px" v-model="configStore.config.jades[key].value"></calc-select>
</div>
</template>
</div>
</template>
<script setup lang="ts">
import { useConfigStore } from '@/stores'
import { useInfoStore } from '@/stores'
const configStore = useConfigStore()
const infoStore = useInfoStore()
// const valueList = computed(() => {
// return function (id: number = -1) {
// if (id == -1) {
// return undefined
// } else {
// const res = []
// const cur = infoStore.jade?.find(e => e.id == id) as IJadeInfo
// if (cur) {
// const { max, min, unit, pre } = cur
// //
// if (pre == 0) {
// res.push({
// id: 1,
// value: unit
// })
// } else {
// for (let i = Number(max) as number; i >= Number(min);) {
// if (i != 0) {
// res.push({
// id: getFloat(i, 1),
// value: (i > 0 ? "+" : "") + getFloat(i, 1) + unit
// })
// }
// i = Number((i - Number(pre)).toFixed(1))
// }
// }
// return res
// }
// }
// }
// }
// })
</script>
+5 -1
View File
@@ -1,5 +1,5 @@
<template>
<div class="w-400px">
<div class="w-420px">
<calc-collapse class="w-100%" title="装备/时装打造(点击部位切换)">
<calc-tabs v-model="partTab" class="!mb-2">
<calc-tab :value="0">装备栏</calc-tab>
@@ -8,11 +8,15 @@
<equipment v-if="partTab === 0"></equipment>
<clothes v-if="partTab === 1"></clothes>
</calc-collapse>
<calc-collapse class="w-100%" title="辟邪玉">
<jade></jade>
</calc-collapse>
</div>
</template>
<script setup lang="ts">
import equipment from './components/equipment.vue'
import clothes from './components/avatar.vue';
import jade from './components/jade.vue';
const partTab = ref(0)
</script>
+1 -2
View File
@@ -8,7 +8,7 @@
</calc-tabs>
</div>
<div class="content flex">
<div class="flex flex-1">
<div class="flex flex-1" v-if="!!infoStore.infos?.alter">
<RouterView></RouterView>
</div>
@@ -40,7 +40,6 @@ const stopWatch = watch<any>(
onMounted(async () => {
await infoStore.createCharacter(props.alter, '0')
configStore.loadConfig()
window.addEventListener('beforeunload', () => {
configStore.saveConfig()
})