Commit 7aa920e6 by wufan

fix:调试选择文件滚动加载

parent c61c8de4
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment