Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
63f0a205
authored
Jun 18, 2024
by
cherishsince
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【优化】删除 image task 分页,改为 top 前多少数据
parent
dc31aeb2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
9 deletions
+11
-9
src/views/ai/image/ImageTask.vue
+11
-9
No files found.
src/views/ai/image/ImageTask.vue
View file @
63f0a205
...
...
@@ -57,7 +57,8 @@ const getImageList = async () => {
text
:
'加载中...'
})
const
{
list
}
=
await
ImageApi
.
getImageList
({
pageNo
:
pageNo
.
value
,
pageSize
:
pageSize
.
value
})
imageList
.
value
.
push
.
apply
(
imageList
.
value
,
list
)
// imageList.value.push.apply(imageList.value, list)
imageList
.
value
=
list
}
finally
{
if
(
imageTaskLoadingInstance
.
value
)
{
imageTaskLoadingInstance
.
value
.
close
();
...
...
@@ -118,14 +119,15 @@ const downloadImage = async (imageUrl) => {
}
const
handleTabsScroll
=
async
()
=>
{
if
(
imageTaskRef
.
value
)
{
const
{
scrollTop
,
scrollHeight
,
clientHeight
}
=
imageTaskRef
.
value
;
if
(
scrollTop
+
clientHeight
>=
scrollHeight
-
20
&&
!
imageTaskLoading
.
value
)
{
console
.
log
(
'分页'
)
pageNo
.
value
=
pageNo
.
value
+
1
await
getImageList
();
}
}
// todo 先不分页,只显示 top 前多少
// if (imageTaskRef.value) {
// const { scrollTop, scrollHeight, clientHeight } = imageTaskRef.value;
// if (scrollTop + clientHeight >= scrollHeight - 20 && !imageTaskLoading.value) {
// console.log('分页')
// pageNo.value = pageNo.value + 1
// await getImageList();
// }
// }
}
/** 暴露组件方法 */
...
...
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