This commit is contained in:
lb 2024-01-24 15:39:42 +08:00
parent 446234c2aa
commit b7b2ad2ee5
4 changed files with 34 additions and 22 deletions

View File

@ -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}
> >

View File

@ -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]}

View File

@ -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 && (

View File

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