修改样式
This commit is contained in:
parent
5f01c65e9f
commit
12c9f98274
@ -757,14 +757,17 @@ input:focus {
|
|||||||
background-color: #f7f8fc;
|
background-color: #f7f8fc;
|
||||||
}
|
}
|
||||||
.brand_brands{
|
.brand_brands{
|
||||||
/* width: 120px; */
|
width: 120px;
|
||||||
padding: 2px 10px;
|
padding: 2px 10px;
|
||||||
flex: none;
|
flex: none;
|
||||||
margin: 0px 0;
|
margin: 0px 0;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
line-height: 20px;
|
line-height: 20px;
|
||||||
overflow: hidden;
|
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
display: inline-block;
|
||||||
}
|
}
|
||||||
/* .brand_brands:hover{
|
/* .brand_brands:hover{
|
||||||
color: #2d74ba;
|
color: #2d74ba;
|
||||||
|
@ -635,6 +635,9 @@
|
|||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
}
|
}
|
||||||
|
.brand-item{
|
||||||
|
width: 116px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 移动端筛选按钮样式 */
|
/* 移动端筛选按钮样式 */
|
||||||
@ -758,3 +761,35 @@
|
|||||||
.colorsib img{
|
.colorsib img{
|
||||||
width:30%;
|
width:30%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.brand {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.brand-container {
|
||||||
|
max-height: 150px;
|
||||||
|
overflow: hidden;
|
||||||
|
transition: max-height 0.3s ease-in-out;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.brand-container.expanded {
|
||||||
|
max-height: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.brand-toggle {
|
||||||
|
text-align: center;
|
||||||
|
padding: 10px 0;
|
||||||
|
cursor: pointer;
|
||||||
|
color: #2D74BA;
|
||||||
|
font-size: 14px;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.brand-toggle:hover {
|
||||||
|
color: #1a5a9c;
|
||||||
|
}
|
||||||
|
|
||||||
|
.brand-toggle .fa {
|
||||||
|
margin-left: 5px;
|
||||||
|
}
|
||||||
|
@ -27,6 +27,7 @@ $(function() {
|
|||||||
is_hot:'',
|
is_hot:'',
|
||||||
isnone:false,
|
isnone:false,
|
||||||
isFilterOpen: false, // 控制筛选面板的开关状态
|
isFilterOpen: false, // 控制筛选面板的开关状态
|
||||||
|
isBrandsExpanded: false,
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
// 当前页数据(前端分页)
|
// 当前页数据(前端分页)
|
||||||
@ -175,6 +176,15 @@ $(function() {
|
|||||||
godetil(item) {
|
godetil(item) {
|
||||||
window.location.href = 'newcar-details.html?id=' + item.id
|
window.location.href = 'newcar-details.html?id=' + item.id
|
||||||
},
|
},
|
||||||
|
toggleBrands() {
|
||||||
|
this.isBrandsExpanded = !this.isBrandsExpanded;
|
||||||
|
const container = document.querySelector('.brand-container');
|
||||||
|
if (this.isBrandsExpanded) {
|
||||||
|
container.classList.add('expanded');
|
||||||
|
} else {
|
||||||
|
container.classList.remove('expanded');
|
||||||
|
}
|
||||||
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
})
|
})
|
@ -160,6 +160,7 @@
|
|||||||
<div class="col-lg-1 col-sm-2">
|
<div class="col-lg-1 col-sm-2">
|
||||||
</div>
|
</div>
|
||||||
<div class="col-lg-11 col-sm-10 brand">
|
<div class="col-lg-11 col-sm-10 brand">
|
||||||
|
<div class="brand-container">
|
||||||
<div v-for="brand in brandListAll"
|
<div v-for="brand in brandListAll"
|
||||||
:key="brand.id"
|
:key="brand.id"
|
||||||
class="brand-item brand_brands"
|
class="brand-item brand_brands"
|
||||||
@ -167,6 +168,11 @@
|
|||||||
@click="selectBrand(brand.id)"
|
@click="selectBrand(brand.id)"
|
||||||
><img :src="brand.logo_full" alt="" />{{brand.name}}</div>
|
><img :src="brand.logo_full" alt="" />{{brand.name}}</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="brand-toggle" v-if="brandListAll.length > 12">
|
||||||
|
<span class="toggle-text" @click="toggleBrands">{{ isBrandsExpanded ? 'Collapse' : 'Expand' }} <i class="fa" :class="isBrandsExpanded ? 'fa-angle-up' : 'fa-angle-down'"></i></span>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="filter-section row pt-40 al-c">
|
<div class="filter-section row pt-40 al-c">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user