<input v-model="money" type="digit" @input="checkNum" placeholder="0" />
checkNum(e) {
e.detail.value = e.target.value.match(/^\d*(\.?\d{0,2})/g)[0];
this.$nextTick(function() {
try {
this.money = Number(e.detail.value);
} catch (e) {
uni.showToast({
title: '金额输入不正确!',
icon: 'none'
});
}
});
},