Commit dba39ece authored by 涂茜's avatar 涂茜

fix: bug

parent 4e99dd86
Pipeline #29185 failed with stages
in 21 seconds
...@@ -51,8 +51,8 @@ const DeviceTree = (props) => { ...@@ -51,8 +51,8 @@ const DeviceTree = (props) => {
setLoading(false); setLoading(false);
setTreeData(newData); setTreeData(newData);
setTotalCount(response.data.totalCount); setTotalCount(response.data.totalCount);
onTreeCheck([newData[0]]); onTreeCheck(newData.length > 0 ? [newData[0]] : []);
onTreeSelect([newData[0]]); onTreeSelect(newData.length > 0 ? [newData[0]] : []);
} else { } else {
message.error(response.msg); message.error(response.msg);
} }
......
...@@ -778,8 +778,12 @@ const HistoryInfo = (props) => { ...@@ -778,8 +778,12 @@ const HistoryInfo = (props) => {
<TabPane tab={item.tab} key={item.key}> <TabPane tab={item.tab} key={item.key}>
<div className={classNames(`${prefixCls}-content`)}> <div className={classNames(`${prefixCls}-content`)}>
{renderOptions(item)} {renderOptions(item)}
{!tableData.length && <Empty />}
<Spin spinning={loading}> <Spin spinning={loading}>
{!tableData.length && (
<div className={classNames(`${prefixCls}-empty`)}>
<Empty />
</div>
)}
{!!tableData.length && ( {!!tableData.length && (
<div className={classNames(`${prefixCls}-wrap`)}> <div className={classNames(`${prefixCls}-wrap`)}>
<div className={classNames(`${prefixCls}-main`)}> <div className={classNames(`${prefixCls}-main`)}>
......
...@@ -24,6 +24,17 @@ ...@@ -24,6 +24,17 @@
display: flex; display: flex;
flex: 1; flex: 1;
} }
.ant-spin-nested-loading > div > .ant-spin {
max-height: none;
}
}
&-empty {
display: flex;
align-items: center;
justify-content: center;
width: 100%;
} }
&-wrap { &-wrap {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment