1
This commit is contained in:
parent
446234c2aa
commit
b7b2ad2ee5
@ -6,6 +6,7 @@ function BottomBarItem(props) {
|
|||||||
<Container
|
<Container
|
||||||
icon={props.icon}
|
icon={props.icon}
|
||||||
title={props.title}
|
title={props.title}
|
||||||
|
desc="hello world"
|
||||||
className={`${cls.bottomBarItem} ${props.className}`}
|
className={`${cls.bottomBarItem} ${props.className}`}
|
||||||
style={props.style}
|
style={props.style}
|
||||||
>
|
>
|
||||||
|
@ -1,20 +1,20 @@
|
|||||||
import { useCallback, useState } from 'react';
|
import { useCallback, useEffect, useState } from "react";
|
||||||
import cls from './index.module.scss';
|
import cls from "./index.module.scss";
|
||||||
|
|
||||||
export default function CenterMenu({ active, onChangeActive }) {
|
export default function CenterMenu({ active, onChangeActive }) {
|
||||||
const menuList = [
|
const menuList = [
|
||||||
['窑炉总览', '/kilnSummary'],
|
["窑炉总览", "/kilnSummary"],
|
||||||
['窑炉内部', '/kilnInner'],
|
["窑炉内部", "/kilnInner"],
|
||||||
['退火监测', '/stopFire'],
|
["退火监测", "/stopFire"],
|
||||||
['质检统计', '/quailtyCheck'],
|
["质检统计", "/quailtyCheck"],
|
||||||
['能耗分析', '/energyCost'],
|
["能耗分析", "/energyCost"],
|
||||||
];
|
];
|
||||||
return (
|
return (
|
||||||
<div className={`${cls.centerMenu} flex`}>
|
<div className={`${cls.centerMenu} flex`}>
|
||||||
{menuList.map((menu) => (
|
{menuList.map((menu) => (
|
||||||
<div
|
<div
|
||||||
key={menu[0]}
|
key={menu[0]}
|
||||||
className={`${cls.menuItem} ${active == menu[0] ? cls.active : ''}`}
|
className={`${cls.menuItem} ${active == menu[0] ? cls.active : ""}`}
|
||||||
onClick={() => onChangeActive(menu[0])}
|
onClick={() => onChangeActive(menu[0])}
|
||||||
>
|
>
|
||||||
{menu[0]}
|
{menu[0]}
|
||||||
|
@ -5,6 +5,8 @@ import cls from "./container.module.scss";
|
|||||||
const Container = (props) => {
|
const Container = (props) => {
|
||||||
let icon = useIcon(props.icon);
|
let icon = useIcon(props.icon);
|
||||||
|
|
||||||
|
const desc = props.desc;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className={`${cls.container} ${props.className}`}
|
className={`${cls.container} ${props.className}`}
|
||||||
@ -17,6 +19,7 @@ const Container = (props) => {
|
|||||||
className={props.icon == "kiln" ? cls.bigger : ""}
|
className={props.icon == "kiln" ? cls.bigger : ""}
|
||||||
/>
|
/>
|
||||||
<h2>{props.title}</h2>
|
<h2>{props.title}</h2>
|
||||||
|
{desc && <div className={cls.graphBaseDesc}>{desc}</div>}
|
||||||
</div>
|
</div>
|
||||||
<div className={cls.container__content}>{props.children}</div>
|
<div className={cls.container__content}>{props.children}</div>
|
||||||
{props.pending && (
|
{props.pending && (
|
||||||
|
@ -30,6 +30,14 @@
|
|||||||
letter-spacing: 2px;
|
letter-spacing: 2px;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.graphBaseDesc {
|
||||||
|
margin: 0 6px;
|
||||||
|
margin-left: 110px;
|
||||||
|
font-size: 16px;
|
||||||
|
color: #76fff9;
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.container__content {
|
.container__content {
|
||||||
|
Loading…
Reference in New Issue
Block a user