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 a854b3c8
authored
Jun 29, 2021
by
amateur
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修改首页下拉刷新样式
1 parent
9389248e
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
0 deletions
src/components/NafmPullRefresh.vue
src/views/home/index.vue
src/components/NafmPullRefresh.vue
View file @
a854b3c
<
template
>
<
template
>
<van-pull-refresh
v-model=
"refreshing"
@
refresh=
"$emit('refresh')"
>
<van-pull-refresh
v-model=
"refreshing"
@
refresh=
"$emit('refresh')"
>
<template
v-if=
"$slots.loading"
#
loading
>
<slot
name=
"loading"
></slot>
</
template
>
<slot></slot>
<slot></slot>
</van-pull-refresh>
</van-pull-refresh>
</template>
</template>
...
...
src/views/home/index.vue
View file @
a854b3c
...
@@ -15,6 +15,9 @@
...
@@ -15,6 +15,9 @@
</nafm-header>
</nafm-header>
<main>
<main>
<NafmPullRefresh
v-model=
"refresh"
@
refresh=
"fetchData"
>
<NafmPullRefresh
v-model=
"refresh"
@
refresh=
"fetchData"
>
<template
#
loading
>
<van-loading
size=
"20px"
color=
"#fff"
>
加载中...
</van-loading>
</
template
>
<HomeBanner
:data=
"HomeData"
/>
<HomeBanner
:data=
"HomeData"
/>
<MenuModule
:data=
"HomeData"
/>
<MenuModule
:data=
"HomeData"
/>
<HotScrollBar
:data=
"HomeData"
/>
<HotScrollBar
:data=
"HomeData"
/>
...
@@ -87,7 +90,9 @@ export default {
...
@@ -87,7 +90,9 @@ export default {
fetchData
()
{
fetchData
()
{
this
.
$store
.
dispatch
(
'home/AGetHomeData'
).
then
(
res
=>
{
this
.
$store
.
dispatch
(
'home/AGetHomeData'
).
then
(
res
=>
{
setTimeout
(()
=>
{
this
.
refresh
=
false
this
.
refresh
=
false
},
2000
);
})
})
},
},
...
@@ -121,6 +126,9 @@ export default {
...
@@ -121,6 +126,9 @@ export default {
main
{
main
{
padding
:
0
@
PaddingSize
;
padding
:
0
@
PaddingSize
;
/deep/.van-pull-refresh__head
{
color
:
white
;
}
}
}
}
}
...
...
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