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 9106c794
authored
Jun 09, 2021
by
amateur
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
新闻动态
1 parent
52665ae9
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
11 deletions
src/store/modules/search.js
src/views/news/index.vue
src/views/news/search.vue
src/store/modules/search.js
View file @
9106c79
...
@@ -3,7 +3,9 @@ const Types = {
...
@@ -3,7 +3,9 @@ const Types = {
Home
:
{
size
:
10
},
Home
:
{
size
:
10
},
RegIssue
:
{
size
:
10
},
RegIssue
:
{
size
:
10
},
InfoDisclosure
:
{
size
:
10
},
InfoDisclosure
:
{
size
:
10
},
SelfRegulating
:
{
size
:
10
}
SelfRegulating
:
{
size
:
10
},
News
:
{
size
:
10
},
}
}
import
utils
from
'@/utils/index'
import
utils
from
'@/utils/index'
...
@@ -13,7 +15,8 @@ export default {
...
@@ -13,7 +15,8 @@ export default {
Home
:
[],
Home
:
[],
RegIssue
:
[],
RegIssue
:
[],
InfoDisclosure
:
[],
InfoDisclosure
:
[],
SelfRegulating
:
[]
SelfRegulating
:
[],
News
:
[]
},
},
mutations
:
{
mutations
:
{
MSetHistoryDatas
(
state
,
{
key
,
datas
})
{
MSetHistoryDatas
(
state
,
{
key
,
datas
})
{
...
...
src/views/news/index.vue
View file @
9106c79
...
@@ -2,19 +2,20 @@
...
@@ -2,19 +2,20 @@
<div
class=
"news"
>
<div
class=
"news"
>
<nafm-header
navClass=
"nafmii-head-bg3"
>
<nafm-header
navClass=
"nafmii-head-bg3"
>
<template
slot=
"bottom"
>
<template
slot=
"bottom"
>
<SearchInput
:placeholder=
"$t('home.searchPlaceholder')"
/>
<SearchInput
v-model=
"keyword"
readonly
@
click=
"handleSearch"
:placeholder=
"$t('home.searchPlaceholder')"
/>
<div
class=
"nav-placeholder"
></div>
<div
class=
"nav-placeholder"
></div>
</
template
>
</
template
>
</nafm-header>
</nafm-header>
<van-tabs
v-model=
"active"
animated
scrollspy
swipe-threshold=
"3"
class=
"data-tabs"
>
<van-tabs
v-model=
"active"
animated
scrollspy
swipe-threshold=
"3"
class=
"data-tabs"
>
<van-tab
:title=
"item.name"
v-for=
"(item,idx) in tabs"
:key=
"idx"
>
<van-tab
:title=
"item.name"
v-for=
"(item,idx) in tabs"
:key=
"idx"
>
<DataListLayout
:tab=
"item"
/>
<DataListLayout
:
keyword=
"keyword"
:
tab=
"item"
/>
</van-tab>
</van-tab>
</van-tabs>
</van-tabs>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
{
KeywordBus
}
from
'@/utils/eventBus'
import
SearchInput
from
'@/components/SearchInput'
import
SearchInput
from
'@/components/SearchInput'
import
DataListLayout
from
'./components/DataListLayout'
import
DataListLayout
from
'./components/DataListLayout'
export
default
{
export
default
{
...
@@ -23,6 +24,7 @@ export default {
...
@@ -23,6 +24,7 @@ export default {
data
()
{
data
()
{
return
{
return
{
active
:
0
,
active
:
0
,
keyword
:
null
,
tabs
:
[]
tabs
:
[]
}
}
},
},
...
@@ -34,10 +36,23 @@ export default {
...
@@ -34,10 +36,23 @@ export default {
{
type
:
3
,
name
:
'通知'
},
{
type
:
3
,
name
:
'通知'
},
{
type
:
4
,
name
:
'其他'
},
{
type
:
4
,
name
:
'其他'
},
]
]
},
handleSearch
()
{
this
.
$router
.
push
({
name
:
'SelfRegulatingSearch'
})
},
initKeywordListener
()
{
KeywordBus
.
on
((
val
)
=>
{
this
.
keyword
=
val
})
}
}
},
},
mounted
()
{
mounted
()
{
this
.
onGetTabs
()
this
.
onGetTabs
()
this
.
initKeywordListener
()
},
destroyed
()
{
KeywordBus
.
off
()
}
}
}
}
</
script
>
</
script
>
...
...
src/views/news/search.vue
View file @
9106c79
<
template
>
<
template
>
<
div
class=
"news-search"
></div
>
<
ModuleSearchLayout
@
onSearch=
"handleSearch"
stateKey=
"News"
/
>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
KeywordBus
}
from
'@/utils/eventBus'
import
ModuleSearchLayout
from
'@/components/ModuleSearchLayout'
export
default
{
export
default
{
name
:
'NewsSearch'
name
:
'NewSearch'
,
}
components
:
{
ModuleSearchLayout
},
</
script
>
data
()
{
return
{
}
},
methods
:
{
handleSearch
(
val
)
{
KeywordBus
.
emit
(
val
)
this
.
$router
.
back
();
}
}
<
style
lang=
"less"
scoped
>
.news
{
}
}
</
style
>
\ No newline at end of file
\ No newline at end of file
</
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