5.6租赁正则修改

This commit is contained in:
FrancisHu 2024-05-06 15:57:24 +08:00
parent 5210a1b496
commit c76df2aded
2 changed files with 6 additions and 8 deletions

View File

@ -95,14 +95,14 @@
upperInfo: [], upperInfo: [],
userId: '', userId: '',
manageType: '', manageType: '',
taskId: '' taskId: '',
intReg: /^\+?[0-9]\d*$/
} }
}, },
methods: { methods: {
okChange (e, index) { okChange (e, index) {
console.log(e, index); console.log(e, index);
let intReg = /^\+?[0-9]\d*$/ if (!this.intReg.test(e)) {
if (!intReg.test(e)) {
this.upperInfo[index].okNum = 1 this.upperInfo[index].okNum = 1
uni.showToast({ uni.showToast({
icon: 'none', icon: 'none',
@ -112,8 +112,7 @@
}, },
reChange (e, index) { reChange (e, index) {
console.log(e, index); console.log(e, index);
let intReg = /^\+?[0-9]\d*$/ if (!this.intReg.test(e)) {
if (!intReg.test(e)) {
this.upperInfo[index].reNum = 1 this.upperInfo[index].reNum = 1
uni.showToast({ uni.showToast({
icon: 'none', icon: 'none',
@ -123,8 +122,7 @@
}, },
crashChange (e, index) { crashChange (e, index) {
console.log(e, index); console.log(e, index);
let intReg = /^\+?[0-9]\d*$/ if (!this.intReg.test(e)) {
if (!intReg.test(e)) {
this.upperInfo[index].crashNum = 1 this.upperInfo[index].crashNum = 1
uni.showToast({ uni.showToast({
icon: 'none', icon: 'none',

File diff suppressed because one or more lines are too long