fix: 开站网元信息删除无id触发undefined

This commit is contained in:
TsMask
2024-05-24 17:54:39 +08:00
parent b325cde5c0
commit b84d6bb9fc

View File

@@ -61,12 +61,12 @@ function fnTabClose(key: string) {
title: t('common.tipTitle'),
content: `${item.data.neName} ${t('views.ne.neInfo.delTip')}`,
onOk() {
delNeInfo(item.data.id).finally(() => {
tabState.panes.splice(tabIndex, 1);
// 激活前一项标签
const idx = tabIndex === 0 ? 0 : tabIndex - 1;
tabState.activeKey = tabState.panes[idx].id;
});
if (item.data.id) delNeInfo(item.data.id);
tabState.panes.splice(tabIndex, 1);
// 激活前一项标签
const idx = tabIndex === 0 ? 0 : tabIndex - 1;
tabState.activeKey = tabState.panes[idx].id;
},
});
}
@@ -609,7 +609,7 @@ onMounted(() => {
:label-wrap="true"
>
<a-button
type="dashed"
type="dashed"
shape="round"
@click="fnHostTest(pane.data.hosts[0])"
:disabled="tabState.confirmLoading"
@@ -647,11 +647,15 @@ onMounted(() => {
<div class="ne-oper">
<a-space direction="horizontal" :size="18">
<a-button @click="fnStepPrev()">
<a-button @click="fnStepPrev()" :disabled="tabState.confirmLoading">
{{ t('views.system.quickStart.exit') }}
</a-button>
<a-button type="primary" @click="fnStepNext('NeInfoConfigPara5G')">
<a-button
type="primary"
@click="fnStepNext('NeInfoConfigPara5G')"
:disabled="tabState.confirmLoading"
>
{{ t('views.system.quickStart.stepNext') }}
</a-button>
</a-space>