Skip to content

Commit 1aea415

Browse files
author
piexlmax
committed
[fixed]: 点击菜单项跳转无效 flipped-aurora#1378
1 parent 6dd8fd0 commit 1aea415

File tree

2 files changed

+55
-57
lines changed

2 files changed

+55
-57
lines changed

web/src/style/main.scss

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1079,26 +1079,6 @@ $mainHight: 100vh;
10791079
}
10801080
}
10811081

1082-
.transition-box {
1083-
overflow: hidden;
1084-
width: 160px;
1085-
margin-right: 32px;
1086-
text-align: center;
1087-
margin-top: -12px;
1088-
.el-input__wrapper{
1089-
.el-input__inner{
1090-
height: 100%;
1091-
}
1092-
box-shadow: none !important;
1093-
}
1094-
.el-select .el-input .el-input__wrapper.is-focus{
1095-
box-shadow: none !important;
1096-
}
1097-
.el-select .el-input.is-focus .el-input__wrapper{
1098-
box-shadow: none !important;
1099-
}
1100-
}
1101-
11021082
.screenfull {
11031083
overflow: hidden;
11041084
color: rgba($color: #000000, $alpha: 0.65);
@@ -1223,4 +1203,4 @@ $mainHight: 100vh;
12231203

12241204
.justify-content-flex-end {
12251205
justify-content: flex-end;
1226-
}
1206+
}

web/src/view/layout/search/search.vue

Lines changed: 54 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
<template>
22
<div class="search-component">
3-
<div v-if="show" class="transition-box" style="display: inline-block;">
3+
<div v-if="show" class="transition-box">
44
<el-select
55
ref="searchInput"
6-
v-model="value"
76
filterable
87
placeholder="请选择"
98
@blur="hiddenSearch"
@@ -17,30 +16,28 @@
1716
/>
1817
</el-select>
1918
</div>
20-
<div
21-
v-if="btnShow"
22-
class="user-box"
23-
>
24-
<div class="gvaIcon gvaIcon-refresh" :class="[reload ? 'reloading' : '']" @click="handleReload" />
25-
</div>
26-
<div
27-
v-if="btnShow"
28-
class="user-box"
29-
>
30-
<div class="gvaIcon gvaIcon-search" @click="showSearch" />
31-
</div>
32-
<div
33-
v-if="btnShow"
34-
class="user-box"
35-
>
36-
<Screenfull class="search-icon" :style="{cursor:'pointer'}" />
37-
</div>
38-
<div
39-
v-if="btnShow"
40-
class="user-box"
41-
>
42-
<div class="service gvaIcon-customer-service" @click="toService" />
43-
</div>
19+
<template v-else>
20+
<div
21+
class="user-box"
22+
>
23+
<div class="gvaIcon gvaIcon-refresh" :class="[reload ? 'reloading' : '']" @click="handleReload" />
24+
</div>
25+
<div
26+
class="user-box"
27+
>
28+
<div class="gvaIcon gvaIcon-search" @click="showSearch" />
29+
</div>
30+
<div
31+
class="user-box"
32+
>
33+
<Screenfull class="search-icon" :style="{cursor:'pointer'}" />
34+
</div>
35+
<div
36+
class="user-box"
37+
>
38+
<div class="service gvaIcon-customer-service" @click="toService" />
39+
</div>
40+
</template>
4441
</div>
4542
</template>
4643

@@ -61,22 +58,23 @@ const router = useRouter()
6158
6259
const routerStore = useRouterStore()
6360
64-
const value = ref('')
65-
const changeRouter = () => {
66-
router.push({ name: value.value })
67-
value.value = ''
61+
const changeRouter = (e) => {
62+
if (e.indexOf('http:') > -1 || e.indexOf('https:') > -1) {
63+
window.open(e)
64+
return
65+
}
66+
router.push({ name: e })
6867
}
6968
70-
const show = ref(false)
71-
const btnShow = ref(true)
72-
const hiddenSearch = () => {
73-
show.value = false
74-
btnShow.value = true
69+
const show = ref(true)
70+
const hiddenSearch = async() => {
71+
setTimeout(() => {
72+
show.value = false
73+
}, 100)
7574
}
7675
7776
const searchInput = ref(null)
7877
const showSearch = async() => {
79-
btnShow.value = false
8078
show.value = true
8179
await nextTick()
8280
searchInput.value.focus()
@@ -100,6 +98,26 @@ const toService = () => {
10098
font-size: 18px;
10199
}
102100
101+
.transition-box {
102+
overflow: hidden;
103+
width: 160px;
104+
margin-right: 32px;
105+
text-align: center;
106+
::v-deep(.el-input__wrapper){
107+
.el-input__inner{
108+
border-bottom: 1px solid var(--el-color-info-light-7);
109+
}
110+
box-shadow: none !important;
111+
}
112+
::v-deep(.el-select .el-input .el-input__wrapper.is-focus){
113+
box-shadow: none !important;
114+
}
115+
::v-deep(.el-select .el-input.is-focus .el-input__wrapper){
116+
box-shadow: none !important;
117+
}
118+
}
119+
120+
103121
.reloading{
104122
animation:turn 0.5s linear infinite;
105123
}

0 commit comments

Comments
 (0)