Browse Source

feat:修改标题样式

master
zhaobing 9 months ago
parent
commit
b51fda8c6d
  1. 7
      web-screen/client/src/layout/components/header/index.js
  2. 3
      web-screen/client/src/layout/components/header/style.css

7
web-screen/client/src/layout/components/header/index.js

@ -29,6 +29,7 @@ const Header = props => {
const [deviceManageTabsVisible, setDeviceManageTabsVisible] = useState(false) const [deviceManageTabsVisible, setDeviceManageTabsVisible] = useState(false)
const [currentSubMenuTab, setCurrentSubMenuTab] = useState('') const [currentSubMenuTab, setCurrentSubMenuTab] = useState('')
const [tab, setTab] = useState('leader') const [tab, setTab] = useState('leader')
const [projectName, setProjectName ]= useState('')
const [weather, setWeather] = useState([]) const [weather, setWeather] = useState([])
let headerTitleStyle = { let headerTitleStyle = {
position: 'absolute', position: 'absolute',
@ -39,6 +40,7 @@ const Header = props => {
fontWeight: 600, fontWeight: 600,
fontFamily: 'PangMenZhengDao', fontFamily: 'PangMenZhengDao',
letterSpacing: '.5231rem', letterSpacing: '.5231rem',
width:'39rem'
} }
let headerTabStyle = { let headerTabStyle = {
width: '4.375rem', width: '4.375rem',
@ -52,12 +54,15 @@ const Header = props => {
useEffect(() => { useEffect(() => {
queryWeather() queryWeather()
const projectName = JSON.parse(sessionStorage.getItem('user')).projectName
setProjectName(projectName)
const timeUpdate = setInterval(() => { const timeUpdate = setInterval(() => {
queryWeather() queryWeather()
}, WEATHERMARGIN) }, WEATHERMARGIN)
return () => { return () => {
clearInterval(timeUpdate) clearInterval(timeUpdate)
} }
}, []) }, [])
const queryWeather = () => { const queryWeather = () => {
@ -105,7 +110,7 @@ const Header = props => {
<div className={styles['header-fold']}> <div className={styles['header-fold']}>
{/* <img src='/assets/images/logo.svg' style={{ margin: '-14px 12px 0 0', height: 24 }} /> */} {/* <img src='/assets/images/logo.svg' style={{ margin: '-14px 12px 0 0', height: 24 }} /> */}
<div className={styles['header-title']} style={{}}> <div className={styles['header-title']} style={{}}>
<span style={headerTitleStyle}>河州路河州路河州路河州路河州路</span> <span style={headerTitleStyle}>{projectName}</span>
</div> </div>
</div> </div>
<div <div

3
web-screen/client/src/layout/components/header/style.css

@ -18,6 +18,9 @@
display: inline-block; display: inline-block;
color: #fff; color: #fff;
text-shadow: 0 .25rem .1875rem rgba(54, 77, 108, 0.20); text-shadow: 0 .25rem .1875rem rgba(54, 77, 108, 0.20);
text-align: center;
width: 39rem;
line-height: 4.75rem;
} }
.header-title .title-cn { .header-title .title-cn {

Loading…
Cancel
Save