Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
memberTag-web
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
memberTag
memberTag-web
Commits
4b003911
Commit
4b003911
authored
Oct 24, 2022
by
huaying
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 分组滚动加载数据
parent
6e9ea573
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
4 deletions
+9
-4
batch-list.vue
src/components/tag/batch-list.vue
+8
-3
group-list.vue
src/view/memberGroup/group-list.vue
+1
-1
No files found.
src/components/tag/batch-list.vue
View file @
4b003911
...
...
@@ -70,7 +70,8 @@ export default {
pageNum
:
1
,
totalPage
:
1
},
loading
:
false
loading
:
false
,
loadings
:
false
,
};
},
directives
:
{
...
...
@@ -79,7 +80,7 @@ export default {
const
SELECTDOWN_DOM
=
el
.
querySelector
(
'.el-select-dropdown .el-select-dropdown__wrap'
);
SELECTDOWN_DOM
.
addEventListener
(
'scroll'
,
function
()
{
const
CONDITION
=
this
.
scrollHeight
-
this
.
scrollTop
-
100
<=
this
.
clientHeight
;
if
(
CONDITION
)
{
if
(
CONDITION
&&
!
this
.
loadings
)
{
binding
.
value
();
}
})
...
...
@@ -174,6 +175,7 @@ export default {
getMemberGroupList
()
{
const
{
classifyName
,
pageNum
}
=
this
.
params
;
this
.
loading
=
true
;
this
.
loadings
=
true
;
if
(
pageNum
==
1
)
{
this
.
groupList
=
[];
}
...
...
@@ -190,7 +192,10 @@ export default {
this
.
groupList
=
this
.
groupList
.
concat
(
result
.
result
.
filter
(
el
=>
el
.
classifyName
!=
'未分类'
&&
el
.
classifyName
!=
null
));
}
this
.
params
.
totalPage
=
result
.
totalPage
;
}).
finally
(()
=>
this
.
loading
=
false
);
}).
finally
(()
=>
{
this
.
loading
=
false
;
this
.
loadings
=
false
});
},
checkGroup
()
{
this
.
loading
=
true
;
...
...
src/view/memberGroup/group-list.vue
View file @
4b003911
...
...
@@ -82,7 +82,7 @@ export default {
this
.
getMemberGroupList
();
},
onScroll
(
e
)
{
if
((
e
.
target
.
scrollTop
+
e
.
target
.
clientHeight
)
>=
this
.
lists
.
length
*
20
)
{
if
((
e
.
target
.
scrollTop
+
e
.
target
.
clientHeight
)
>=
this
.
lists
.
length
*
20
&&
!
this
.
memberGroupLoading
)
{
this
.
onPageNumChange
();
}
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment