修正佛前供灯bug

This commit is contained in:
2022-03-09 16:07:28 +08:00
parent 98fa458f00
commit a9d5edeecb
2 changed files with 3 additions and 3 deletions
+1 -2
View File
@@ -85,8 +85,7 @@ export default {
this.inputNickname = res.nickname;
},
onMoneyInput(e){
console.log(e.target.value)
this.number = this.money
this.number = e.target.value
},
changeMoney(){
const rand = Math.floor(Math.random() * this.randList.length);
+2 -1
View File
@@ -7,7 +7,8 @@ export default {
numberOnly: {
bind: function(el) {
el.handler = function() {
el.value = el.value.replace(/\D+/, '')
// el.value = el.value.replace(/\D+/, '')
el.value = el.value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')
}
el.addEventListener('input', el.handler)
},