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 {
position: fixed;
}
@font-face {
font-family: 'icomoon';//这个可以任意取,但是应与后面相对应eg:yxingguang
src: url('../fonts/YouSheBiaoTiHei-2.ttf');
}
font-family: 'icomoon'; //这个可以任意取,但是应与后面相对应eg:yxingguang
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";
const Header = (props) => {
const { dispatch, history, user, actions, socket ,headerItems,tochange} = props;
const { dispatch, history, user, actions, socket, headerItems, tochange } = props;
return (
<>
@ -35,30 +35,30 @@ const Header = (props) => {
style={{ display: "inline-block", width: 280, height: 40 }}
/>
),
// text: (
// <div style={{fontFamily: "icomoon",color:'#FFFFFF'}}></div>
// ),
text: (
<div style={{ fontFamily: "icomoon", color: '#FFFFFF' }}>运维管理系统</div>
),
}}
footer={
<>
{headerItems.map((item,index)=>{
if(item.hasOwnProperty('items')){
return(
{headerItems.map((item, index) => {
if (item.hasOwnProperty('items')) {
return (
<Nav.Sub
key={index+'a'}
key={index + 'a'}
itemKey={item.itemKey}
text={item.text}
dropdownStyle={{color:'#F2F3F5'}}
dropdownStyle={{ color: '#F2F3F5' }}
>
{item.hasOwnProperty('items')&&item.items.map((ite,idx)=>(
<Nav.Item key={idx+'d'} itemKey={ite.itemKey} text={ite.text} onClick={()=>{tochange(ite);}}/>
{item.hasOwnProperty('items') && item.items.map((ite, idx) => (
<Nav.Item key={idx + 'd'} itemKey={ite.itemKey} text={ite.text} onClick={() => { tochange(ite); }} />
))}
</Nav.Sub>
)
}
else{
return(
<Nav.Item key={index+'a'} itemKey={item.itemKey} text={item.text} onClick={()=>{tochange(item)}} />
else {
return (
<Nav.Item key={index + 'a'} itemKey={item.itemKey} text={item.text} onClick={() => { tochange(item) }} />
)
}
})}
@ -72,7 +72,7 @@ const Header = (props) => {
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" />
</Avatar>
<div style={{

Loading…
Cancel
Save