|
@@ -1,7 +1,7 @@
|
|
|
<template>
|
|
<template>
|
|
|
- <div class="search-box">
|
|
|
|
|
|
|
+ <div class="search-box" :class="{'search-box2': !SelectItem}">
|
|
|
<div class="input-group">
|
|
<div class="input-group">
|
|
|
- <select @change="onSelectTypeChange" class="form-control select-type select-adder">
|
|
|
|
|
|
|
+ <select @change="onSelectTypeChange" class="form-control select-type select-adder" v-if="SelectItem">
|
|
|
<option value="">产品</option>
|
|
<option value="">产品</option>
|
|
|
<option value="">店铺</option>
|
|
<option value="">店铺</option>
|
|
|
</select>
|
|
</select>
|
|
@@ -12,11 +12,11 @@
|
|
|
@keyup.40="onSelectChange(1)"
|
|
@keyup.40="onSelectChange(1)"
|
|
|
@keyup.38="onSelectChange(-1)"
|
|
@keyup.38="onSelectChange(-1)"
|
|
|
@keyup.13="onSearch()"/>
|
|
@keyup.13="onSearch()"/>
|
|
|
- <span class="input-group-btn" @click="onSearch()">
|
|
|
|
|
- <button class="btn btn-primary search-btn" type="button">搜 索</button>
|
|
|
|
|
|
|
+ <span class="input-group-btn" @click="onSearch()" style="z-index: 10">
|
|
|
|
|
+ <button class="btn btn-primary search-btn" type="button" :class="{'Isblue':!SelectItem}">搜 索</button>
|
|
|
</span>
|
|
</span>
|
|
|
</div>
|
|
</div>
|
|
|
- <ul class="association" v-show="showAssociate && searchType == 'product'"
|
|
|
|
|
|
|
+ <ul class="association" :class="{'association2': !SelectItem}" v-show="showAssociate && searchType == 'product'"
|
|
|
@mouseenter="associate.focus=true" @mouseleave="associate.focus=false">
|
|
@mouseenter="associate.focus=true" @mouseleave="associate.focus=false">
|
|
|
<li v-if="similarKeywords.data.component && similarKeywords.data.component.length > 0" class="similar-title">型号:</li>
|
|
<li v-if="similarKeywords.data.component && similarKeywords.data.component.length > 0" class="similar-title">型号:</li>
|
|
|
<li v-for="(k, index) in similarKeywords.data.component" class="item"
|
|
<li v-for="(k, index) in similarKeywords.data.component" class="item"
|
|
@@ -34,7 +34,7 @@
|
|
|
@click.stop.prevent="onAssociateClick(k.nameCn)">{{ k.nameCn }}
|
|
@click.stop.prevent="onAssociateClick(k.nameCn)">{{ k.nameCn }}
|
|
|
</li>
|
|
</li>
|
|
|
</ul>
|
|
</ul>
|
|
|
- <div class="search-hot">
|
|
|
|
|
|
|
+ <div class="search-hot" v-if="SelectItem">
|
|
|
<ul class="list-untyled">
|
|
<ul class="list-untyled">
|
|
|
<li class="item item-first">热门搜索</li>
|
|
<li class="item item-first">热门搜索</li>
|
|
|
<li class="item" v-for="w in hotBrand" v-if="ifFloorsHotSearchInValid">
|
|
<li class="item" v-for="w in hotBrand" v-if="ifFloorsHotSearchInValid">
|
|
@@ -53,6 +53,12 @@
|
|
|
<script>
|
|
<script>
|
|
|
export default {
|
|
export default {
|
|
|
name: 'search-box',
|
|
name: 'search-box',
|
|
|
|
|
+ props: {
|
|
|
|
|
+ SelectItem: {
|
|
|
|
|
+ type: Boolean,
|
|
|
|
|
+ default: true
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
data () {
|
|
data () {
|
|
|
return {
|
|
return {
|
|
|
keyword: '',
|
|
keyword: '',
|
|
@@ -227,6 +233,26 @@
|
|
|
width: 79px;
|
|
width: 79px;
|
|
|
border-radius: 0;
|
|
border-radius: 0;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ .Isblue{
|
|
|
|
|
+ vertical-align: middle;
|
|
|
|
|
+ display: inline-block;
|
|
|
|
|
+ text-align: center;
|
|
|
|
|
+ width: 72px;
|
|
|
|
|
+ border-left: 0;
|
|
|
|
|
+ background: #d3e1fc;
|
|
|
|
|
+ color: #5078cb;
|
|
|
|
|
+ text-align: center;
|
|
|
|
|
+ font-size: 14px;
|
|
|
|
|
+ position: absolute;
|
|
|
|
|
+ right: 0;
|
|
|
|
|
+ top: 0;
|
|
|
|
|
+ &:hover {
|
|
|
|
|
+ background: #d2272d;
|
|
|
|
|
+ color: #fff;
|
|
|
|
|
+ transition: all .3s;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
.search-hot ul{
|
|
.search-hot ul{
|
|
|
line-height: 12px;
|
|
line-height: 12px;
|
|
|
}
|
|
}
|
|
@@ -286,5 +312,13 @@
|
|
|
cursor: default;
|
|
cursor: default;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ .association2 {
|
|
|
|
|
+ left: 2px;
|
|
|
|
|
+ right: 71px
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .search-box2 {
|
|
|
|
|
+ width: 442px;
|
|
|
}
|
|
}
|
|
|
</style>
|
|
</style>
|