@@ -95,6 +105,7 @@ export default {
models: [],
brandname: "",
brandList: [],
+ sKeyword:'',
};
},
methods: {
@@ -105,6 +116,7 @@ export default {
},
// 选择li
handlerLi(n) {
+ this.sKeyword = '';
this.activeLi = n;
let key = this.letterArr[n];
this.showCars = this.cars.filter((ele) => ele.firstword === key);
@@ -160,6 +172,10 @@ export default {
arr.push(ele.brandname);
})
this.$emit("selectAll", arr);
+ },
+ onSearch() {
+ let kw = this.sKeyword;
+ this.showCars = this.cars.filter((ele) => ele.brandname.indexOf(kw) != -1 && ele.firstword != '热门');
}
},
};
@@ -221,7 +237,7 @@ export default {
}
.sb-dd {
width: 100%;
- height: calc(100% - 30px);
+ height: calc(100% - 70px);
box-shadow: 0 0 20px;
}
.sb-bd {
diff --git a/src/lycomponents/iSpecialSeriesChoose/index.vue b/src/lycomponents/iSpecialSeriesChoose/index.vue
index b63fc36..1779f63 100644
--- a/src/lycomponents/iSpecialSeriesChoose/index.vue
+++ b/src/lycomponents/iSpecialSeriesChoose/index.vue
@@ -248,7 +248,6 @@ export default {
getUserBrand(this.form)
.then((res) => {
let data = res.data;
- console.log(data)
let arr = [];
data.forEach((ele) => {
let fk = ele.firstword;
diff --git a/src/lycomponents/iSwitchBrand/index.vue b/src/lycomponents/iSwitchBrand/index.vue
index f11c785..0647b45 100644
--- a/src/lycomponents/iSwitchBrand/index.vue
+++ b/src/lycomponents/iSwitchBrand/index.vue
@@ -17,6 +17,16 @@
按品牌拼音首字母查找:
{{item}}
+
@@ -87,6 +97,7 @@ export default {
chooseModel: null,
models: [],
brandname: "",
+ sKeyword:'',
};
},
methods: {
@@ -97,6 +108,7 @@ export default {
},
// 选择li
handlerLi(n) {
+ this.sKeyword = '';
this.activeLi = n;
let key = this.letterArr[n];
this.showCars = this.cars.filter((ele) => ele.firstword === key);
@@ -167,6 +179,10 @@ export default {
this.$message.warning("请选择品牌");
}
},
+ onSearch() {
+ let kw = this.sKeyword;
+ this.showCars = this.cars.filter((ele) => ele.brandname.indexOf(kw) != -1 && ele.firstword != '热门');
+ }
},
};
@@ -227,7 +243,7 @@ export default {
}
.sb-dd {
width: 100%;
- height: calc(100% - 30px);
+ height: calc(100% - 70px);
box-shadow: 0 0 20px;
}
.sb-bd {