Skip to content

Commit

Permalink
fixed: 尝试修复日志页未响应BUG
Browse files Browse the repository at this point in the history
  • Loading branch information
Sengimu committed Dec 31, 2024
1 parent 33f027c commit dd215ca
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/pages/Dashboard/Log/index.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, {useEffect, useRef, useState} from "react";
import {Button, Input, message, Modal, Popconfirm, Popover, Select, Tooltip} from "antd";
import {Button, Input, message, Modal, Popconfirm, Popover, Select} from "antd";
import {
taskCombineRequest, taskPackRequest,
taskRevertRequest,
Expand All @@ -19,9 +19,9 @@ const VersionList = ({versionList}) => {
const content = (
<div>
{
versionList.map((version) => {
versionList.map((version, index) => {
return (
<div className={"p-2"}>
<div key={index} className={"p-2"}>
<div className={"flex justify-start"}>
<div className={"mr-3 w-40 max-h-4"}><span className={"font-bold"}>版本号: </span>{version.label}</div>
<div className={"mr-3 w-40 max-h-4"}>
Expand Down Expand Up @@ -102,10 +102,9 @@ const Index = () => {
const terminalMore = async () => {
const {code, msg, data} = await terminalMoreRequest();
if (code === 1) {
if (data.content.length === 0) {
return
if (data.content.length !== 0) {
setLogs(prev => prev.concat(data.content))
}
setLogs(prev => [...prev, ...data.content])
}
}

Expand Down

0 comments on commit dd215ca

Please sign in to comment.