Commit f3f5eadd by zhaochengxiang

资产详情页再次调整

parent 97a2ed1b
import React, { useEffect, useState } from "react";
import { Spin, Tabs, Descriptions } from "antd";
import { Spin, Tabs, Descriptions, Divider } from "antd";
import MetadataInfo from './MetadataInfo';
import { highlightSearchContentByTerms } from '../../../../util';
......@@ -55,14 +55,18 @@ const AssetDetail = (props)=>{
return(
<Spin spinning={loading}>
<Tabs activeKey={tabKey} onChange={onTabChange}>
{
(types||[]).map((type, index) => {
const _currentValues = (asset.elements||[]).filter(element => element.type===type);
return (
<TabPane tab={type} key={index}>
<div key={index}>
<div className='flex' style={{ alignItems: 'center', padding: '15px 0' }}>
<div style={{ width: 3, height: 14, backgroundColor: '#0069AC', marginRight: 5 }} />
<span style={{ fontWeight: 'bold', color: '#464646' }}>{type||''}</span>
</div>
<Descriptions column={2}>
{
(_currentValues||[]).map((item, index) => {
......@@ -76,11 +80,12 @@ const AssetDetail = (props)=>{
})
}
</Descriptions>
</TabPane>
<Divider style={{ margin: '10px 0' }} />
</div>
)
})
}
</Tabs>
</Spin>
)
}
......
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