更改首页逻辑

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 pageSizeOptions = ref(['5', '10', '20', '50'])
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 searchValue = ref(str)
let tecHnosphere = router.currentRoute.value.query.tecHnosphere
@ -1424,7 +1425,7 @@
getNewList()
if (!tecHnosphere && !appLiCation) {
if (searchValue.value) {
if (searchValue.value && !select2) {
globalSearch()
} else {
getAppResources2()

View File

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