银行卡号4位后自动加空格,可删除空格
let cardNumber1 = e.detail.value.replace(/[^\d]/g, '')
let cardNumber = cardNumber1.replace(/(.{4})/g, "$1 ")
if (cardNumber.substr(cardNumber.length - 1) === ' ') {
cardNumber = cardNumber.substr(0, cardNumber.length - 1)
}
let cardNumber1 = e.detail.value.replace(/[^\d]/g, '')
let cardNumber = cardNumber1.replace(/(.{4})/g, "$1 ")
if (cardNumber.substr(cardNumber.length - 1) === ' ') {
cardNumber = cardNumber.substr(0, cardNumber.length - 1)
}