Commit 68e00aaf by zhaochengxiang

资产管理目录分栏增加样式

parent 71fc27c0
...@@ -12,7 +12,7 @@ import { showMessage, getQueryParam } from '../../../../util'; ...@@ -12,7 +12,7 @@ import { showMessage, getQueryParam } from '../../../../util';
import { AnchorTimestamp, AnchorId, AssetManageReference, AssetBrowseReference, ResourceBrowseReference, AssetMountReference, AnchorDirId } from '../../../../util/constant'; import { AnchorTimestamp, AnchorId, AssetManageReference, AssetBrowseReference, ResourceBrowseReference, AssetMountReference, AnchorDirId } from '../../../../util/constant';
import { highlightSearchContentByTerms } from '../../../../util'; import { highlightSearchContentByTerms } from '../../../../util';
import './AssetTree.less'; import './AssetManageTree.less';
import 'react-contexify/dist/ReactContexify.css'; import 'react-contexify/dist/ReactContexify.css';
const { Option } = AutoComplete; const { Option } = AutoComplete;
...@@ -36,7 +36,7 @@ function updateTreeData(list, key, children) { ...@@ -36,7 +36,7 @@ function updateTreeData(list, key, children) {
const AssetManageTree = (props) => { const AssetManageTree = (props) => {
const MENU_ID = 'asset-tree'; const MENU_ID = 'asset-manage-tree';
const { show } = useContextMenu({ const { show } = useContextMenu({
id: MENU_ID, id: MENU_ID,
...@@ -652,19 +652,19 @@ const AssetManageTree = (props) => { ...@@ -652,19 +652,19 @@ const AssetManageTree = (props) => {
); );
if (item.children && item.children.length>0) { if (item.children && item.children.length>0) {
return { ...item, ...{title, key: item.nodeId, children: loop(item.children, rootResourceType, false)} }; return { ...item, ...{title, key: item.nodeId, children: loop(item.children, rootResourceType, false), className: (item.level===1)?'root':''} };
} }
if (rootResourceType !== 'custom') { if (rootResourceType !== 'custom') {
return { ...item, ...{ title, key: item.nodeId, isLeaf: true }}; return { ...item, ...{ title, key: item.nodeId, isLeaf: true, className: (item.level===1)?'root':'' }};
} }
return { ...item, ...{ title, key: item.nodeId, children: null}}; return { ...item, ...{ title, key: item.nodeId, children: null, className: (item.level===1)?'root':''}};
}); });
const classes = classNames('asset-tree', className, { const classes = classNames('asset-manage-tree', className, {
'asset-tree-read-only': (reference===AssetBrowseReference||reference===ResourceBrowseReference), 'asset-manage-tree-read-only': (reference===AssetBrowseReference||reference===ResourceBrowseReference),
'asset-tree-asset-mount-reference': reference===AssetMountReference, 'asset-manage-tree-asset-mount-reference': reference===AssetMountReference,
}); });
return ( return (
...@@ -726,7 +726,7 @@ const AssetManageTree = (props) => { ...@@ -726,7 +726,7 @@ const AssetManageTree = (props) => {
</AutoComplete> </AutoComplete>
<Tree <Tree
checkable={checkable} checkable={checkable}
showLine={true} showLine={false}
showIcon={false} showIcon={false}
onExpand={onExpand} onExpand={onExpand}
expandedKeys={expandedKeys} expandedKeys={expandedKeys}
...@@ -746,7 +746,7 @@ const AssetManageTree = (props) => { ...@@ -746,7 +746,7 @@ const AssetManageTree = (props) => {
displayMenu(event); displayMenu(event);
} }
}} }}
/> />
</Spin> </Spin>
<UpdateDirectoryModal <UpdateDirectoryModal
......
@import '../../../../variables.less';
.asset-manage-tree {
.yy-card-head-title {
padding: 0;
}
.yy-tree{
height: calc(100vh - @header-height - @breadcrumb-height - 25px - 40px - 62px) !important;
overflow: auto !important;
}
.root {
display: flex;
width: 100%;
background-color: #e7f2ff;
margin-bottom: 3px;
padding: 5px;
align-items: center;
}
.site-tree-search-value {
color: #f50;
}
}
.asset-manage-tree-read-only {
.yy-tree {
height: calc(100vh - @header-height - @breadcrumb-height - 25px - 62px) !important;;
overflow: auto !important;
}
}
.asset-manage-tree-asset-mount-reference {
.yy-tree {
height: 400px !important;
overflow: auto !important;
}
}
\ No newline at end of file
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