Update vehicle.vue
This commit is contained in:
parent
76b11fb39a
commit
7750511ecf
1 changed files with 5 additions and 15 deletions
|
|
@ -251,14 +251,9 @@ export default {
|
|||
if (make) {
|
||||
const result = await this.getModelOptions(this.selectedYear, make);
|
||||
this.modelOptions = result?.data;
|
||||
if (
|
||||
this.selectedMakefromStore() === make ||
|
||||
this.selectedMakefromStore() !== make
|
||||
) {
|
||||
if (this.modelOptions.length === 1) this.selectedModel = this.modelOptions[0];
|
||||
else this.selectedModel = null;
|
||||
this.selectedStyle = null;
|
||||
}
|
||||
if (this.modelOptions.length === 1) this.selectedModel = this.modelOptions[0];
|
||||
else this.selectedModel = null;
|
||||
this.selectedStyle = null;
|
||||
} else {
|
||||
this.modelOptions = [];
|
||||
this.selectedModel = null;
|
||||
|
|
@ -273,13 +268,8 @@ export default {
|
|||
model
|
||||
);
|
||||
this.styleOptions = result?.data;
|
||||
if (
|
||||
this.selectedModelfromStore() !== model ||
|
||||
this.selectedModelfromStore() === model
|
||||
) {
|
||||
if (this.styleOptions.length === 1) this.selectedStyle = this.styleOptions[0];
|
||||
else this.selectedStyle = null;
|
||||
}
|
||||
if (this.styleOptions.length === 1) this.selectedStyle = this.styleOptions[0];
|
||||
else this.selectedStyle = null;
|
||||
} else {
|
||||
this.styleOptions = [];
|
||||
this.selectedStyle = null;
|
||||
|
|
|
|||
Loading…
Reference in a new issue