引入日期选择中文包,更新部分样式
This commit is contained in:
@@ -26,6 +26,7 @@ import {
|
||||
} from "@mui/icons-material";
|
||||
import { DataGrid, GridColDef } from "@mui/x-data-grid";
|
||||
import { LineChart } from "@mui/x-charts";
|
||||
import "dayjs/locale/zh-cn"; // 引入中文包
|
||||
import dayjs, { Dayjs } from "dayjs";
|
||||
import utc from "dayjs/plugin/utc";
|
||||
import timezone from "dayjs/plugin/timezone";
|
||||
@@ -704,7 +705,7 @@ const SCADADataPanel: React.FC<SCADADataPanelProps> = ({
|
||||
<Box sx={{ flex: 1 }}>
|
||||
<LineChart
|
||||
dataset={filteredDataset}
|
||||
height={480}
|
||||
height={520}
|
||||
margin={{ left: 70, right: 40, top: 30, bottom: 90 }}
|
||||
xAxis={[
|
||||
{
|
||||
@@ -724,7 +725,7 @@ const SCADADataPanel: React.FC<SCADADataPanelProps> = ({
|
||||
]}
|
||||
yAxis={[
|
||||
{
|
||||
label: "数值",
|
||||
label: "压力/流量值",
|
||||
labelStyle: {
|
||||
fontSize: 13,
|
||||
fill: "#333",
|
||||
@@ -1077,7 +1078,10 @@ const SCADADataPanel: React.FC<SCADADataPanelProps> = ({
|
||||
|
||||
{/* Controls */}
|
||||
<Box sx={{ p: 2, backgroundColor: "grey.50" }}>
|
||||
<LocalizationProvider dateAdapter={AdapterDayjs}>
|
||||
<LocalizationProvider
|
||||
dateAdapter={AdapterDayjs}
|
||||
adapterLocale="zh-cn"
|
||||
>
|
||||
<Stack spacing={1.5}>
|
||||
<Stack direction="row" spacing={1} alignItems="center">
|
||||
<DateTimePicker
|
||||
|
||||
Reference in New Issue
Block a user