mirror of
https://github.com/yawaflua/LuckyDiamond.git
synced 2025-12-10 04:09:29 +02:00
added event-listener click for crystals amount in sapergame
This commit is contained in:
@@ -20,7 +20,7 @@
|
|||||||
<input v-model="amountCrystals" type="number">
|
<input v-model="amountCrystals" type="number">
|
||||||
<ul class="crystals-btns__display">
|
<ul class="crystals-btns__display">
|
||||||
<li v-for="(item, index) in SaperNumbers" :key="index">
|
<li v-for="(item, index) in SaperNumbers" :key="index">
|
||||||
<button v-if="item.crystals !== undefined">{{ item.crystals }}</button>
|
<button @click="clickedBtnCrystals(index, item.crystals)" :class="{ 'btn-click': clickedBtnCrystal === index, [index]: clickedBtnCrystal === index }" :id="item.crystals === 'max' ? 'max-button' : null" v-if="item.crystals !== undefined">{{ item.crystals }}</button>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
@@ -151,10 +151,12 @@ export default {
|
|||||||
return {
|
return {
|
||||||
SaperNumbers,
|
SaperNumbers,
|
||||||
clickedBtn: '',
|
clickedBtn: '',
|
||||||
|
clickedBtnCrystal : '',
|
||||||
amountCrystals: 5,
|
amountCrystals: 5,
|
||||||
balance: 1000,
|
balance: 1000,
|
||||||
amountDeposit: 5,
|
amountDeposit: 5,
|
||||||
flippedCards: [],
|
flippedCards: [],
|
||||||
|
|
||||||
modules: [ Pagination ]
|
modules: [ Pagination ]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -175,7 +177,11 @@ export default {
|
|||||||
else {
|
else {
|
||||||
this.amountDeposit = content
|
this.amountDeposit = content
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
clickedBtnCrystals(index, content) {
|
||||||
|
this.clickedBtnCrystal = index
|
||||||
|
this.amountCrystals = content
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user