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'), title: t('common.tipTitle'),
content: t('views.ne.neQuickSetup.stepPrevTip'), content: t('views.ne.neQuickSetup.stepPrevTip'),
onOk() { onOk() {
fnRestStepState(); fnRestStepState(t);
fnToStepName('Start'); fnToStepName('Start');
}, },
}); });

View File

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

View File

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

View File

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

View File

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