mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-10-09 23:17:21 +08:00
fix: fix error translate from website (#8688)
This commit is contained in:
parent
9a0488628a
commit
f9ccd10cc9
3 changed files with 7 additions and 6 deletions
|
@ -380,7 +380,7 @@ export const Actions = [
|
|||
},
|
||||
];
|
||||
|
||||
export const Algorithms = [
|
||||
export const getAlgorithms = () => [
|
||||
{
|
||||
label: i18n.global.t('commons.table.default'),
|
||||
value: 'default',
|
||||
|
@ -398,7 +398,7 @@ export const Algorithms = [
|
|||
},
|
||||
];
|
||||
|
||||
export const StatusStrategy = [
|
||||
export const getStatusStrategy = () => [
|
||||
{
|
||||
label: i18n.global.t('website.strategyDown'),
|
||||
value: 'down',
|
||||
|
|
|
@ -61,7 +61,7 @@ import { onMounted, ref } from 'vue';
|
|||
import Operate from './operate/index.vue';
|
||||
import i18n from '@/lang';
|
||||
import { Website } from '@/api/interface/website';
|
||||
import { Algorithms } from '@/global/mimetype';
|
||||
import { getAlgorithms } from '@/global/mimetype';
|
||||
import File from './file/index.vue';
|
||||
|
||||
const props = defineProps({
|
||||
|
@ -76,6 +76,7 @@ const loading = ref(false);
|
|||
const operateRef = ref();
|
||||
const delRef = ref();
|
||||
const fileRef = ref();
|
||||
const Algorithms = getAlgorithms();
|
||||
|
||||
const buttons = [
|
||||
{
|
||||
|
|
|
@ -70,7 +70,7 @@
|
|||
>
|
||||
<el-select v-model="item.servers[index].flag" clearable>
|
||||
<el-option
|
||||
v-for="flag in StatusStrategy"
|
||||
v-for="flag in getStatusStrategy()"
|
||||
:label="flag.label"
|
||||
:key="flag.value"
|
||||
:value="flag.value"
|
||||
|
@ -112,7 +112,7 @@ import { FormInstance } from 'element-plus';
|
|||
import { ref } from 'vue';
|
||||
import { MsgSuccess } from '@/utils/message';
|
||||
import { Rules, checkNumberRange } from '@/global/form-rules';
|
||||
import { Algorithms, StatusStrategy } from '@/global/mimetype';
|
||||
import { getAlgorithms, getStatusStrategy } from '@/global/mimetype';
|
||||
import { Website } from '@/api/interface/website';
|
||||
|
||||
const rules = ref<any>({
|
||||
|
@ -158,7 +158,7 @@ const handleClose = () => {
|
|||
};
|
||||
|
||||
const helper = ref();
|
||||
|
||||
const Algorithms = getAlgorithms();
|
||||
const getHelper = (key: string) => {
|
||||
Algorithms.forEach((algorithm) => {
|
||||
if (algorithm.value === key) {
|
||||
|
|
Loading…
Add table
Reference in a new issue