nav detail update

This commit is contained in:
landaiqing 2023-12-27 23:37:33 +08:00
parent ca62bed9a0
commit 78eb84b2b8
7 changed files with 129 additions and 219 deletions

View File

@ -978,14 +978,20 @@ body.light-mode .video-bg:before {
/** 总推荐标签 **/ /** 总推荐标签 **/
.RecAll{ .RecAll{
display:flex; display:flex;
height:300px;
flex-direction: row; flex-direction: row;
height:330px;
width: 330px;
overflow-y: scroll;
flex-wrap: wrap;
} }
/** 单列推荐标签 **/ /** 单列推荐标签 **/
.SingleLabel{ .SingleLabel{
margin-top:2px; margin-top:2px;
width:210px; width:330px;
display: flex;
flex-direction: row;
flex-wrap: wrap;
height: 100%; height: 100%;
border-radius:10px; border-radius:10px;
} }
@ -996,7 +1002,7 @@ body.light-mode .video-bg:before {
font-size:13px; font-size:13px;
margin-top:8px; margin-top:8px;
margin-left:5px; margin-left:5px;
width:155px; width:330px;
height:30px; height:30px;
border-radius:10px; border-radius:10px;
color: var(--theme-color); color: var(--theme-color);

View File

@ -8,70 +8,14 @@
</div> </div>
<div class="RecAll"> <div class="RecAll">
<div class="SingleLabel"> <div class="SingleLabel">
<div class="app-card" id="ALabel"> <div v-if="hotNav" class="app-card" id="ALabel" v-for="(item,index) in hotNav" :key="index">
<!-- <div class="little-Circle" :style="{backgroundImage: 'url(' + '../../assets/img/beauty.jpg' + ')', backgroundSize:'100% 100%', backgroundRepeat: 'no-repeat'}">--> <div v-if="item.id" style="display: flex;flex-direction: row ;margin-top: -14px;margin-left: -11px" @click="toDetail(item.id)">
<!-- </div>--> <el-image v-if="item.icon" class="little-Circle" style="width:35px !important;height: 35px !important;" :src="item.icon">
<div style="display: flex;flex-direction: row;flex-wrap: nowrap;margin-left:-10px;margin-top:-18px"> <div slot="error" class="image-slot">
<img class="little-Circle" style="width:35px !important;height: 35px !important;" src="../../assets/img/beauty.jpg"/> <img style="width: 28px" :src="require('@/assets/img/null.png')" alt="图标">
<span style="margin-top:2px;margin-left:10px;width:90%;text-align: center">弱智吧</span> </div>
</div> </el-image>
</div> <span v-if="item.name" style="overflow-x: scroll;margin-top:2px;margin-left:10px;width:90%;text-align: center">{{item.name}}</span>
<div class="app-card" id="ALabel">
<!-- <div class="little-Circle" :style="{backgroundImage: 'url(' + '../../assets/img/beauty.jpg' + ')', backgroundSize:'100% 100%', backgroundRepeat: 'no-repeat'}">-->
<!-- </div>-->
<div style="display: flex;flex-direction: row;flex-wrap: nowrap;margin-left:-10px;margin-top:-18px">
<img class="little-Circle" style="width:35px !important;height: 35px !important;" src="../../assets/img/beauty.jpg"/>
<span style="margin-top:2px;margin-left:10px;width:90%;text-align: center">弱智吧</span>
</div>
</div>
<div class="app-card" id="ALabel">
<!-- <div class="little-Circle" :style="{backgroundImage: 'url(' + '../../assets/img/beauty.jpg' + ')', backgroundSize:'100% 100%', backgroundRepeat: 'no-repeat'}">-->
<!-- </div>-->
<div style="display: flex;flex-direction: row;flex-wrap: nowrap;margin-left:-10px;margin-top:-18px">
<img class="little-Circle" style="width:35px !important;height: 35px !important;" src="../../assets/img/beauty.jpg"/>
<span style="margin-top:2px;margin-left:10px;width:90%;text-align: center">弱智吧</span>
</div>
</div>
<div class="app-card" id="ALabel">
<!-- <div class="little-Circle" :style="{backgroundImage: 'url(' + '../../assets/img/beauty.jpg' + ')', backgroundSize:'100% 100%', backgroundRepeat: 'no-repeat'}">-->
<!-- </div>-->
<div style="display: flex;flex-direction: row;flex-wrap: nowrap;margin-left:-10px;margin-top:-18px">
<img class="little-Circle" style="width:35px !important;height: 35px !important;" src="../../assets/img/beauty.jpg"/>
<span style="margin-top:2px;margin-left:10px;width:90%;text-align: center">弱智吧</span>
</div>
</div>
</div>
<div class="SingleLabel" style=" margin-left:3px;">
<div class="app-card" id="ALabel">
<!-- <div class="little-Circle" :style="{backgroundImage: 'url(' + '../../assets/img/beauty.jpg' + ')', backgroundSize:'100% 100%', backgroundRepeat: 'no-repeat'}">-->
<!-- </div>-->
<div style="display: flex;flex-direction: row;flex-wrap: nowrap;margin-left:-10px;margin-top:-18px">
<img class="little-Circle" style="width:35px !important;height: 35px !important;" src="../../assets/img/beauty.jpg"/>
<span style="margin-top:2px;margin-left:10px;width:90%;text-align: center">弱智吧</span>
</div>
</div>
<div class="app-card" id="ALabel">
<!-- <div class="little-Circle" :style="{backgroundImage: 'url(' + '../../assets/img/beauty.jpg' + ')', backgroundSize:'100% 100%', backgroundRepeat: 'no-repeat'}">-->
<!-- </div>-->
<div style="display: flex;flex-direction: row;flex-wrap: nowrap;margin-left:-10px;margin-top:-18px">
<img class="little-Circle" style="width:35px !important;height: 35px !important;" src="../../assets/img/beauty.jpg"/>
<span style="margin-top:2px;margin-left:10px;width:90%;text-align: center">弱智吧</span>
</div>
</div>
<div class="app-card" id="ALabel">
<!-- <div class="little-Circle" :style="{backgroundImage: 'url(' + '../../assets/img/beauty.jpg' + ')', backgroundSize:'100% 100%', backgroundRepeat: 'no-repeat'}">-->
<!-- </div>-->
<div style="display: flex;flex-direction: row;flex-wrap: nowrap;margin-left:-10px;margin-top:-18px">
<img class="little-Circle" style="width:35px !important;height: 35px !important;" src="../../assets/img/beauty.jpg"/>
<span style="margin-top:2px;margin-left:10px;width:90%;text-align: center">弱智吧</span>
</div>
</div>
<div class="app-card" id="ALabel">
<!-- <div class="little-Circle" :style="{backgroundImage: 'url(' + '../../assets/img/beauty.jpg' + ')', backgroundSize:'100% 100%', backgroundRepeat: 'no-repeat'}">-->
<!-- </div>-->
<div style="display: flex;flex-direction: row;flex-wrap: nowrap;margin-left:-10px;margin-top:-18px">
<img class="little-Circle" style="width:35px !important;height: 35px !important;" src="../../assets/img/beauty.jpg"/>
<span style="margin-top:2px;margin-left:10px;width:90%;text-align: center">弱智吧</span>
</div> </div>
</div> </div>
</div> </div>
@ -80,14 +24,17 @@
</div> </div>
</template> </template>
<script> <script>
import axios from "axios";
export default { export default {
name:"HotRecomment", name:"HotRecomment",
data() { data() {
return { return {
visible: false, visible: false,
hotNav:[],
}}, }},
mounted() { mounted() {
this.getHotNav();
}, },
created() { created() {
@ -97,6 +44,41 @@ export default {
}, },
methods: { methods: {
toDetail(id){
if(id){
let pathInfo = this.$router.resolve({
path: '/nav',
query: {
uid: id,
}
})
window.open(pathInfo.href, '_self');
} else {
return false;
}
},
getHotNav(){
let _this = this;
axios({
method: 'post',
url: '/api/recommendTopEightUrl',
}).then(function (res) {
if (res.data.code===200){
_this.hotNav=res.data.data;
}else{
return false;
}
}).catch((error) => {
// Vue.prototype.$notify.error({
// title: '',
// message: error === null ? '' : error,
// offset: 0
// });
})
},
} }
} }

View File

@ -9,8 +9,12 @@
<div class="card" style="width: 130px;height:130px;margin-top:50px;background-color: var( --theme-bg-color)" <div class="card" style="width: 130px;height:130px;margin-top:50px;background-color: var( --theme-bg-color)"
@click="ToURL()"> @click="ToURL()">
<div style="width:100%;height:100%"> <div style="width:100%;height:100%">
<img v-if="UrlObj.icon != null " :src="UrlObj.icon" style="width:100%;height:100%"> <el-image v-if="UrlObj.icon !== null " :src="UrlObj.icon" style="width:100%;height:100%">
<img v-else src="../../assets/logo.png" style="width:100%;height:100%"> <div slot="error" class="image-slot">
<img style="width: 28px;" :src="require('@/assets/img/null.png')" alt="图标">
</div>
</el-image>
<!-- <img v-else src="../../assets/logo.png" style="width:100%;height:100%">-->
<!-- <iframe src="https://www.canva.cn/" style="width:100%;height:100%"></iframe>--> <!-- <iframe src="https://www.canva.cn/" style="width:100%;height:100%"></iframe>-->
</div> </div>
</div> </div>

View File

@ -10,70 +10,18 @@
</div> </div>
<div class="RecAll"> <div class="RecAll">
<div class="SingleLabel"> <div class="SingleLabel">
<div class="app-card" id="ALabel"> <div v-if="latestNav" class="app-card" id="ALabel" v-for="(item,index) in latestNav" :key="index">
<!-- <div class="little-Circle" :style="{backgroundImage: 'url(' + '../../assets/img/beauty.jpg' + ')', backgroundSize:'100% 100%', backgroundRepeat: 'no-repeat'}">--> <!-- <div class="little-Circle" :style="{backgroundImage: 'url(' + '../../assets/img/beauty.jpg' + ')', backgroundSize:'100% 100%', backgroundRepeat: 'no-repeat'}">-->
<!-- </div>--> <!-- </div>-->
<div style="display: flex;flex-direction: row;flex-wrap: nowrap;margin-left:-10px;margin-top:-18px"> <div v-if="item.id" style="display: flex;flex-direction: row;flex-wrap: nowrap;margin-left:-11px;margin-top:-15px" @click="toDetail(item.id)">
<img class="little-Circle" style="width:35px !important;height: 35px !important;" src="../../assets/img/beauty.jpg"/> <el-image v-if="item.icon" class="little-Circle" style="width:35px !important;height: 35px !important;"
<span style="margin-top:2px;margin-left:10px;width:90%;text-align: center">弱智吧</span> :src="item.icon">
</div> <div slot="error" class="image-slot">
</div> <img style="width: 28px" :src="require('@/assets/img/null.png')" alt="图标">
<div class="app-card" id="ALabel"> </div>
<!-- <div class="little-Circle" :style="{backgroundImage: 'url(' + '../../assets/img/beauty.jpg' + ')', backgroundSize:'100% 100%', backgroundRepeat: 'no-repeat'}">--> </el-image>
<!-- </div>--> <span v-if="item.name"
<div style="display: flex;flex-direction: row;flex-wrap: nowrap;margin-left:-10px;margin-top:-18px"> style="overflow-x: scroll;margin-top:2px;margin-left:10px;width:90%;text-align: center">{{item.name}}</span>
<img class="little-Circle" style="width:35px !important;height: 35px !important;" src="../../assets/img/beauty.jpg"/>
<span style="margin-top:2px;margin-left:10px;width:90%;text-align: center">弱智吧</span>
</div>
</div>
<div class="app-card" id="ALabel">
<!-- <div class="little-Circle" :style="{backgroundImage: 'url(' + '../../assets/img/beauty.jpg' + ')', backgroundSize:'100% 100%', backgroundRepeat: 'no-repeat'}">-->
<!-- </div>-->
<div style="display: flex;flex-direction: row;flex-wrap: nowrap;margin-left:-10px;margin-top:-18px">
<img class="little-Circle" style="width:35px !important;height: 35px !important;" src="../../assets/img/beauty.jpg"/>
<span style="margin-top:2px;margin-left:10px;width:90%;text-align: center">弱智吧</span>
</div>
</div>
<div class="app-card" id="ALabel">
<!-- <div class="little-Circle" :style="{backgroundImage: 'url(' + '../../assets/img/beauty.jpg' + ')', backgroundSize:'100% 100%', backgroundRepeat: 'no-repeat'}">-->
<!-- </div>-->
<div style="display: flex;flex-direction: row;flex-wrap: nowrap;margin-left:-10px;margin-top:-18px">
<img class="little-Circle" style="width:35px !important;height: 35px !important;" src="../../assets/img/beauty.jpg"/>
<span style="margin-top:2px;margin-left:10px;width:90%;text-align: center">弱智吧</span>
</div>
</div>
</div>
<div class="SingleLabel" style=" margin-left:3px;">
<div class="app-card" id="ALabel">
<!-- <div class="little-Circle" :style="{backgroundImage: 'url(' + '../../assets/img/beauty.jpg' + ')', backgroundSize:'100% 100%', backgroundRepeat: 'no-repeat'}">-->
<!-- </div>-->
<div style="display: flex;flex-direction: row;flex-wrap: nowrap;margin-left:-10px;margin-top:-18px">
<img class="little-Circle" style="width:35px !important;height: 35px !important;" src="../../assets/img/beauty.jpg"/>
<span style="margin-top:2px;margin-left:10px;width:90%;text-align: center">弱智吧</span>
</div>
</div>
<div class="app-card" id="ALabel">
<!-- <div class="little-Circle" :style="{backgroundImage: 'url(' + '../../assets/img/beauty.jpg' + ')', backgroundSize:'100% 100%', backgroundRepeat: 'no-repeat'}">-->
<!-- </div>-->
<div style="display: flex;flex-direction: row;flex-wrap: nowrap;margin-left:-10px;margin-top:-18px">
<img class="little-Circle" style="width:35px !important;height: 35px !important;" src="../../assets/img/beauty.jpg"/>
<span style="margin-top:2px;margin-left:10px;width:90%;text-align: center">弱智吧</span>
</div>
</div>
<div class="app-card" id="ALabel">
<!-- <div class="little-Circle" :style="{backgroundImage: 'url(' + '../../assets/img/beauty.jpg' + ')', backgroundSize:'100% 100%', backgroundRepeat: 'no-repeat'}">-->
<!-- </div>-->
<div style="display: flex;flex-direction: row;flex-wrap: nowrap;margin-left:-10px;margin-top:-18px">
<img class="little-Circle" style="width:35px !important;height: 35px !important;" src="../../assets/img/beauty.jpg"/>
<span style="margin-top:2px;margin-left:10px;width:90%;text-align: center">弱智吧</span>
</div>
</div>
<div class="app-card" id="ALabel">
<!-- <div class="little-Circle" :style="{backgroundImage: 'url(' + '../../assets/img/beauty.jpg' + ')', backgroundSize:'100% 100%', backgroundRepeat: 'no-repeat'}">-->
<!-- </div>-->
<div style="display: flex;flex-direction: row;flex-wrap: nowrap;margin-left:-10px;margin-top:-18px">
<img class="little-Circle" style="width:35px !important;height: 35px !important;" src="../../assets/img/beauty.jpg"/>
<span style="margin-top:2px;margin-left:10px;width:90%;text-align: center">弱智吧</span>
</div> </div>
</div> </div>
</div> </div>
@ -82,23 +30,58 @@
</div> </div>
</template> </template>
<script> <script>
import axios from "axios";
export default { export default {
name:"NewRecomment", name: "NewRecomment",
data() { data() {
return { return {
visible: false, visible: false,
}}, latestNav: [],
}
},
mounted() { mounted() {
this.getLatestNav();
}, },
created() { created() {
}, },
computed: { computed: {},
},
methods: { methods: {
toDetail(id){
if(id){
let pathInfo = this.$router.resolve({
path: '/nav',
query: {
uid: id,
}
})
window.open(pathInfo.href, '_self');
} else {
return false;
}
},
getLatestNav() {
let _this = this;
axios({
method: 'post',
url: '/api/recommendLatestUrl',
}).then(function (res) {
if (res.data.code === 200) {
_this.latestNav = res.data.data;
} else {
return false;
}
}).catch((error) => {
// Vue.prototype.$notify.error({
// title: '',
// message: error === null ? '' : error,
// offset: 0
// });
})
},
} }
} }

View File

@ -6,78 +6,11 @@
width:100%;border-radius:10px; width:100%;border-radius:10px;
font-size:25px;border-color:var(--border-color) ;border-width: 5px"> font-size:25px;border-color:var(--border-color) ;border-width: 5px">
<span style="padding-left:20px;color:var(--theme-color);font-family:STHupo"><i class="el-icon-s-data"></i> <span style="padding-left:20px;color:var(--theme-color);font-family:STHupo"><i class="el-icon-s-data"></i>
随机推荐 推广
</span> </span>
</div> </div>
<div class="RecAll"> <div class="RecAll" style="display: flex;align-items: center;justify-content: center">
<div class="SingleLabel"> <el-image style="width: 300px;height: 110px" src="https://landaiqing.space/wp-content/uploads/2023/11/20231106172214680026.bmp"></el-image>
<div class="app-card" id="ALabel">
<!-- <div class="little-Circle" :style="{backgroundImage: 'url(' + '../../assets/img/beauty.jpg' + ')', backgroundSize:'100% 100%', backgroundRepeat: 'no-repeat'}">-->
<!-- </div>-->
<div style="display: flex;flex-direction: row;flex-wrap: nowrap;margin-left:-10px;margin-top:-18px">
<img class="little-Circle" style="width:35px !important;height: 35px !important;" src="../../assets/img/beauty.jpg"/>
<span style="margin-top:2px;margin-left:10px;width:90%;text-align: center">弱智吧</span>
</div>
</div>
<div class="app-card" id="ALabel">
<!-- <div class="little-Circle" :style="{backgroundImage: 'url(' + '../../assets/img/beauty.jpg' + ')', backgroundSize:'100% 100%', backgroundRepeat: 'no-repeat'}">-->
<!-- </div>-->
<div style="display: flex;flex-direction: row;flex-wrap: nowrap;margin-left:-10px;margin-top:-18px">
<img class="little-Circle" style="width:35px !important;height: 35px !important;" src="../../assets/img/beauty.jpg"/>
<span style="margin-top:2px;margin-left:10px;width:90%;text-align: center">弱智吧</span>
</div>
</div>
<div class="app-card" id="ALabel">
<!-- <div class="little-Circle" :style="{backgroundImage: 'url(' + '../../assets/img/beauty.jpg' + ')', backgroundSize:'100% 100%', backgroundRepeat: 'no-repeat'}">-->
<!-- </div>-->
<div style="display: flex;flex-direction: row;flex-wrap: nowrap;margin-left:-10px;margin-top:-18px">
<img class="little-Circle" style="width:35px !important;height: 35px !important;" src="../../assets/img/beauty.jpg"/>
<span style="margin-top:2px;margin-left:10px;width:90%;text-align: center">弱智吧</span>
</div>
</div>
<div class="app-card" id="ALabel">
<!-- <div class="little-Circle" :style="{backgroundImage: 'url(' + '../../assets/img/beauty.jpg' + ')', backgroundSize:'100% 100%', backgroundRepeat: 'no-repeat'}">-->
<!-- </div>-->
<div style="display: flex;flex-direction: row;flex-wrap: nowrap;margin-left:-10px;margin-top:-18px">
<img class="little-Circle" style="width:35px !important;height: 35px !important;" src="../../assets/img/beauty.jpg"/>
<span style="margin-top:2px;margin-left:10px;width:90%;text-align: center">弱智吧</span>
</div>
</div>
</div>
<div class="SingleLabel" style=" margin-left:3px;">
<div class="app-card" id="ALabel">
<!-- <div class="little-Circle" :style="{backgroundImage: 'url(' + '../../assets/img/beauty.jpg' + ')', backgroundSize:'100% 100%', backgroundRepeat: 'no-repeat'}">-->
<!-- </div>-->
<div style="display: flex;flex-direction: row;flex-wrap: nowrap;margin-left:-10px;margin-top:-18px">
<img class="little-Circle" style="width:35px !important;height: 35px !important;" src="../../assets/img/beauty.jpg"/>
<span style="margin-top:2px;margin-left:10px;width:90%;text-align: center">弱智吧</span>
</div>
</div>
<div class="app-card" id="ALabel">
<!-- <div class="little-Circle" :style="{backgroundImage: 'url(' + '../../assets/img/beauty.jpg' + ')', backgroundSize:'100% 100%', backgroundRepeat: 'no-repeat'}">-->
<!-- </div>-->
<div style="display: flex;flex-direction: row;flex-wrap: nowrap;margin-left:-10px;margin-top:-18px">
<img class="little-Circle" style="width:35px !important;height: 35px !important;" src="../../assets/img/beauty.jpg"/>
<span style="margin-top:2px;margin-left:10px;width:90%;text-align: center">弱智吧</span>
</div>
</div>
<div class="app-card" id="ALabel">
<!-- <div class="little-Circle" :style="{backgroundImage: 'url(' + '../../assets/img/beauty.jpg' + ')', backgroundSize:'100% 100%', backgroundRepeat: 'no-repeat'}">-->
<!-- </div>-->
<div style="display: flex;flex-direction: row;flex-wrap: nowrap;margin-left:-10px;margin-top:-18px">
<img class="little-Circle" style="width:35px !important;height: 35px !important;" src="../../assets/img/beauty.jpg"/>
<span style="margin-top:2px;margin-left:10px;width:90%;text-align: center">弱智吧</span>
</div>
</div>
<div class="app-card" id="ALabel">
<!-- <div class="little-Circle" :style="{backgroundImage: 'url(' + '../../assets/img/beauty.jpg' + ')', backgroundSize:'100% 100%', backgroundRepeat: 'no-repeat'}">-->
<!-- </div>-->
<div style="display: flex;flex-direction: row;flex-wrap: nowrap;margin-left:-10px;margin-top:-18px">
<img class="little-Circle" style="width:35px !important;height: 35px !important;" src="../../assets/img/beauty.jpg"/>
<span style="margin-top:2px;margin-left:10px;width:90%;text-align: center">弱智吧</span>
</div>
</div>
</div>
</div> </div>
</div> </div>
</div> </div>

View File

@ -116,7 +116,6 @@ export default {
path: '/nav', path: '/nav',
query: { query: {
uid: this.nav.urlId, uid: this.nav.urlId,
refresh: true,
} }
}) })
window.open(pathInfo.href, '_self'); window.open(pathInfo.href, '_self');
@ -176,4 +175,7 @@ export default {
.qr:hover { .qr:hover {
color: #5ddcff; color: #5ddcff;
} }
::v-deep .el-dialog {
border-radius: 30px;
}
</style> </style>

View File

@ -15,9 +15,9 @@
<span class="title">热搜榜</span> <span class="title">热搜榜</span>
<!-- <span class="clear" @click="clearHistory" v-show="isShowClearHistory"><i class="el-icon-circle-close"></i>清空</span>--> <!-- <span class="clear" @click="clearHistory" v-show="isShowClearHistory"><i class="el-icon-circle-close"></i>清空</span>-->
</div> </div>
<div v-if="hotSearchKeyWords.length!==0" v-show="isShowClearHistory"> <div v-if="hotSearchKeyWords" v-show="isShowClearHistory">
<el-tag <el-tag
:v-if="hotSearchKeyWords.length!==0" :v-if="hotSearchKeyWords"
v-for="(tag,index) in hotSearchKeyWords" v-for="(tag,index) in hotSearchKeyWords"
:key="index" :key="index"
size="small" size="small"
@ -27,8 +27,8 @@
{{ tag }} {{ tag }}
</el-tag> </el-tag>
</div> </div>
<div v-if="hotSearchKeyWords.length===0" v-show="isShowClearHistory"> <div v-if="!hotSearchKeyWords" v-show="isShowClearHistory">
<span v-show="searchResults.length===0" >暂无搜索结果...</span> <span v-show="!searchResults" >暂无搜索结果...</span>
</div> </div>
<div <div
v-show="!isShowClearHistory"> v-show="!isShowClearHistory">
@ -41,9 +41,9 @@
<span class="title">搜索历史</span> <span class="title">搜索历史</span>
<!-- <span class="clear" v-show="isShowClearHistory"><i class="el-icon-circle-close"></i>清空</span>--> <!-- <span class="clear" v-show="isShowClearHistory"><i class="el-icon-circle-close"></i>清空</span>-->
</div> </div>
<div v-if="historySearch.length!==0" v-show="isShowClearHistory"> <div v-if="historySearch" v-show="isShowClearHistory">
<el-tag <el-tag
:v-if="historySearch.length!==0" :v-if="historySearch"
v-for="(tag,index) in historySearch" v-for="(tag,index) in historySearch"
:key="index" :key="index"
size="small" size="small"
@ -55,8 +55,8 @@
{{ tag }} {{ tag }}
</el-tag> </el-tag>
</div> </div>
<div v-if="historySearch.length===0" v-show="isShowClearHistory"> <div v-if="!historySearch" v-show="isShowClearHistory">
<span v-show="searchResults.length===0" >暂无搜索结果...</span> <span v-show="!searchResults" >暂无搜索结果...</span>
</div> </div>
<div <div
v-show="!isShowClearHistory"> v-show="!isShowClearHistory">
@ -70,12 +70,12 @@
<span class="clear" @click="clearSearchResults"><i class="el-icon-circle-close"></i>清空</span> <span class="clear" @click="clearSearchResults"><i class="el-icon-circle-close"></i>清空</span>
</div> </div>
<div style="max-height: 300px;overflow-y: scroll"> <div style="max-height: 300px;overflow-y: scroll">
<el-scrollbar v-show="searchResults.length!==0"> <el-scrollbar v-show="searchResults">
<div v-for="(item,index) in searchResults" :key="index"> <div v-for="(item,index) in searchResults" :key="index">
<SearchResults :search-results="item"></SearchResults> <SearchResults :search-results="item"></SearchResults>
</div> </div>
</el-scrollbar> </el-scrollbar>
<span v-show="searchResults.length===0" >暂无搜索结果...</span> <span v-show="!searchResults" >暂无搜索结果...</span>
</div> </div>
</div> </div>