二手车交易,售价输入0开头时,后边不允许输入任何数字
This commit is contained in:
@ -272,10 +272,11 @@ export default {
|
||||
},
|
||||
methods:{
|
||||
validatePrice(value) {
|
||||
if (/^0+$/.test(value)){
|
||||
value = '0';
|
||||
if (value?.startsWith(0) && value?.length > 1) {
|
||||
this.$nextTick(() => {
|
||||
this.form.minPrice = 0
|
||||
})
|
||||
}
|
||||
this.form.minPrice = value;
|
||||
},
|
||||
clearStorageFormInfo(){
|
||||
localStorage.setItem("carSourceFormInfo",'')
|
||||
|
@ -173,16 +173,18 @@ export default {
|
||||
},
|
||||
methods:{
|
||||
validatePrice(value) {
|
||||
if (/^0+$/.test(value)){
|
||||
value = '0';
|
||||
if (value?.startsWith(0) && value?.length > 1) {
|
||||
this.$nextTick(() => {
|
||||
this.form.minPrice = 0
|
||||
})
|
||||
}
|
||||
this.form.minPrice = value;
|
||||
},
|
||||
validatePrice1(value) {
|
||||
if (/^0+$/.test(value)){
|
||||
value = '0';
|
||||
if (value?.startsWith(0) && value?.length > 1) {
|
||||
this.$nextTick(() => {
|
||||
this.form.maxPrice = 0
|
||||
})
|
||||
}
|
||||
this.form.maxPrice = value;
|
||||
},
|
||||
clearStorageFormInfo(){
|
||||
localStorage.setItem("wantBuyFormInfo",'')
|
||||
|
Reference in New Issue
Block a user