Browse Source

fix: 修复删除服务版本未更新版本数量字段

pull/189/head
cp3hnu 10 months ago
parent
commit
29e19dfbe4
2 changed files with 7 additions and 5 deletions
  1. +1
    -0
      react-ui/src/pages/ModelDeployment/ServiceInfo/index.less
  2. +6
    -5
      react-ui/src/pages/ModelDeployment/ServiceInfo/index.tsx

+ 1
- 0
react-ui/src/pages/ModelDeployment/ServiceInfo/index.less View File

@@ -18,6 +18,7 @@

&__table {
flex: 1;
min-height: 0;
margin-top: 24px;
}
}


+ 6
- 5
react-ui/src/pages/ModelDeployment/ServiceInfo/index.tsx View File

@@ -133,17 +133,18 @@ function ServiceInfo() {
if (res) {
message.success('删除成功');
// 如果是一页的唯一数据,删除时,请求第一页的数据
// 否则直接刷新这一页的数据
// 避免回到第一页
if (tableData.length > 1) {
// 否则直接刷新这一页的数据,避免回到第一页
if (tableData.length === 1) {
setPagination((prev) => ({
...prev,
current: 1,
}));
} else {
getServiceInfo();
getServiceVersions();
setPagination((prev) => ({
...prev,
}));
}
getServiceInfo();
}
};



Loading…
Cancel
Save