mirror of
https://github.com/yawaflua/LuckyDiamond.git
synced 2025-12-10 12:19:31 +02:00
fixed bug with index type
This commit is contained in:
@@ -237,6 +237,7 @@ input[type="number"]::-webkit-outer-spin-button {
|
||||
|
||||
.steps-btns__display span {
|
||||
display: flex;
|
||||
color: #adadad;
|
||||
}
|
||||
|
||||
.btns-style__steps button {
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
<template v-for="(item, index) in PercentageGameSteps" :key="index">
|
||||
<swiper-slide>
|
||||
<div class="steps-btns__display">
|
||||
<button>{{ item.toFixed(2) }} <span>{{ index + 1 }} {{ stepsEndOfWord(index) }}</span></button>
|
||||
<button>x{{ item.toFixed(2) }} <span>{{ index + 1 }} {{ stepsEndOfWord(index + 1) }}</span></button>
|
||||
</div>
|
||||
</swiper-slide>
|
||||
</template>
|
||||
@@ -192,9 +192,10 @@ export default {
|
||||
}
|
||||
},
|
||||
stepsEndOfWord(index) {
|
||||
let lastNumber = String(index)
|
||||
if (index >= 10) {
|
||||
lastNumber = index.slice(1)
|
||||
const indexString = String(index)
|
||||
let lastNumber = indexString
|
||||
if (indexString >= 10) {
|
||||
lastNumber = indexString.slice(1)
|
||||
console.log(lastNumber)
|
||||
}
|
||||
return this.checkLastNumber(lastNumber)
|
||||
|
||||
Reference in New Issue
Block a user