Browse Source

修复自动强化BUG

修复BUG:自动强化开启后,点击右上角叉叉并不会停止自动强化。
导致你接下来选择哪个装备就会自动强化哪个装备
v1.0
许孟阳 7 days ago
parent
commit
9b9dd1fb0a
  1. 1
      src/components/dialog.vue
  2. 7
      src/views/backpack/equip-menu.vue
  3. 8
      src/views/backpack/inherited.vue
  4. 2
      src/views/backpack/strengthen.vue

1
src/components/dialog.vue

@ -81,6 +81,7 @@ onMounted(() => { @@ -81,6 +81,7 @@ onMounted(() => {
document.addEventListener('keydown', (e) => {
if (e.keyCode == 27) {
show.value = false;
emit('close');
}
})
if (prop.obscured) {

7
src/views/backpack/equip-menu.vue

@ -11,13 +11,13 @@ @@ -11,13 +11,13 @@
</Dialog>
<Dialog :title="t('strengthen') + t('equip')" v-model="showStrengthen" top="5rem" left="2rem" padding="0" :z="11"
:obscured="true">
<Strengthen :equip="state.grid[index]" />
:obscured="true" @close="strengthen?.stopAuto()">
<Strengthen ref="strengthen" :equip="state.grid[index]" />
</Dialog>
<Dialog :title="t('equip') + t('inherited.0')" v-model="showInherited" :top="state.mobile ? '5rem' : '10rem'"
left="2rem" padding="0" :z="11" :obscured="true">
<Inherited :target="equip" :source="curEquip" @close="showInherited = false" />
<Inherited :target="equip" :source="curEquip" />
</Dialog>
</template>
@ -47,6 +47,7 @@ const curEquip = computed(() => { @@ -47,6 +47,7 @@ const curEquip = computed(() => {
}
return state.playerAttribute[equip.value.type];
})
const strengthen = ref();
defineExpose({ open })

8
src/views/backpack/inherited.vue

@ -77,6 +77,7 @@ import { computed, onMounted, ref } from "vue"; @@ -77,6 +77,7 @@ import { computed, onMounted, ref } from "vue";
import { useI18n } from "vue3-i18n";
import { strengthenAvgCoins, strengthenValue } from "@/tool";
import { EquipIcon, Confirm } from "@/components";
import { qualitys } from "@/config";
const { t } = useI18n();
@ -119,7 +120,12 @@ const confirmInherited = () => { @@ -119,7 +120,12 @@ const confirmInherited = () => {
emit('close');
}
onMounted(() => { });
onMounted(() => {
const need = strengthenAvgCoins(100, 13, qualitys[5]);
const used = strengthenAvgCoins(1, 13, qualitys[0]);
console.log(need - used);
});
</script>
<style lang="scss" scoped>
.inherited {

2
src/views/backpack/strengthen.vue

@ -121,6 +121,8 @@ const stopAuto = () => { @@ -121,6 +121,8 @@ const stopAuto = () => {
auto.value = false;
};
defineExpose({ stopAuto })
onMounted(() => { });
</script>
<style lang="scss" scoped>

Loading…
Cancel
Save