dev
This commit is contained in:
@@ -1,39 +1,37 @@
|
||||
<template>
|
||||
<div>
|
||||
<calc-collapse class="w-40%" title="装备打造(点击人物部位切换)">
|
||||
<equipment />
|
||||
</calc-collapse>
|
||||
</div>
|
||||
|
||||
<div class="w-300px">
|
||||
<calc-collapse class="w-100%" title="装备打造(点击人物部位切换)">
|
||||
<equipment />
|
||||
</calc-collapse>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import equipment from './components/equipment.vue'
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.equ-profile{
|
||||
.equ-profile {
|
||||
width: 100%;
|
||||
.equ-profile-item {
|
||||
width: 100%;
|
||||
height: 20px;
|
||||
display: flex;
|
||||
margin-top: 5px;
|
||||
margin-bottom: 5px;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
height: 20px;
|
||||
display: flex;
|
||||
margin-top: 5px;
|
||||
margin-bottom: 5px;
|
||||
align-items: center;
|
||||
|
||||
.row-name {
|
||||
flex: 0 0 50px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
:not(:last-child) {
|
||||
margin-right: 10px !important;
|
||||
}
|
||||
|
||||
.i-select-label {
|
||||
margin-right: 0px !important;
|
||||
}
|
||||
.row-name {
|
||||
flex: 0 0 50px;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
:not(:last-child) {
|
||||
margin-right: 10px !important;
|
||||
}
|
||||
|
||||
.i-select-label {
|
||||
margin-right: 0px !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -8,7 +8,13 @@
|
||||
</calc-tabs>
|
||||
</div>
|
||||
<div class="content flex">
|
||||
<RouterView></RouterView>
|
||||
<div class="flex flex-1">
|
||||
<RouterView></RouterView>
|
||||
</div>
|
||||
|
||||
<div class="w-40%">
|
||||
<Result></Result>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -16,26 +22,19 @@
|
||||
<script lang="ts" setup name="Index">
|
||||
import { useInfoStore } from '@/stores/info'
|
||||
import { useConfigStore } from '@/stores'
|
||||
import Result from './Result/Index.vue'
|
||||
const props = defineProps<{
|
||||
alter: string
|
||||
}>()
|
||||
const infoStore = useInfoStore()
|
||||
const configStore = useConfigStore()
|
||||
|
||||
const result = useAsyncState(
|
||||
() => {
|
||||
return configStore.calc()
|
||||
},
|
||||
{},
|
||||
{ resetOnExecute: false },
|
||||
)
|
||||
|
||||
const stopWatch = watch<any>(
|
||||
() => {
|
||||
return JSON.stringify(configStore.config)
|
||||
},
|
||||
useDebounceFn(async () => {
|
||||
await result.execute()
|
||||
;(await configStore.result).execute()
|
||||
}, 800),
|
||||
)
|
||||
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
<template>
|
||||
<div class="flex" v-if="configStore.result.state">
|
||||
<Info></Info>
|
||||
<Skill :data="configStore.result.state.skills"></Skill>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { useConfigStore } from '@/stores';
|
||||
import Info from './components/Info.vue';
|
||||
import Skill from './components/Skill.vue';
|
||||
|
||||
const configStore = useConfigStore();
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,8 @@
|
||||
<template></template>
|
||||
|
||||
<script setup lang="ts" name="Info">
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
</style>
|
||||
@@ -0,0 +1,26 @@
|
||||
<template>
|
||||
<div class="flex flex-col" v-if="data && data.length > 0">
|
||||
<div class="flex gap-2 text-white items-center" v-for="skill in data" :key="skill.name">
|
||||
<div>
|
||||
<img :src="getImageURL(skill.icon)" alt="" class="w-8 h-8" />
|
||||
</div>
|
||||
<div>{{ skill.name }}</div>
|
||||
<div>{{ skill.lv }}</div>
|
||||
<div>{{ skill.damage.toFixed(0) }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts" name="Skill">
|
||||
import type { IResultSkill } from '@/api/calc/type'
|
||||
import { getImageURL } from '@/utils/images'
|
||||
const props = defineProps<{
|
||||
data: IResultSkill[]
|
||||
}>()
|
||||
|
||||
const data = computed(() => {
|
||||
return props.data.sort((a,b)=>b.damage - a.damage)
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
||||
Reference in New Issue
Block a user