Commit 44c870e6 by zhaochengxiang

资产项显示字段

parent 6f73b805
......@@ -16,14 +16,22 @@ const MetadataInfo = ({ value = '', config = true }) => {
return (
<AppContext.Consumer>
{
value => <span>
value => <div className='flex'>
{
(typeof metadata==='string') ? <span style={{ marginRight: 5 }}>{metadata||''}</span> : <a onClick={() => {
value?.setGlobalState && value?.setGlobalState({
message: 'data-govern-show-metadata-message',
data: metadata
})
}} style={{ marginRight: 5 }}>{metadata?.tableName||''}</a>
(typeof metadata==='string') ? <span style={{ marginRight: 5 }}>{metadata||''}</span> : <div className='flex' style={{ flexDirection: 'column' }}>
<a onClick={() => {
value?.setGlobalState && value?.setGlobalState({
message: 'data-govern-show-metadata-message',
data: metadata
})
}} style={{ marginRight: 5, marginTop: 5 }}>{metadata?.tableName||''}
</a>
{
metadata?.columnItems.map((item, index) => {
return <span key={index}>{item.metadataColumnName||''}</span>
})
}
</div>
}
{
config && <Button icon={<SettingFilled />} onClick={() => {
......@@ -33,7 +41,7 @@ const MetadataInfo = ({ value = '', config = true }) => {
})
}} />
}
</span>
</div>
}
</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