update
This commit is contained in:
@@ -6,6 +6,7 @@ import { useEffect, useState } from "react";
|
||||
import { useSelector } from "react-redux";
|
||||
|
||||
function WindFrequence(props) {
|
||||
const [currLine, setCurrLine] = useState('1线')
|
||||
const [showChart, setShowChart] = useState(false);
|
||||
const [currentLine, setCurrentLine] = useState([]);
|
||||
const runState = useSelector((state) => state.annealFanFrequence.runtime);
|
||||
@@ -155,6 +156,7 @@ function WindFrequence(props) {
|
||||
|
||||
function handleLineChange(line) {
|
||||
const lineNum = line[0];
|
||||
setCurrLine(line);
|
||||
setCurrentLine((old) =>
|
||||
dataList.filter((item) => item?.name.startsWith(`${lineNum}#`))
|
||||
);
|
||||
@@ -169,6 +171,7 @@ function WindFrequence(props) {
|
||||
switchPosition={[null, 200]} // [top, left]
|
||||
onSwitch={handleSwitchChange}
|
||||
dateOptions={["1线", "2线", "3线", "4线", "5线"]}
|
||||
defaultSelect={currLine}
|
||||
onDateChange={handleLineChange}
|
||||
>
|
||||
<div className={cls.chart} style={{ marginTop: "24px" }}>
|
||||
|
||||
Reference in New Issue
Block a user