refactor: i18n

--bug=1008900 --user=lyh 【国际化】系统设置 模块,国际化后排版问题汇总
https://www.tapd.cn/55049933/s/1082229
This commit is contained in:
shiziyuan9527 2021-12-17 15:23:29 +08:00 committed by shiziyuan9527
parent cf6c247ca8
commit 5f700a5b44
6 changed files with 21 additions and 20 deletions

View File

@ -3,7 +3,7 @@
<!-- 认证-->
<el-tab-pane :label="$t('api_test.definition.request.verified')" name="verified">
<el-form :model="authConfig" :rules="rule" ref="authConfig" label-position="right" label-width="80px">
<el-form :model="authConfig" :rules="rule" ref="authConfig" label-position="right">
<el-form-item :label="$t('api_test.definition.request.verification_method')" prop="verification">
<el-select v-model="authConfig.verification" @change="change"
:placeholder="$t('api_test.definition.request.verification_method')" filterable size="small">

View File

@ -3,11 +3,11 @@
:visible.sync="createVisible" width="40%"
@closed="handleClose" class="edit-user-dialog"
:destroy-on-close="true">
<div v-loading="result.loading" >
<div v-loading="result.loading">
<el-form :model="form" label-width="120px" size="small" :rules="rule" ref="createUserForm">
<el-form-item label="ID" prop="id">
<el-input v-model="form.id" autocomplete="off" :placeholder="$t('user.input_id_placeholder')"
:disabled="type === 'Edit'" class="form-input" />
:disabled="type === 'Edit'" class="form-input"/>
</el-form-item>
<el-form-item :label="$t('commons.username')" prop="name">
<el-input v-model="form.name" autocomplete="off" :placeholder="$t('user.input_name')" class="form-input"/>
@ -25,9 +25,9 @@
<div v-for="(group, index) in form.groups" :key="index">
<el-form-item :label="getLabel(index)"
:prop="'groups.' + index + '.type'"
:rules="{required: true, message: '请选择用户组', trigger: 'change'}"
:rules="{required: true, message: $t('user.select_group'), trigger: 'change'}"
>
<el-select filterable v-model="group.type" placeholder="请选择用户组" :disabled="!!group.type"
<el-select filterable v-model="group.type" :placeholder="$t('user.select_group')" :disabled="!!group.type"
class="edit-user-select" @change="getResource(group.type, index)">
<el-option
v-for="item in activeGroup(group)"
@ -42,12 +42,12 @@
</el-button>
</el-form-item>
<div v-if="groupType(group.type) === ws">
<el-form-item :label="$t('workspace.select')"
<el-form-item :label="$t('commons.workspace')"
:prop="'groups.' + index + '.ids'"
:rules="{required: true, message: $t('workspace.select'), trigger: 'change'}"
>
<el-select filterable v-model="group.ids" :placeholder="$t('workspace.select')" multiple
class="edit-user-select" >
class="edit-user-select">
<el-option
v-for="item in group.workspaces"
:key="item.id"
@ -58,12 +58,12 @@
</el-form-item>
</div>
<div v-if="groupType(group.type) === project">
<el-form-item label="选择项目"
<el-form-item :label="$t('commons.project')"
:prop="'groups.' + index + '.ids'"
:rules="{required: true, message: '请选择项目', trigger: 'change'}"
:rules="{required: true, message: $t('user.select_project'), trigger: 'change'}"
>
<el-select filterable v-model="group.ids" placeholder="请选择项目" multiple
class="edit-user-select" >
<el-select filterable v-model="group.ids" :placeholder="$t('user.select_project')" multiple
class="edit-user-select">
<el-option
v-for="item in group.projects"
:key="item.id"
@ -77,7 +77,7 @@
<el-form-item>
<template>
<el-button type="success" class="form-input" @click="addGroup('createUserForm')" :disabled="btnAddRole">
<el-button type="success" class="form-input" @click="addGroup('createUserForm')" :disabled="btnAddRole">
{{ $t('group.add') }}
</el-button>
</template>
@ -292,9 +292,9 @@ export default {
default:
}
},
getLabel(index){
let a = index+1;
return "用户组"+a;
getLabel(index) {
let a = index + 1;
return this.$t('commons.group') + a;
}
}
}
@ -309,9 +309,10 @@ export default {
/*.edit-user-dialog >>> .el-dialog__footer {
padding-top: 0;
}*/
.form-input{
.form-input {
width: 80%;
}
.edit-user-select {
width: 80%;
}

View File

@ -2,7 +2,7 @@
<div v-loading="result.loading">
<el-dialog :close-on-click-modal="false" :title="title" :visible.sync="createVisible" destroy-on-close
@close="handleClose">
<el-form :model="form" :rules="rules" ref="form" label-position="right" label-width="60px" size="small">
<el-form :model="form" :rules="rules" ref="form" label-position="right" label-width="90px" size="small">
<el-form-item :label="$t('commons.name')" prop="name">
<el-input v-model="form.name" autocomplete="off" show-word-limit maxlength="50"></el-input>
</el-form-item>

@ -1 +1 @@
Subproject commit f806258070e9ca2cda08e48aa47952d31eb2a60a
Subproject commit 938171fa506d5b3d8fff9857cb21a83c8e31063e

View File

@ -2261,7 +2261,7 @@ export default {
performance: "性能测试数量",
resource_pool: "可用测试资源池",
max_threads: "最大并发数",
duration: "压测时长(秒)",
duration: "压测时长(秒)",
use_default: "使用默认配额",
yes: "是",
no: "否",

View File

@ -2261,7 +2261,7 @@ export default {
performance: "性能測試數量",
resource_pool: "可用測試資源池",
max_threads: "最大並發數",
duration: "壓測時長(秒)",
duration: "壓測時長(秒)",
use_default: "使用默認配額",
yes: "是",
no: "否",