Update vehicle.vue

This commit is contained in:
Sneha 2023-09-26 19:14:24 +05:30
parent 2fc7c57d40
commit 948473edcf

View file

@ -268,7 +268,7 @@ export default {
const sameStyle = this.selectedStyle === this.styleOptions[0]; const sameStyle = this.selectedStyle === this.styleOptions[0];
this.selectedStyle = this.styleOptions[0]; this.selectedStyle = this.styleOptions[0];
if (sameStyle) { if (sameStyle) {
this.getCarID(); this.getVehicleDetails();
} }
} else this.selectedStyle = null; } else this.selectedStyle = null;
} else { } else {
@ -278,7 +278,7 @@ export default {
}, },
async selectedStyle(style) { async selectedStyle(style) {
if (style) { if (style) {
this.getCarID(); this.getVehicleDetails();
} else { } else {
this.imageUrl = null; this.imageUrl = null;
} }
@ -312,7 +312,7 @@ export default {
arePagePrerequisitesValid() { arePagePrerequisitesValid() {
return true; return true;
}, },
async getCarID() { async getVehicleDetails() {
this.carId = null; this.carId = null;
const result = await this.getVehicle( const result = await this.getVehicle(
this.selectedYear, this.selectedYear,