mirror of
https://github.com/yawaflua/LuckyDiamond.git
synced 2025-12-10 04:09:29 +02:00
added method for vision step
This commit is contained in:
@@ -47,7 +47,8 @@
|
||||
<swiper v-if="PercentageGameSteps.length" :key="PercentageGameSteps[0]" :spaceBetween="0" :slides-per-view="4" :centeredSlides="false" :pagination="{ clickable: true }" :modules="modules">
|
||||
<template v-for="(item, index) in PercentageGameSteps" :key="index">
|
||||
<swiper-slide>
|
||||
<button class="steps-btns__display">{{ item.toFixed(3) }}</button>
|
||||
<button class="steps-btns__display">{{ item.toFixed(2) }}</button>
|
||||
<h2>{{ index }} {{ checkLastNumber(index) }}</h2>
|
||||
</swiper-slide>
|
||||
</template>
|
||||
</swiper>
|
||||
@@ -189,6 +190,28 @@ export default {
|
||||
this.flippedCards.push(index);
|
||||
}
|
||||
},
|
||||
stepsEndOfWord(index) {
|
||||
let lastNumber = index
|
||||
if (index >= 10) {
|
||||
lastNumber = index.slice(1)
|
||||
console.log(lastNumber)
|
||||
}
|
||||
return this.checkLastNumber(lastNumber)
|
||||
},
|
||||
checkLastNumber(number) {
|
||||
let word = ''
|
||||
if (number === 1) {
|
||||
word = 'шаг'
|
||||
}
|
||||
else if (number.includes([2, 3, 4])) {
|
||||
word = 'шага'
|
||||
}
|
||||
else {
|
||||
word = 'шагов'
|
||||
}
|
||||
console.log(word)
|
||||
return word
|
||||
},
|
||||
clickedBtnChoice(index, content) {
|
||||
this.clickedBtn = index
|
||||
if (content === 'max') {
|
||||
|
||||
Reference in New Issue
Block a user