Commit 90d3c40d authored by chenshouchao's avatar chenshouchao

feat: 操作列优化

parent c8949adb
......@@ -102,6 +102,13 @@ const ProjectData = observer(() => {
}
}, [list, dataSetList, activeTab]);
// 是否全是文件夹
const isAllDirectory = useMemo(() => {
return showList.every((li: any) => {
return li.type === "directory";
});
}, [showList]);
// 全(文件、文件夹、数据集)列表
const allList = useMemo(() => {
return [...list, ...dataSetList];
......@@ -341,13 +348,17 @@ const ProjectData = observer(() => {
const renderButtons = (item: any) => {
return (
<span>
{item.type !== "dataSet" && item.type !== "directory" && (
{!isAllDirectory && (
<Button
sx={{
position: "relative",
left: "-4px",
minWidth: "10px",
marginRight: "10px",
visibility:
item.type !== "dataSet" && item.type !== "directory"
? "visible"
: "hidden",
}}
variant="text"
size="small"
......
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