update
This commit is contained in:
@@ -33,6 +33,7 @@ function FanInfo(props) {
|
||||
fanInfo[key] == "运行" ? 1 : fanInfo[key] == "故障" ? 0 : 2,
|
||||
];
|
||||
});
|
||||
const dataRight = [...data.slice(rowNum), ...data.slice(0, rowNum)];
|
||||
|
||||
let config = {
|
||||
headerBGC: "rgba(4, 44, 76, 0.3)",
|
||||
@@ -43,6 +44,7 @@ function FanInfo(props) {
|
||||
],
|
||||
oddRowBGC: "#042444",
|
||||
evenRowBGC: "#042c4c",
|
||||
// columnWidth: data.length > 12 ? [50, 136] : [88, 256],
|
||||
columnWidth: [50, 136],
|
||||
rowNum,
|
||||
hoverPause: false,
|
||||
@@ -59,7 +61,9 @@ function FanInfo(props) {
|
||||
className="flex"
|
||||
style={{
|
||||
display: "flex",
|
||||
flex: 1,
|
||||
gap: "20px",
|
||||
// gap: data.length > 12 ? "20px" : 0,
|
||||
height: "100%",
|
||||
position: "relative",
|
||||
}}
|
||||
@@ -67,9 +71,15 @@ function FanInfo(props) {
|
||||
<div className="flex-1" style={{ flex: 1 }}>
|
||||
<ScrollBoard
|
||||
config={config}
|
||||
style={{ width: "280px", height: "100%" }}
|
||||
style={{
|
||||
width: "280px",
|
||||
// width: data.length > 12 ? "280px" : "100%",
|
||||
height: "100%",
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
{/* {data.length > 12 && (
|
||||
<> */}
|
||||
<div
|
||||
className="verticalLine"
|
||||
style={{
|
||||
@@ -84,10 +94,12 @@ function FanInfo(props) {
|
||||
></div>
|
||||
<div className="flex-1" style={{ flex: 1 }}>
|
||||
<ScrollBoard
|
||||
config={config}
|
||||
config={{ ...config, data: attachStyle(dataRight) }}
|
||||
style={{ width: "280px", height: "100%" }}
|
||||
/>
|
||||
</div>
|
||||
{/* </>
|
||||
)} */}
|
||||
</div>
|
||||
</GraphBase>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user