Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xiaomai-cloud-class-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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xiaomai-cloud-class
xiaomai-cloud-class-web
Commits
7aa920e6
Commit
7aa920e6
authored
Jul 16, 2021
by
wufan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:调试选择文件滚动加载
parent
c61c8de4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
6 deletions
+11
-6
src/modules/prepare-lesson/modal/SelectPrepareFileModal.jsx
+11
-6
No files found.
src/modules/prepare-lesson/modal/SelectPrepareFileModal.jsx
View file @
7aa920e6
...
...
@@ -291,6 +291,7 @@ class SelectPrepareFileModal extends React.Component {
const
{
fileListRef
}
=
this
.
refs
;
// const hasReachBottom = fileListRef.scrollTop + fileListRef.clientHeight === fileListRef.scrollHeight;
const
hasReachBottom
=
fileListRef
.
scrollTop
+
fileListRef
.
clientHeight
>
fileListRef
.
scrollHeight
-
1
;
console
.
log
(
"fileListRef.scrollTop + fileListRef.clientHeight"
,
hasReachBottom
,
fileListRef
.
scrollTop
,
fileListRef
.
clientHeight
,
fileListRef
.
scrollHeight
)
if
(
!
hasReachBottom
||
!
hasMore
)
return
;
const
currentFolder
=
folderPathList
[
folderPathList
.
length
-
1
];
...
...
@@ -579,8 +580,9 @@ class SelectPrepareFileModal extends React.Component {
}
</
div
>
{
!
_
.
isEmpty
(
folderList
)
?
<
div
>
<
Choose
>
<
When
condition=
{
!
_
.
isEmpty
(
folderList
)
}
>
<
div
>
<
div
className=
"file-list"
onScrollCapture=
{
()
=>
this
.
handleScrollEvent
()
}
style=
{
{
height
:
'320px'
,
overflowY
:
'auto'
}
}
...
...
@@ -617,8 +619,7 @@ class SelectPrepareFileModal extends React.Component {
// 文件禁止点击的情况(移动、直播场景下文件为Excel、文件已经被关联了、文件不合法)
const
disabled
=
hiddenVideo
||
(
!
isFolder
&&
operateType
===
'move'
)
||
(
scene
===
'liveCourse'
&&
folder
.
folderFormat
===
'EXCEL'
)
||
!!
hasRelation
||
(
!
isFolder
&&
!
FILE_SUFFIX_LIST
.
includes
(
suffix
));
// console.log('currentFile',currentFile);
// console.log('folder',folder);
let
currentFileCheck
=
false
;
if
(
currentFile
){
currentFileCheck
=
(
currentFile
.
id
===
folder
.
id
)
...
...
@@ -666,12 +667,16 @@ class SelectPrepareFileModal extends React.Component {
})
}
</
div
>
</
div
>
:
<
LottieIcon
</
div
>
</
When
>
<
Otherwise
>
<
LottieIcon
title=
{
<
span
className=
"desc"
>
这个文件夹是空的
</
span
>
}
type=
"college"
size=
{
150
}
/>
</
Otherwise
>
</
Choose
>
}
<
UploadProgressModal
...
...
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