|
|
@ -18,6 +18,16 @@
|
|
|
|
<li v-for="(item,index) in letterArr" :key="index" :class="activeLi === index ? 'lactive': ''" @click="handlerLi(index)">{{item}}</li>
|
|
|
|
<li v-for="(item,index) in letterArr" :key="index" :class="activeLi === index ? 'lactive': ''" @click="handlerLi(index)">{{item}}</li>
|
|
|
|
<li @click="selectAll">全选</li>
|
|
|
|
<li @click="selectAll">全选</li>
|
|
|
|
</ul>
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
<div style="margin: 0 0 0 16px">
|
|
|
|
|
|
|
|
<a-form-model layout="inline">
|
|
|
|
|
|
|
|
<a-form-model-item label="关键词">
|
|
|
|
|
|
|
|
<a-input v-model="sKeyword" style="width: 160px"></a-input>
|
|
|
|
|
|
|
|
</a-form-model-item>
|
|
|
|
|
|
|
|
<a-form-model-item>
|
|
|
|
|
|
|
|
<a-button type="primary" @click="onSearch">搜索</a-button>
|
|
|
|
|
|
|
|
</a-form-model-item>
|
|
|
|
|
|
|
|
</a-form-model>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<div style="clear: both"></div>
|
|
|
|
<div style="clear: both"></div>
|
|
|
|
<div class="sb-dd">
|
|
|
|
<div class="sb-dd">
|
|
|
|
<vue-scroll>
|
|
|
|
<vue-scroll>
|
|
|
@ -95,6 +105,7 @@ export default {
|
|
|
|
models: [],
|
|
|
|
models: [],
|
|
|
|
brandname: "",
|
|
|
|
brandname: "",
|
|
|
|
brandList: [],
|
|
|
|
brandList: [],
|
|
|
|
|
|
|
|
sKeyword:'',
|
|
|
|
};
|
|
|
|
};
|
|
|
|
},
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
methods: {
|
|
|
@ -105,6 +116,7 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// 选择li
|
|
|
|
// 选择li
|
|
|
|
handlerLi(n) {
|
|
|
|
handlerLi(n) {
|
|
|
|
|
|
|
|
this.sKeyword = '';
|
|
|
|
this.activeLi = n;
|
|
|
|
this.activeLi = n;
|
|
|
|
let key = this.letterArr[n];
|
|
|
|
let key = this.letterArr[n];
|
|
|
|
this.showCars = this.cars.filter((ele) => ele.firstword === key);
|
|
|
|
this.showCars = this.cars.filter((ele) => ele.firstword === key);
|
|
|
@ -160,6 +172,10 @@ export default {
|
|
|
|
arr.push(ele.brandname);
|
|
|
|
arr.push(ele.brandname);
|
|
|
|
})
|
|
|
|
})
|
|
|
|
this.$emit("selectAll", arr);
|
|
|
|
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 {
|
|
|
|
.sb-dd {
|
|
|
|
width: 100%;
|
|
|
|
width: 100%;
|
|
|
|
height: calc(100% - 30px);
|
|
|
|
height: calc(100% - 70px);
|
|
|
|
box-shadow: 0 0 20px;
|
|
|
|
box-shadow: 0 0 20px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.sb-bd {
|
|
|
|
.sb-bd {
|
|
|
|