更改首页逻辑

This commit is contained in:
a0049873 2022-08-15 15:08:50 +08:00
parent 55693b880f
commit 0b972d7bb9
2 changed files with 12 additions and 11 deletions

View File

@ -843,7 +843,8 @@
const currentPageSize = ref(5) const currentPageSize = ref(5)
const pageSizeOptions = ref(['5', '10', '20', '50']) const pageSizeOptions = ref(['5', '10', '20', '50'])
const router = useRouter() const router = useRouter()
const select = router.currentRoute.value.query.select const select = router.currentRoute.value.query.select || '组件服务'
const select2 = router.currentRoute.value.query.select
const str = router.currentRoute.value.query.str const str = router.currentRoute.value.query.str
const searchValue = ref(str) const searchValue = ref(str)
let tecHnosphere = router.currentRoute.value.query.tecHnosphere let tecHnosphere = router.currentRoute.value.query.tecHnosphere
@ -1424,7 +1425,7 @@
getNewList() getNewList()
if (!tecHnosphere && !appLiCation) { if (!tecHnosphere && !appLiCation) {
if (searchValue.value) { if (searchValue.value && !select2) {
globalSearch() globalSearch()
} else { } else {
getAppResources2() getAppResources2()

View File

@ -2,14 +2,14 @@
<div class="navigation"> <div class="navigation">
<div class="main" v-if="qeihuan"> <div class="main" v-if="qeihuan">
<div class="top"> <div class="top">
<!-- <span <span
v-for="name in topList" v-for="name in topList"
:key="name" :key="name"
:class="name == select ? 'select' : ''" :class="name == select ? 'select' : ''"
@click="changeCard(name)" @click="changeCard(name)"
> >
{{ name }} {{ name }}
</span> --> </span>
</div> </div>
<div class="bottom"> <div class="bottom">
<a-input-search <a-input-search
@ -229,11 +229,11 @@
appLiCation: '', appLiCation: '',
}) })
const changeCard = (name) => { const changeCard = (name) => {
// if (select.value == name) { if (select.value == name) {
// select.value = '' select.value = ''
// } else { } else {
select.value = name select.value = name
// } }
snum.value.select = select.value snum.value.select = select.value
} }
function selectCard(value) { function selectCard(value) {
@ -312,7 +312,7 @@
.main { .main {
width: 8.8rem; width: 8.8rem;
height: 1.48rem; height: 1.48rem;
// background: rgba(255, 255, 255, 0.18); background: rgba(255, 255, 255, 0.18);
padding: 0.2rem 0.4rem; padding: 0.2rem 0.4rem;
border-radius: 0.02rem; border-radius: 0.02rem;
margin-top: 1.36rem; margin-top: 1.36rem;
@ -509,7 +509,7 @@
/* ---------------------------------------------- /* ----------------------------------------------
* Generated by Animista on 2022-8-15 14:3:51 * Generated by Animista on 2022-8-15 14:3:51
* Licensed under FreeBSD License. * Licensed under FreeBSD License.
* See http://animista.net/license for more info. * See http://animista.net/license for more info.
* w: http://animista.net, t: @cssanimista * w: http://animista.net, t: @cssanimista
* ---------------------------------------------- */ * ---------------------------------------------- */