fix: 网元快速安装多语言识别

This commit is contained in:
TsMask
2024-10-01 13:02:06 +08:00
parent 2f04562a34
commit b992225e28
5 changed files with 8 additions and 13 deletions

View File

@@ -268,7 +268,7 @@ function fnStepPrev() {
title: t('common.tipTitle'),
content: t('views.ne.neQuickSetup.stepPrevTip'),
onOk() {
fnRestStepState();
fnRestStepState(t);
fnToStepName('Start');
},
});

View File

@@ -1,18 +1,14 @@
<script setup lang="ts">
import { Modal, TableColumnsType, message } from 'ant-design-vue/lib';
import { defineAsyncComponent, onMounted, reactive, ref, toRaw } from 'vue';
import { Modal, message } from 'ant-design-vue/lib';
import { defineAsyncComponent, onMounted, reactive, toRaw } from 'vue';
import { fnToStepName, stepState } from '../hooks/useStep';
import useI18n from '@/hooks/useI18n';
import { listNeVersion, operateNeVersion } from '@/api/ne/neVersion';
import { operateNeVersion } from '@/api/ne/neVersion';
import {
RESULT_CODE_ERROR,
RESULT_CODE_SUCCESS,
} from '@/constants/result-constants';
import {
addNeSoftware,
listNeSoftware,
newNeVersion,
} from '@/api/ne/neSoftware';
import { listNeSoftware, newNeVersion } from '@/api/ne/neSoftware';
import { parseDateToStr } from '@/utils/date-utils';
import { ColumnsType } from 'ant-design-vue/lib/table';
const { t } = useI18n();

View File

@@ -82,7 +82,7 @@ function fnStepEnd() {
title: t('common.tipTitle'),
content: t('views.ne.neQuickSetup.licenseEndTip'),
onOk() {
fnRestStepState();
fnRestStepState(t);
},
});
}

View File

@@ -52,6 +52,7 @@ export function fnRestStepState(t?: any) {
stepState.current = -1;
stepState.neHost = {};
stepState.neInfo = {};
// 多语言翻译
if (t) {
stepState.steps = [
@@ -104,8 +105,5 @@ export function useStep({ t }: any) {
}
);
onMounted(() => {
fnRestStepState(t);
});
return { currentComponent };
}

View File

@@ -24,6 +24,7 @@ watch(
);
onMounted(() => {
fnRestStepState(t);
fnReloadData();
});