修正佛前供灯bug
This commit is contained in:
@@ -85,8 +85,7 @@ export default {
|
|||||||
this.inputNickname = res.nickname;
|
this.inputNickname = res.nickname;
|
||||||
},
|
},
|
||||||
onMoneyInput(e){
|
onMoneyInput(e){
|
||||||
console.log(e.target.value)
|
this.number = e.target.value
|
||||||
this.number = this.money
|
|
||||||
},
|
},
|
||||||
changeMoney(){
|
changeMoney(){
|
||||||
const rand = Math.floor(Math.random() * this.randList.length);
|
const rand = Math.floor(Math.random() * this.randList.length);
|
||||||
|
|||||||
+2
-1
@@ -7,7 +7,8 @@ export default {
|
|||||||
numberOnly: {
|
numberOnly: {
|
||||||
bind: function(el) {
|
bind: function(el) {
|
||||||
el.handler = function() {
|
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)
|
el.addEventListener('input', el.handler)
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user