<input type="digit" v-model="rechargeMoney" @input="inputChange" />
inputChange(e){
var that = this
e.target.value = (e.target.value.match(/^\d*(\.?\d{0,2})/g)[0]) || null
this.$nextTick(() => {
that.rechargeMoney= e.target.value
})
}
input保留两位小数
于 2023-02-07 10:44:34 首次发布