fix: 默认选择AMF找不到选首个

This commit is contained in:
TsMask
2023-11-15 14:58:36 +08:00
parent b569fa57b6
commit 4f18fe2552
2 changed files with 22 additions and 15 deletions

View File

@@ -1071,9 +1071,12 @@ onMounted(() => {
);
// 默认选择AMF
const item = neCascaderOtions.value.find(s => s.value === 'AMF');
if (item) {
if (item && item.children) {
const info = item.children[0];
neTypeSelect.value = [info.neType, info.neId];
} else {
const info = neCascaderOtions.value[0].children[0];
neTypeSelect.value = [info.neType, info.neId];
}
fnGetParamConfigTopTab();
}
@@ -1421,7 +1424,6 @@ onMounted(() => {
v-else-if="Array.isArray(text.array)"
>
{{ t('common.viewText') }}
</a-button>
<div v-else class="editable-cell__text-wrapper">
{{ `${text.value}` }}
@@ -1465,7 +1467,9 @@ onMounted(() => {
"
>
<a-tooltip>
<template #title>{{t('views.configManage.configParam.post')}}</template>
<template #title>{{
t('views.configManage.configParam.post')
}}</template>
<a-popconfirm
v-if="
tableState.arrayChildNewIndex ===

View File

@@ -297,9 +297,12 @@ onMounted(() => {
);
// 默认选择AMF
const item = neCascaderOtions.value.find(s => s.value === 'AMF');
if (item) {
if (item && item.children) {
const info = item.children[0];
state.neType = [info.neType, info.neId];
} else {
const info = neCascaderOtions.value[0].children[0];
state.neType = [info.neType, info.neId];
}
fnGetList();
}