Commit 8a5b9af0 by zhaochengxiang

无资产选中 详情显示要素

parent fc9103fd
......@@ -35,7 +35,7 @@ const AssetAction = (props) => {
} else {
setMetadataId('');
setAssetParams({...assetParams, ...{assets: {}, attributes: []}});
setElements([]);
getElements();
}
}
//eslint-disable-next-line react-hooks/exhaustive-deps
......@@ -50,7 +50,6 @@ const AssetAction = (props) => {
setElements(data||[]);
onElementsChange && onElementsChange(data||[]);
if (action === 'add') {
const _attributes = [];
(data||[]).forEach(element => {
if (_attributes.indexOf(element.type) === -1) {
......@@ -67,7 +66,6 @@ const AssetAction = (props) => {
setAssetParams({ assets: {}, attributes: _attributes, attributesFoldMap: newAttributesFoldMap });
form?.resetFields();
}
cb && cb();
},
......@@ -260,6 +258,8 @@ const AssetAction = (props) => {
<div>资产详情</div>
<Space>
{
((id||'')!=='') && <React.Fragment>
{
(currentAction!=='detail') && <Tooltip title='取消编辑'>
<Button
onClick={onCancelButtonClick}
......@@ -276,6 +276,8 @@ const AssetAction = (props) => {
type='text'
/>
</Tooltip>
</React.Fragment>
}
<Tooltip title={fullScreen?'取消全屏':'全屏'}>
<Button
onClick={onFullScreenClick}
......@@ -287,11 +289,10 @@ const AssetAction = (props) => {
</div>
}
{
(action!=='add') && <div>
(action!=='add' && (id||'')!=='') && <div>
<div className='pl-common py-compact-common'>
<Descriptions column={1}>
{
(assets.currentPath||'')!=='' && <Descriptions.Item
<Descriptions.Item
label={<div className='title-text' style={{ textAlign: 'right', width: 60 }}>资产路径</div>}
style={{ paddingBottom: 15 }}
>
......@@ -299,7 +300,6 @@ const AssetAction = (props) => {
{assets.currentPath||''}
</a>
</Descriptions.Item>
}
<Descriptions.Item label={<div className='title-text' style={{ textAlign: 'right', width: 60 }}>资产标签</div>} style={{ paddingBottom: 0 }}>
<AppContext.Consumer>
{
......
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