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 {
|
.steps-btns__display span {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
color: #adadad;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btns-style__steps button {
|
.btns-style__steps button {
|
||||||
|
|||||||
@@ -48,7 +48,7 @@
|
|||||||
<template v-for="(item, index) in PercentageGameSteps" :key="index">
|
<template v-for="(item, index) in PercentageGameSteps" :key="index">
|
||||||
<swiper-slide>
|
<swiper-slide>
|
||||||
<div class="steps-btns__display">
|
<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>
|
</div>
|
||||||
</swiper-slide>
|
</swiper-slide>
|
||||||
</template>
|
</template>
|
||||||
@@ -192,9 +192,10 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
stepsEndOfWord(index) {
|
stepsEndOfWord(index) {
|
||||||
let lastNumber = String(index)
|
const indexString = String(index)
|
||||||
if (index >= 10) {
|
let lastNumber = indexString
|
||||||
lastNumber = index.slice(1)
|
if (indexString >= 10) {
|
||||||
|
lastNumber = indexString.slice(1)
|
||||||
console.log(lastNumber)
|
console.log(lastNumber)
|
||||||
}
|
}
|
||||||
return this.checkLastNumber(lastNumber)
|
return this.checkLastNumber(lastNumber)
|
||||||
|
|||||||
Reference in New Issue
Block a user