代码调整

This commit is contained in:
joylink_cuiweidong 2022-05-16 18:23:44 +08:00
parent 9a3a4242fc
commit 6e9ca25459

View File

@ -118,7 +118,7 @@ export default {
const figuresOfServiceMaxNumber = 6;
// this.$store.state.map.mapConfig.figuresOfServiceNumber;
const tripNumber = this.addModel.tripNumber;
const judge = /^[a-zA-Z0-9]$/.test(this.addModel.tripNumber);
const judge = /^[a-zA-Z0-9]{1,}$/.test(this.addModel.tripNumber);
if (judge) {
if (tripNumber.toString().length > figuresOfServiceMaxNumber || tripNumber.toString().length < figuresOfServiceMinNumber) {
this.messageTip1 = '车次号长度' + figuresOfServiceMinNumber + '-' + figuresOfServiceMaxNumber + '位';