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) => {
setLoading(false);
setTreeData(newData);
setTotalCount(response.data.totalCount);
onTreeCheck([newData[0]]);
onTreeSelect([newData[0]]);
onTreeCheck(newData.length > 0 ? [newData[0]] : []);
onTreeSelect(newData.length > 0 ? [newData[0]] : []);
} else {
message.error(response.msg);
}
......
......@@ -778,8 +778,12 @@ const HistoryInfo = (props) => {
<TabPane tab={item.tab} key={item.key}>
<div className={classNames(`${prefixCls}-content`)}>
{renderOptions(item)}
{!tableData.length && <Empty />}
<Spin spinning={loading}>
{!tableData.length && (
<div className={classNames(`${prefixCls}-empty`)}>
<Empty />
</div>
)}
{!!tableData.length && (
<div className={classNames(`${prefixCls}-wrap`)}>
<div className={classNames(`${prefixCls}-main`)}>
......
......@@ -24,6 +24,17 @@
display: flex;
flex: 1;
}
.ant-spin-nested-loading > div > .ant-spin {
max-height: none;
}
}
&-empty {
display: flex;
align-items: center;
justify-content: center;
width: 100%;
}
&-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