Browse Source

font

release_0.0.1
巴林闲侠 2 years ago
parent
commit
bfba015319
  1. 0
      web/client/assets/fonts/YouSheBiaoTiHei-2.ttf
  2. 7
      web/client/src/index.less
  3. 30
      web/client/src/layout/components/header/index.jsx

0
web/client/fonts/YouSheBiaoTiHei-2.ttf → web/client/assets/fonts/YouSheBiaoTiHei-2.ttf

7
web/client/src/index.less

@ -67,7 +67,8 @@ body {
.semi-portal-inner { .semi-portal-inner {
position: fixed; position: fixed;
} }
@font-face { @font-face {
font-family: 'icomoon';//这个可以任意取,但是应与后面相对应eg:yxingguang font-family: 'icomoon'; //这个可以任意取,但是应与后面相对应eg:yxingguang
src: url('../fonts/YouSheBiaoTiHei-2.ttf'); src: url('/assets/fonts/YouSheBiaoTiHei-2.ttf');
} }

30
web/client/src/layout/components/header/index.jsx

@ -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={{

Loading…
Cancel
Save