commit
908cf81ebf
@ -0,0 +1,55 @@
|
|||||||
|
/*
|
||||||
|
* @Description:
|
||||||
|
* @Author: tangjiang
|
||||||
|
* @Github:
|
||||||
|
* @Date: 2019-12-12 10:34:03
|
||||||
|
* @LastEditors: tangjiang
|
||||||
|
* @LastEditTime: 2019-12-12 11:22:11
|
||||||
|
*/
|
||||||
|
import './index.scss';
|
||||||
|
import React from 'react';
|
||||||
|
import {Icon, Empty} from 'antd';
|
||||||
|
import MyIcon from '../../../../common/components/MyIcon';
|
||||||
|
|
||||||
|
function LeftPane (props) {
|
||||||
|
|
||||||
|
// 获取数据集
|
||||||
|
const { dataSets = [] } = props;
|
||||||
|
|
||||||
|
// 渲染数据集
|
||||||
|
const renderList = () => {
|
||||||
|
// 空数据
|
||||||
|
if (dataSets.length === 0) {
|
||||||
|
return <div className="jupyter_empty">
|
||||||
|
<Empty />
|
||||||
|
</div>
|
||||||
|
} else {
|
||||||
|
// 渲染列表
|
||||||
|
const oList = dataSets.map((item, i) => {
|
||||||
|
return (
|
||||||
|
<li className="jupyter_item" key={`key_${i}`}>
|
||||||
|
<Icon type="file-text" className="jupyter_icon"/>
|
||||||
|
<span className="jupyter_name">{item.title}</span>
|
||||||
|
</li>
|
||||||
|
);
|
||||||
|
});
|
||||||
|
return (
|
||||||
|
<ul className="jupyter_data_list">
|
||||||
|
{ oList }
|
||||||
|
</ul>
|
||||||
|
);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className="jupyter_data_sets_area">
|
||||||
|
<h2 className="jupyter_h2_title">
|
||||||
|
<MyIcon type="iconwenti" className="jupyter_data_icon"/> 数据集
|
||||||
|
</h2>
|
||||||
|
{renderList()}
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
export default LeftPane;
|
@ -0,0 +1,50 @@
|
|||||||
|
.jupyter_data_sets_area{
|
||||||
|
height: 100%;
|
||||||
|
.jupyter_h2_title{
|
||||||
|
height: 50px;
|
||||||
|
line-height: 50px;
|
||||||
|
background-color: #EEEEEE;
|
||||||
|
padding: 0 30px;
|
||||||
|
.jupyter_data_icon{
|
||||||
|
color: #7286ff;
|
||||||
|
font-size: 24px;
|
||||||
|
position: relative;
|
||||||
|
top: 2px;
|
||||||
|
transform: scale(1.5);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.jupyter_data_list,
|
||||||
|
.jupyter_empty{
|
||||||
|
height: calc(100vh - 110px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.jupyter_data_list{
|
||||||
|
.jupyter_item{
|
||||||
|
line-height:45px;
|
||||||
|
border-bottom: 1px solid rgba(238,238,238, 1);
|
||||||
|
padding: 0 30px 0 60px;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow:ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
cursor: pointer;
|
||||||
|
.jupyter_icon{
|
||||||
|
color: rgb(74, 188, 125);
|
||||||
|
font-size: 16px;
|
||||||
|
transform: scale(1.2);
|
||||||
|
margin-right: 5px;
|
||||||
|
}
|
||||||
|
.jupyter_name{
|
||||||
|
color: #000;
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.jupyter_empty{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in new issue