Commit 7aa920e6 by wufan

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

parent c61c8de4
...@@ -291,6 +291,7 @@ class SelectPrepareFileModal extends React.Component { ...@@ -291,6 +291,7 @@ class SelectPrepareFileModal extends React.Component {
const { fileListRef } = this.refs; const { fileListRef } = this.refs;
// const hasReachBottom = fileListRef.scrollTop + fileListRef.clientHeight === fileListRef.scrollHeight; // const hasReachBottom = fileListRef.scrollTop + fileListRef.clientHeight === fileListRef.scrollHeight;
const hasReachBottom = fileListRef.scrollTop + fileListRef.clientHeight > fileListRef.scrollHeight - 1; 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; if (!hasReachBottom || !hasMore) return;
const currentFolder = folderPathList[folderPathList.length - 1]; const currentFolder = folderPathList[folderPathList.length - 1];
...@@ -579,7 +580,8 @@ class SelectPrepareFileModal extends React.Component { ...@@ -579,7 +580,8 @@ class SelectPrepareFileModal extends React.Component {
} }
</div> </div>
{ {
!_.isEmpty(folderList) ? <Choose>
<When condition={!_.isEmpty(folderList)}>
<div> <div>
<div className="file-list" <div className="file-list"
onScrollCapture={() => this.handleScrollEvent()} onScrollCapture={() => this.handleScrollEvent()}
...@@ -617,8 +619,7 @@ class SelectPrepareFileModal extends React.Component { ...@@ -617,8 +619,7 @@ class SelectPrepareFileModal extends React.Component {
// 文件禁止点击的情况(移动、直播场景下文件为Excel、文件已经被关联了、文件不合法) // 文件禁止点击的情况(移动、直播场景下文件为Excel、文件已经被关联了、文件不合法)
const disabled = hiddenVideo || (!isFolder && operateType === 'move') || (scene === 'liveCourse' && folder.folderFormat === 'EXCEL') || !!hasRelation || (!isFolder && !FILE_SUFFIX_LIST.includes(suffix)); 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; let currentFileCheck = false;
if(currentFile){ if(currentFile){
currentFileCheck = (currentFile.id===folder.id) currentFileCheck = (currentFile.id===folder.id)
...@@ -666,12 +667,16 @@ class SelectPrepareFileModal extends React.Component { ...@@ -666,12 +667,16 @@ class SelectPrepareFileModal extends React.Component {
}) })
} }
</div> </div>
</div> : </div>
</When>
<Otherwise>
<LottieIcon <LottieIcon
title={<span className="desc">这个文件夹是空的</span>} title={<span className="desc">这个文件夹是空的</span>}
type="college" type="college"
size={150} size={150}
/> />
</Otherwise>
</Choose>
} }
<UploadProgressModal <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