|
@ -5,7 +5,7 @@ import { Nav, Avatar, Dropdown } from "@douyinfe/semi-ui"; |
|
|
import "./index.less"; |
|
|
import "./index.less"; |
|
|
|
|
|
|
|
|
const Header = (props) => { |
|
|
const Header = (props) => { |
|
|
const { dispatch, history, user, actions, socket ,headerItems,tochange} = props; |
|
|
const { dispatch, history, user, actions, socket, headerItems, tochange } = props; |
|
|
|
|
|
|
|
|
return ( |
|
|
return ( |
|
|
<> |
|
|
<> |
|
@ -35,30 +35,30 @@ const Header = (props) => { |
|
|
style={{ display: "inline-block", width: 280, height: 40 }} |
|
|
style={{ display: "inline-block", width: 280, height: 40 }} |
|
|
/> |
|
|
/> |
|
|
), |
|
|
), |
|
|
// text: ( |
|
|
text: ( |
|
|
// <div style={{fontFamily: "icomoon",color:'#FFFFFF'}}>运维管理系统</div> |
|
|
<div style={{ fontFamily: "icomoon", color: '#FFFFFF' }}>运维管理系统</div> |
|
|
// ), |
|
|
), |
|
|
}} |
|
|
}} |
|
|
footer={ |
|
|
footer={ |
|
|
<> |
|
|
<> |
|
|
{headerItems.map((item,index)=>{ |
|
|
{headerItems.map((item, index) => { |
|
|
if(item.hasOwnProperty('items')){ |
|
|
if (item.hasOwnProperty('items')) { |
|
|
return( |
|
|
return ( |
|
|
<Nav.Sub |
|
|
<Nav.Sub |
|
|
key={index+'a'} |
|
|
key={index + 'a'} |
|
|
itemKey={item.itemKey} |
|
|
itemKey={item.itemKey} |
|
|
text={item.text} |
|
|
text={item.text} |
|
|
dropdownStyle={{color:'#F2F3F5'}} |
|
|
dropdownStyle={{ color: '#F2F3F5' }} |
|
|
> |
|
|
> |
|
|
{item.hasOwnProperty('items')&&item.items.map((ite,idx)=>( |
|
|
{item.hasOwnProperty('items') && item.items.map((ite, idx) => ( |
|
|
<Nav.Item key={idx+'d'} itemKey={ite.itemKey} text={ite.text} onClick={()=>{tochange(ite);}}/> |
|
|
<Nav.Item key={idx + 'd'} itemKey={ite.itemKey} text={ite.text} onClick={() => { tochange(ite); }} /> |
|
|
))} |
|
|
))} |
|
|
</Nav.Sub> |
|
|
</Nav.Sub> |
|
|
) |
|
|
) |
|
|
} |
|
|
} |
|
|
else{ |
|
|
else { |
|
|
return( |
|
|
return ( |
|
|
<Nav.Item key={index+'a'} itemKey={item.itemKey} text={item.text} onClick={()=>{tochange(item)}} /> |
|
|
<Nav.Item key={index + 'a'} itemKey={item.itemKey} text={item.text} onClick={() => { tochange(item) }} /> |
|
|
) |
|
|
) |
|
|
} |
|
|
} |
|
|
})} |
|
|
})} |
|
@ -72,7 +72,7 @@ const Header = (props) => { |
|
|
color: "white", |
|
|
color: "white", |
|
|
}} |
|
|
}} |
|
|
> |
|
|
> |
|
|
<Avatar size="small" color="light-blue" style={{marginRight:4}}> |
|
|
<Avatar size="small" color="light-blue" style={{ marginRight: 4 }}> |
|
|
<img src="/assets/images/avatar/6.png" /> |
|
|
<img src="/assets/images/avatar/6.png" /> |
|
|
</Avatar> |
|
|
</Avatar> |
|
|
<div style={{ |
|
|
<div style={{ |
|
|