|
|
|
@ -219,7 +219,6 @@ function JupyterTPI (props) {
|
|
|
|
|
title: '重置环境',
|
|
|
|
|
content: (
|
|
|
|
|
<p style={{ lineHeight: '24px' }}>
|
|
|
|
|
你在本文件中修改的内容将丢失,<br />
|
|
|
|
|
是否确定重置环境?
|
|
|
|
|
</p>
|
|
|
|
|
),
|
|
|
|
@ -277,20 +276,22 @@ function JupyterTPI (props) {
|
|
|
|
|
const firstDrawerWidth = ()=>{
|
|
|
|
|
return 260
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
let newPage=false
|
|
|
|
|
// 分页处理
|
|
|
|
|
const handleChangePage = (e) => {
|
|
|
|
|
const handleChangePage = (e,page) => {
|
|
|
|
|
//滑动到底判断
|
|
|
|
|
let newscrollTop=parseInt(e.currentTarget.scrollTop);
|
|
|
|
|
let allclientHeight=e.currentTarget.clientHeight+newscrollTop;
|
|
|
|
|
if(e.currentTarget.scrollHeight-allclientHeight===0||e.currentTarget.scrollHeight-allclientHeight===1||e.currentTarget.scrollHeight-allclientHeight===-1){
|
|
|
|
|
handlePageChange(pagination.page+1);
|
|
|
|
|
if(dataSets.length<total){
|
|
|
|
|
if(e.currentTarget.scrollHeight-allclientHeight===0||e.currentTarget.scrollHeight-allclientHeight===1||e.currentTarget.scrollHeight-allclientHeight===-1){
|
|
|
|
|
handlePageChange(page+1);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// const listCtx = ;
|
|
|
|
|
useEffect(() => {
|
|
|
|
|
if (dataSets.length > 0) {
|
|
|
|
|
console.log('数据集的个数: ', dataSets.length);
|
|
|
|
|
// console.log('数据集的个数: ', dataSets.length);
|
|
|
|
|
const oList = dataSets.map((item, i) => {
|
|
|
|
|
return (
|
|
|
|
|
<li className="jupyter_item" key={`key_${i}`}>
|
|
|
|
@ -314,7 +315,7 @@ function JupyterTPI (props) {
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
const oUl = (
|
|
|
|
|
<ul className="jupyter_data_list" onScroll={(event)=>handleChangePage(event)} >
|
|
|
|
|
<ul className="jupyter_data_list" onScroll={(event)=>handleChangePage(event,pagination.page)} >
|
|
|
|
|
{ oList }
|
|
|
|
|
</ul>
|
|
|
|
|
);
|
|
|
|
@ -413,7 +414,7 @@ function JupyterTPI (props) {
|
|
|
|
|
<i className={"iconfont icon-base"}></i>数据集
|
|
|
|
|
{/* <span className="iconfont icon-java jupyter_data_icon"></span>数据集 */}
|
|
|
|
|
</h2>
|
|
|
|
|
<h2 className="borbottom17212F jupyterfilepaths">
|
|
|
|
|
{dataSets&&dataSets.length===0?"":<h2 className="borbottom17212F jupyterfilepaths">
|
|
|
|
|
<span className={"ml50"}>文件路径</span>
|
|
|
|
|
<div className="sortinxdirection">
|
|
|
|
|
<a className="jupyter_name ml50 maxnamewidth186JUPYTER lineheighttaj colorlineheighttaj">{jupyter_folder_name}</a>
|
|
|
|
@ -423,7 +424,7 @@ function JupyterTPI (props) {
|
|
|
|
|
}}>复制地址</a>
|
|
|
|
|
</div>
|
|
|
|
|
<input id="jupyter_folder_name" className={"file_path_input"} value={jupyter_folder_name}/>
|
|
|
|
|
</h2>
|
|
|
|
|
</h2>}
|
|
|
|
|
{ renderCtx }
|
|
|
|
|
{/*<div className='jupyter_pagination'>*/}
|
|
|
|
|
{/* {total<20?"":<Pagination*/}
|
|
|
|
|