new:添加誓约升级效果
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 2.1 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.0 KiB |
@@ -12,7 +12,7 @@
|
||||
label="全局修改"
|
||||
></calc-checkbox>
|
||||
</div>
|
||||
<div class="equ-profile-item">
|
||||
<div class="equ-profile-item" v-if="part !== '11'">
|
||||
<div class="row-name">调适</div>
|
||||
<calc-select v-model="adaptation" class="flex-1 !h-20px">
|
||||
<template v-for="i in Array.from({ length: 4 }, (_, i) => i)" :key="i">
|
||||
@@ -20,6 +20,20 @@
|
||||
</template>
|
||||
</calc-select>
|
||||
</div>
|
||||
<div class="equ-profile-item" v-else>
|
||||
<div class="row-name">誓约升级</div>
|
||||
<template v-for="i in Array.from({ length: 4 }, (_, i) => i)" :key="i">
|
||||
<calc-select
|
||||
:model-value="getOathUpgradeValue(i)"
|
||||
@update:model-value="setOathUpgradeValue(i, $event)"
|
||||
class="flex-1 !h-20px"
|
||||
>
|
||||
<calc-option :value="0">无</calc-option>
|
||||
<calc-option :value="1">技攻 +4%</calc-option>
|
||||
<calc-option :value="2">CD -8%</calc-option>
|
||||
</calc-select>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -36,7 +50,7 @@ const configStore = useConfigStore()
|
||||
const infoStore = useInfoStore()
|
||||
|
||||
const currentInfo = function <T>(name: string, defaultValue?: T) {
|
||||
return computed<string | number>({
|
||||
return computed<T>({
|
||||
get() {
|
||||
return (
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
@@ -74,4 +88,14 @@ const currentInfo = function <T>(name: string, defaultValue?: T) {
|
||||
|
||||
// 调适
|
||||
const adaptation = currentInfo<string | number>('adaptation')
|
||||
// 誓约升级
|
||||
const oath_upgrade = currentInfo<number[]>('upgrade', [0, 0, 0, 0])
|
||||
|
||||
const getOathUpgradeValue = (index: number) => oath_upgrade.value[index] ?? 0
|
||||
|
||||
const setOathUpgradeValue = (index: number, val: number) => {
|
||||
const nextUpgrade = [...oath_upgrade.value]
|
||||
nextUpgrade[index] = val
|
||||
oath_upgrade.value = nextUpgrade
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -203,9 +203,9 @@ const oathSuit = computed(() => {
|
||||
return props.suits.oath
|
||||
})
|
||||
|
||||
const correction = computed(() => {
|
||||
return props.suits.correction ?? 0
|
||||
})
|
||||
// const correction = computed(() => {
|
||||
// return props.suits.correction ?? 0
|
||||
// })
|
||||
|
||||
const changeSkillId = (skill: { skillId: string; enable: boolean }) => {
|
||||
// console.log(skill)
|
||||
|
||||
@@ -34,6 +34,7 @@ export interface IConfigEquip {
|
||||
export interface IConfigOath {
|
||||
id: string
|
||||
adaptation: number
|
||||
upgrade: number[]
|
||||
}
|
||||
|
||||
export interface IConfigEmblem {
|
||||
@@ -100,6 +101,7 @@ const defaultAvatarConfig = {
|
||||
const defaultOathConfig = {
|
||||
id: '',
|
||||
adaptation: 0,
|
||||
upgrade: [0, 0, 0, 0],
|
||||
}
|
||||
|
||||
const defaultEmblemConfig = {
|
||||
|
||||
Reference in New Issue
Block a user