mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-18 22:44:29 +01:00
fix exponent numbers in contribution amounts
This commit is contained in:
@@ -50,20 +50,31 @@ addLoadEvent(function (ev) {
|
||||
return;
|
||||
}
|
||||
|
||||
eventAggregator.$emit("contribute", {amount: this.amount, choiceKey: this.perk.id});
|
||||
eventAggregator.$emit("contribute", {amount: parseFloat(this.amount), choiceKey: this.perk.id});
|
||||
},
|
||||
expand: function(){
|
||||
if(this.canExpand){
|
||||
this.expanded = true;
|
||||
}
|
||||
},
|
||||
setAmount: function (amount) {
|
||||
this.amount = (amount || 0).noExponents();
|
||||
this.expanded = false;
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
mounted: function(){
|
||||
this.amount = this.perk.price.value;
|
||||
|
||||
mounted: function () {
|
||||
this.setAmount(this.perk.price.value);
|
||||
},
|
||||
watch: {
|
||||
perk: function (newValue, oldValue) {
|
||||
if (newValue.price.value != oldValue.price.value) {
|
||||
this.setAmount(newValue.price.value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
app = new Vue({
|
||||
|
||||
Reference in New Issue
Block a user