1.1.0 • Published 6 years ago
c3-carselector v1.1.0
c3-carselector
车300车型选择器
特点
1)支持品牌、车系和车型选择
2)支持热门品牌是否显示
3)右侧字母索引导航栏
install
npm install c3-carselector --save
调用组件
import carSelector from "c3-carselector";
Vue.use(carSelector)
...
<car-selector
v-show="isShow"
v-on:selected="handleSelected"
:show-hot="isShowHot"
:show-all-brands="isShowAllBrands"
:show-all-series="isShowAllSeries"
:show-all-models="isShowAllModels"
></car-selector>
返回值
// 不限品牌
{
"type":"#"
}
// 不限车系
{
"type": "brand",
"data": {
"brand_id": "7",
"brand_name": "宝马"
}
}
// 不限车型
{
"type": "series",
"data": {
"brand_id": "7",
"brand_name": "宝马",
"series_id": "89",
"series_name": "宝马3系"
}
}
// 选择车型
{
"type": "model",
"data": {
"brand_id": "7",
"brand_name": "宝马",
"series_id": "89",
"series_name": "宝马3系",
"model_id": 1133994,
"model_name": "2018款 宝马3系 318i",
"max_reg_year": 2018,
"min_reg_year": 2017
},
"originModel": {
"id": 1133994,
"name": "2018款 宝马3系 318i",
"short_name": "2018款 318i",
"price": "28.8",
"year": 2018,
"liter": "1.5",
"liter_turbo": "涡轮增压",
"gear_type": "自动",
"min_reg_year": 2017,
"max_reg_year": 2018,
"min_make_year": 2016,
"max_make_year": 2018
}
}
Build Setup
# install dependencies
npm install
# serve with hot reload at localhost:8080
npm run dev
# build for production with minification
npm run build
For detailed explanation on how things work, consult the docs for vue-loader.
change logs
v1.0.8
:show-layers 支持选择到品牌,或者车系
v1.0.9
修复标题文案未修改的问题
v1.0.11
解决部分ios机型,滚动出现灰色满屏得情况
v1.0.12
修复header高度问题
v1.0.13
修复点击击穿的问题
v1.1.0
增加图片懒加载