Commit fc3d19d0 by zhaochengxiang

bug fix

parent 3681dba5
import React, { useEffect, useState, useRef, useMemo } from 'react'; import React, { useEffect, useState, useRef, useMemo } from 'react';
import {Card, Spin, Tooltip, Tree, Modal, AutoComplete} from 'antd'; import {Card, Spin, Tooltip, Tree, Modal, AutoComplete, Button} from 'antd';
import { ReloadOutlined, SettingOutlined } from '@ant-design/icons'; import { ReloadOutlined, SettingOutlined } from '@ant-design/icons';
import { useContextMenu, Menu as RcMenu, Item as RcItem } from "react-contexify"; import { useContextMenu, Menu as RcMenu, Item as RcItem } from "react-contexify";
...@@ -9,6 +9,7 @@ import { showMessage, getQueryParam, getAssetRange } from '../../../../util'; ...@@ -9,6 +9,7 @@ import { showMessage, getQueryParam, getAssetRange } from '../../../../util';
import { AnchorTimestamp, AnchorId, AssetBrowseReference, ResourceBrowseReference, AnchorDirId } from '../../../../util/constant'; import { AnchorTimestamp, AnchorId, AssetBrowseReference, ResourceBrowseReference, AnchorDirId } from '../../../../util/constant';
import { highlightSearchContentByTerms } from '../../../../util'; import { highlightSearchContentByTerms } from '../../../../util';
import PermissionRcItem from '../../../../util/Component/PermissionRcItem'; import PermissionRcItem from '../../../../util/Component/PermissionRcItem';
import PermissionButton from '../../../../util/Component/PermissionButton'
import './AssetTree.less'; import './AssetTree.less';
import 'react-contexify/dist/ReactContexify.css'; import 'react-contexify/dist/ReactContexify.css';
...@@ -530,20 +531,31 @@ const AssetTree = (props) => { ...@@ -530,20 +531,31 @@ const AssetTree = (props) => {
className='asset-tree' className='asset-tree'
title={ title={
<div <div
className='flex px-2' className='flex px-3'
style={{ style={{
height: 40, height: 57,
alignItems: 'center', alignItems: 'center',
justifyContent: 'space-around', justifyContent: 'space-between',
}} }}
> >
<Tooltip title="刷新目录"> <Tooltip title="刷新目录">
<ReloadOutlined className='default' onClick={refreshTree} style={{ fontSize:16,cursor:'pointer',flex:1}} /> <Button type='text' icon={<ReloadOutlined />} onClick={refreshTree} />
</Tooltip> </Tooltip>
<Tooltip title={haveCustomPermission?"自定义目录":"暂无权限"}> <PermissionButton
defaultPermission={haveCustomPermission}
tip="自定义目录"
type="text"
icon={<SettingOutlined />}
onClick={customDir}
/>
<div style={{ width: 32 }} />
<div style={{ width: 32 }} />
<div style={{ width: 32 }} />
{/* <Tooltip title={haveCustomPermission?"自定义目录":"暂无权限"}>
<SettingOutlined className={(!haveCustomPermission)?'disable': 'default'} onClick={customDir} style={{ fontSize:16,cursor:(!haveCustomPermission)?'not-allowed':'pointer',flex:1}} /> <SettingOutlined className={(!haveCustomPermission)?'disable': 'default'} onClick={customDir} style={{ fontSize:16,cursor:(!haveCustomPermission)?'not-allowed':'pointer',flex:1}} />
</Tooltip> </Tooltip> */}
<div style={{ flex: 3 }}></div> {/* <div style={{ flex: 3 }}></div> */}
</div> </div>
} }
bordered={false} bordered={false}
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
} }
.yy-tree{ .yy-tree{
height: calc(100vh - @header-height - @breadcrumb-height - 25px - 40px - 62px) !important; height: calc(100vh - @header-height - @breadcrumb-height - 25px - 57px - 62px) !important;
overflow: auto !important; overflow: auto !important;
} }
......
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