Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
polysoft-nafmii
/
polysoft-h5
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 27a43e89
authored
May 20, 2021
by
amateur
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
优化
1 parent
5456a7d7
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
10 deletions
src/views/homeSearch/index.vue
src/views/homeSearch/result.vue
src/views/homeSearch/index.vue
View file @
27a43e8
<
template
>
<
template
>
<div
class=
"global-search"
>
<SearchLayout
:history=
"true"
@
search=
"handleSearch"
/>
<SearchLayout
:history=
"true"
@
seach=
"handleSearch"
/>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
...
@@ -15,14 +13,8 @@ export default {
...
@@ -15,14 +13,8 @@ export default {
},
},
methods
:
{
methods
:
{
handleSearch
(
val
)
{
handleSearch
(
val
)
{
// this.$router.push({ name: '
', query: { keyword: val } })
this
.
$router
.
push
({
name
:
'GlobalSearchResult
'
,
query
:
{
keyword
:
val
}
})
}
}
}
}
}
}
</
script
>
</
script
>
<
style
lang=
"less"
scoped
>
.global-search
{
height
:
100%
;
}
</
style
>
\ No newline at end of file
\ No newline at end of file
src/views/homeSearch/result.vue
View file @
27a43e8
...
@@ -5,12 +5,18 @@
...
@@ -5,12 +5,18 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
SearchLayout
from
'./components/SearchLayout'
export
default
{
export
default
{
name
:
'HomeSearchResult'
,
name
:
'HomeSearchResult'
,
components
:
{
SearchLayout
},
data
()
{
data
()
{
return
{
return
{
keyword
:
null
keyword
:
null
}
}
},
mounted
()
{
const
{
keyword
}
=
this
.
$route
.
query
this
.
keyword
=
keyword
}
}
}
}
</
script
>
</
script
>
\ No newline at end of file
\ No newline at end of file
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment