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